https://github.com/DataDog/heroku-buildpack-datadog
$ heroku buildpacks:add --index 2 https://github.com/DataDog/heroku-buildpack-datadog.git -a zundan-mastodon-experiment
Buildpack added. Next release on zundan-mastodon-experiment will use:
1. heroku/metrics
2. https://github.com/DataDog/heroku-buildpack-datadog.git
3. https://github.com/heroku/heroku-buildpack-apt
4. heroku/nodejs
5. heroku/ruby
Run git push heroku master to create a new release using these buildpacks.
デプロイして、
$ heroku config:set DD_HOSTNAME=zundan-mastodon \
DD_API_KEY=<DataDogのAPI Key> \
DD_APM_ENABLED=true -a zundan-mastodon
$ heroku pipelines:promote -a zundan-mastodon-experiment
$ heroku logs -t -a zundan-mastodon
:
2017-11-12T01:23:40.661664+00:00 app[web.1]: 2017-11-12 01:23:40,661 | INFO | dd.dogstatsd | utils.pidfile(pidfile.py:35) | Pid file is: /app/.apt/opt/datadog-agent/run/dogstatsd.pid
2017-11-12T01:23:40.662044+00:00 app[web.1]: 2017-11-12 01:23:40,661 | INFO | dd.dogstatsd | daemon(daemon.py:233) | Starting
:
これでDataDogに何か送られるようになったようだ。Hostがあるとは表示される。メトリクスは見られない。
The Datadog agent provides a listening port on 8125 for statsd/dogstatsd metrics and events. Traces are collected on port 8126 (older Datadog tracing libraries may use port 7777).
このあとどうすればいいのだ。