dogapi-cr is a crystal client for DataDog's API the code is based loosely on Datadog's Ruby Library.
Crystal 1.0+
Add this to your application's shard.yml
:
dependencies:
dogapi:
github: fullcycleapp/dogapi-cr
When running the code below you need the DATADOG_KEY
and a DATADOG_APP_KEY
set, go to Integrations > APIs in datadog to get your API and app key.
After that, you can use this client in your Crystal programs like so:
require "dogapi"
dog = Dogapi::Client.new(ENV["DATADOG_KEY"])
dog.emit_point("test.api.test_metric", 4.0)
Take a look at the examples/
folder for more examples usages.
Contributions and patches are welcome! Please read the following instructions before submitting your patch:
- Fork it (https://github.com/fullcycleapp/dogapi-cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Apache 2.0