heroku-buildpack-metrics

by heroku

GitHub Readme.md

heroku-buildpack-metrics

This buildpack sets up the necessary machinery to utilize Heroku's Language Metrics feature.

How does it affect my slug?

This buildpack does two things.

  1. Copies a jar into the slug
  2. Copies a .profile.d/ script into your slug

The jar file, when $HEROKU_METRICS_URL is set as a result of the runtime-heroku-metrics labs flag, will be used as an agent to your Java process. This jar exposes metrics via a Prometheus server which an additional process, namely agentmon, will poll and forward to $HEROKU_METRICS_URL, for processing.

The .profile.d/ script downloads the latest agentmon release, and starts it on Dyno boot.

Releasing

If you belong to the Heroku org, you can release a new version of the buildpack by running the following command:

$ git tag vXXX
$ heroku buildpacks:publish heroku/metrics vXXX

This will publish the tag vXXX as a new version of the heroku/metrics buildpack. If you get a 401 you may not have the right permissions to publish. Check with @jkutner

Testing

This buildpack uses Hatchet to run integration tests. To run them local make sure you have Ruby installed, then execute:

$ bundle install
$ bundle exec rspec spec/