crystal-loki-client

Crystal client library for accessing Grafana Loki APIs.

Supported APIs

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      loki-client:
        github: spider-gazelle/crystal-loki-client
  2. Run shards install

Usage

require "loki-client"

You can configure the environment using the following variables or configure them via code.

client = Loki::Client.from_env

# call endpoints
#
# client.query(my_query...)
# client.query_range(my_query ....)
# client.list_labels(since) # 1.hour ...
# ....

Development

Contributing

  1. Fork it (https://github.com/spider-gazelle/crystal-loki-client/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors