Sha256: 2cd12fa055902b112e859d6cf9bdee1cf038ee098437eb58c099d10c39a20b9f

Contents?: true

Size: 742 Bytes

Versions: 4

Compression:

Stored size: 742 Bytes

Contents

# Cortex Client

## About
It is a ruby library to push timeseries metrics to cortex.

## Prerequisites
ruby - 2.5.0

## Usage
#### Step1: Configure the client

```
CortexClient.configure do |config|
   config.host = 'https://lens.golabs.io'
   config.metrics_push_api_path = 'v1/prom/metrics'
   config.token = "sample_token"
end
```
#### Step2: Push a timeseries based metric

To push synchronously

```
metric = CortexClient::Metric.new('test_usage')
response = metric.
     add_label(name: "team_name", value: "kernel_ux").
     add_label(name: "email", value: "name@go-jek.com").add_sample(value: 1).push

The metric instance has the error appended if there's any and if there's no error, then the instance 
has a prom_message in it.
```

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
anmol_cortex_client_ruby-0.1.3 README.md
anmol_cortex_client_ruby-0.1.2 README.md
anmol_cortex_client_ruby-0.1.1 README.md
anmol_cortex_client_ruby-0.1.0 README.md