github.com/miketheman/statsd.cr

A statsd client library for Crystal.

36 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  statsd:
    github: miketheman/statsd.cr
    version: ~> 0.5.0

Then run:

shards install

shard.yml

Crystal
>= 0.35.1
License
MIT
Author
Mike Fiedler <miketheman@gmail.com>

Dependencies

This version declares no dependencies.

Documentation

Read the API documentation

Generated from the source of the current release. The first visit to a release that has never been documented starts its build.

README

# statsd.cr

A [statsd](https://github.com/etsy/statsd) client library for [Crystal](http://crystal-lang.org/).

![Crystal CI](https://github.com/miketheman/statsd.cr/workflows/Crystal%20CI/badge.svg)

## Installation

Add this to your application's `shard.yml`:

```yaml
dependencies:
  statsd:
    github: miketheman/statsd.cr
```


## Usage

```crystal
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](https://github.com/miketheman/statsd.cr/fork)
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](https://github.com/comandeo/syslog.cr) and [statsd](https://github.com/reinh/statsd).

- [@miketheman](https://github.com/miketheman) Mike Fiedler - creator, maintainer