Heroku Telemetry Drains
This guide provides step-by-step instructions for setting up Heroku Telemetry Drains to collect logs, metrics, and traces from your Heroku Private Space applications into Coralogix.
Prerequisites
- Application deployed on Heroku Private Space (Fir Generation)
- Heroku CLI installed and authenticated
- Coralogix Send-Your-Data API key
Setup Guide
Throughout this guide, you’ll see environment variables used in CLI examples. You can export these in your shell for convenience:
export HEROKU_APP_NAME="your-app-name"
export CORALOGIX_ENDPOINT="https://<your-coralogix-endpoint>"
export CORALOGIX_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
When setting the CORALOGIX_ENDPOINT
, refer to Coralogix endpoints for the OpenTelemetry ingress endpoint. See the Coralogix domain guide for instructions on identifying your account’s domain.
1. Verify Your App is Running in Private Space
Before continuing, ensure your app is running in a Private Space using the cnb
stack. Telemetry drains in Heroku are only supported for apps in Private Spaces using Fir generation stack.
Expected Example Output:
=== salty-badlands-66134
Auto Cert Mgmt: false
Dynos: web: 1
Git URL: https://git.heroku.com/salty-badlands-66134.git
Owner: team@herokumanager.com
Region: frankfurt
Repo Size: 11 MB
Space: telemetry-cx
Stack: cnb
Web URL: https://salty-badlands-66134-44dbb100043e.hydrangea-frankfurt.herokuapp.com/
2. Add Telemetry Drain to Coralogix
Now, add the application telemetry drain to send logs, metrics, and traces to Coralogix.
heroku telemetry:add $CORALOGIX_ENDPOINT --app $HEROKU_APP_NAME --headers '{"Authorization":"Bearer $CORALOGIX_API_KEY", "CX-Application-Name": "heroku-telemetry-cx", "CX-Subsystem-Name":"heroku-telemetry-cx"}'
Expected Output:
Coralogix Options:
- You may customize CX-Application-Name
and CX-Subsystem-Name
to suit your application.
Heroku Options:
- Signal filtering: Specify which signals to send, e.g., --signals logs,traces
(defaults to all).
- Transport protocol: Use --transport grpc
to switch from the default HTTP.
- Space-level drains: Add a drain at the Private Space level using --space your_space
.
For all configuration options, refer to the Heroku Telemetry Drains documentation.
3. Verify Telemetry Drain Configuration
Confirm the telemetry drain was added successfully:
Expected Example Output:
=== salty-badlands-66134 Telemetry Drains
Id Signals Endpoint
──────────────────────────────────── ─────────────────────────────── ─────────────────────────────────
bf9479d2-767a-4f84-8e7f-24d20e2c2802 [ 'traces', 'metrics', 'logs' ] https://ingress.coralogix.com:443
4. Get Detailed Telemetry Drain Information
To retrieve detailed info about a specific telemetry drain (replace the ID with your actual drain ID):
Expected Output:
=== bf9479d2-767a-4f84-8e7f-24d20e2c2802
App: salty-badlands-66134
Signals: traces, metrics, logs
Endpoint: https://ingress.coralogix.com:443
Transport: HTTP
Headers: {"Authorization":"Bearer cxtp_abc1234567891098762521712","CX-Application-Name":"heroku-telemetry-cx","CX-Subsystem-Name":"heroku-telemetry-cx"}
5. Verify Data in Coralogix Dashboard
After the telemetry drain is configured and active, you should begin seeing data in your Coralogix dashboard. Navigate to your Coralogix console view to confirm that the integration is working.
Logs![]() Search and analyze Heroku logs. | Traces![]() Visualize distributed traces. | Metrics![]() Monitor app performance metrics. |
Further Reading
- Heroku Telemetry Drains Documentation
- Heroku Generations
- Working with Heroku Private Spaces
- Coralogix Ingestion Endpoints
Support
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by sending us an email at support@coralogix.com.