Heroku Telemetry Drains

Learn how to set up Heroku Telemetry Drains to forward logs and traces data to Sentry.

Heroku Telemetry supports exporting OpenTelemetry (OTEL)-compliant data to send logs and traces to Sentry. Sending metrics is not supported yet.

Before you begin, ensure you have:

  • A Heroku app that you want to monitor
  • A Sentry project you want to send data to

To add a telemetry drain to an app or space, use the heroku telemetry:add command. For more details, see the Heroku Telemetry documentation.

When using the heroku telemetry:add command, you'll need to provide your Sentry project's OTLP endpoint URL and a x-sentry-auth header with the public key. This can be found in your Sentry Project Settings under Client Keys (DSN) > OpenTelemetry (OTLP).

Copied
heroku telemetry:add ___OTLP_URL___ --app myapp --signals logs,traces --transport http --headers '{"x-sentry-auth":"sentry sentry_key=___PUBLIC_KEY___"}'

To add a telemetry drain to the entire space:

Copied
heroku telemetry:add ___OTLP_URL___ --space myspace --signals logs,traces --headers '{"x-sentry-auth":"sentry sentry_key=___PUBLIC_KEY___"}'

You can use the --signals flag to specify the signals you want to send to Sentry. Only logs and traces are supported.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").