Deep-dive on the Next Gen Platform. Join the Webinar!

Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Monitoring & Metrics
  • Working with Heroku Telemetry Drains

Working with Heroku Telemetry Drains

Last updated March 17, 2025

Table of Contents

  • Add a Telemetry Drain
  • Get a Drain’s ID
  • View Info for a Specific Drain
  • Remove a Telemetry Drain
  • Using Multiple Telemetry Drains
  • Additional Reading

Telemetry and observability are crucial for maintaining the health and performance of applications. Heroku’s cloud-native telemetry services make it easy to collect trace, metrics and logs from your application and forward them to archival, observability, and alerting services offered by Heroku’s telemetry add-on partners.

Heroku Telemetry Drains give you ultimate control over where to send your telemetry. You can configure multiple drains and set them up at the app or space level. This article describes how to configure them on our platform.

Add a Telemetry Drain

To add a telemetry drain to an app or space, use the heroku telemetry:add command.

For example, to add a telemetry drain to an application:

$ heroku telemetry:add https://my-endpoint.com --app myapp --signals traces,metrics --transport http --headers '{"x-sample-header":"sample-value"}'

If you don’t provide the --transport flag, we default to http.

To add a telemetry drain to the entire space:

$ heroku telemetry:add https://my-endpoint.com --space myspace --signals logs --transport grpc --headers '{"x-sample-header":"sample-value"}'

Signals

You can specify which signals you want to send to the drain by passing a comma-separated list of values. The available options are: logs, metrics, and traces. If you don’t pass a signals list, it defaults to all signals. You can mix and match the signals as you choose between telemetry drains.

# Send all signals, the default when --signals is not set

$ heroku telemetry:add https://my-endpoint.com --app myapp --signals traces,metrics,logs --transport http --headers '{"x-sample-header":"sample-value"}'

# Send only traces and metrics

$ heroku telemetry:add https://my-endpoint.com --app myapp --signals traces,metrics --transport http --headers '{"x-sample-header":"sample-value"}'

# Send only traces

$ heroku telemetry:add https://my-endpoint.com --app myapp --signals traces --transport http --headers '{"x-sample-header":"sample-value"}'

Transport Protocol Type

When configuring the transport protocol for a drain, it defines the transport protocol used to transport OTLP signals from the Heroku OpenTelemetry Collectors to the appropriate observability provider. The options are grpc and http.

Conversely, within your application the OpenTelemetry SDK is used to emit application-specific OTLP telemetry signals to the Heroku OpenTelemetry Collector. The Heroku Collector is capable of receiving telemetry from your application dynos over either transport, grpc or http.

It’s important to understand the difference between the two scenarios. For example, it’s possible for the Heroku OpenTelemetry Collectors to collect telemetry data from a Ruby application over HTTP transport, while having a drain associated to the application which exports data to an observability provider over gRPC. See OpenTelemetry Concepts and Heroku for a diagram and more info about the transport protocol types.

Headers

We expect the headers to be provided as a JSON object of key/value pairs. For example, your observability vendor may require you to authenticate with their endpoints. You can do so by specifying the Authorization header.

$ heroku telemetry:add https://my-endpoint.com --app myapp --transport http --headers '{"Authorization":"Bearer ABC123abcABC123abcABC123abcABC123"}'

It’s possible to specify more than one header, which is helpful if your chosen observability vendor requires both an API key and a dataset to store the telemetry data within.

$ heroku telemetry:add https://my-endpoint.com --app myapp --transport http --headers '{"x-api-key": "API_KEY", "x-dataset": "MY_DATASET"}'

Note that there are some providers that require no headers because the authentication or API token is embedded within the path of the endpoint URL:

$ heroku telemetry:add https://api.example-drain-example.io/somereallylongkeywhichincludesthedataset --app myapp --transport http'

Get a Drain’s ID

Pass the name of the app or space to the heroku telemetry to get a list of your drains. For example:

$ heroku telemetry -a example-app

The output lists all of the app’s (or space’s) drains, along with their drain IDs. Use this ID for other heroku telemetry commands.

View Info for a Specific Drain

To see detailed info about a specific drain, pass in the drain’s ID to heroku telemetry:info. For example:

$ heroku telemetry:info 1d093893-d620-4d43-8b6b-2c0855885d13

Updating a Telemetry Drain

You can update the details of a telemetry drain using the heroku telemetry:update command. It is possible to change the signals, update the endpoint, change the headers and even switch transports.

Any attributes of the telemetry drain that you don’t provide on the update command is left intact. For example, you can update an API key header without needing to re-specify the signals, endpoint or transport used.

The only exception is when you want to update the signals or the headers. In this case, the updated signals and headers fully replace the existing details.

For example, the following command updates the telemetry drain to emit only logs and metrics, regardless of what was previously set:

$ heroku telemetry:update 1d093893-d620-4d43-8b6b-2c0855885d13 --signals logs,metrics

Remove a Telemetry Drain

To remove a specific drain, pass in the drain’s ID to heroku telemetry:remove. For example:

$ heroku telemetry:remove 1d093893-d620-4d43-8b6b-2c0855885d13

To remove all drains for an app or a space, pass in the app or space name instead. For example:

$ heroku telemetry:remove example-space

Using Multiple Telemetry Drains

Telemetry drains are additive. For a Fir space that contains 2 applications, you can configure telemetry drain for that space that applies to both applications. You can also configure each application with its own independent telemetry drain.

Additional Reading

  • Heroku Telemetry Drains
  • OpenTelemetry Concepts and Heroku

Keep reading

  • Monitoring & Metrics

Feedback

Log in to submit feedback.

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • heroku.com
  • Terms of Service
  • Privacy (日本語)
  • Cookies
  • Cookie Preferences
  • Your Privacy Choices
  • © 2025 Salesforce.com