/statsd.cr

A statsd client library for Crystal.

Primary LanguageCrystalMIT LicenseMIT

statsd.cr

A statsd client library for Crystal.

Crystal CI

Installation

Add this to your application's shard.yml:

dependencies:
  statsd:
    github: miketheman/statsd.cr

Usage

require "statsd"

statsd = Statsd::Client.new
statsd.increment "myapp.login_page", 1

# Datadog-compliant statsd tags:
statsd.increment "page.views", tags: ["page:login", "app:myapp"]

See examples/test.cr for more.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Test your changes with make spec
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

Contributors

Inspired by syslog.cr and statsd.