Docs
DocumentationQuery ReferenceAPI Reference
Open Console→→
DocumentationQuery ReferenceAPI Reference

Platform overview

What is Axiom?QuickstartArchitectureFeatures
Fundamentals
Datasets
Edge deployments
Limits
Performance
Optimize usage
Requirements
Semantic conventions
Glossary
Tour
SecurityRoadmap

Send data

Reference architecturesMethods

Understand data

Console
Query
Builder
Editor
Query results
Visualize
Traces
Metrics
Correlations
Save queries
Stream
Dashboard
Create
Elements
Create
Configure
Element types
Gauge
Heatmap
Log stream
Monitor list
Note
Pie chart
Scatter plot
Statistic
Table
Time series
Sections
Configure
Filter
Monitor
Overview
View status
Configure
Examples
Monitor types
Anomaly
Match
New values
Threshold
Alerting
Overview
Configure
Notifier types
Amp
ChatGPT Workspace Agent
Claude Code
Cursor
Custom Webhook
Discord
Email
incident.io
Jira Service Management
Microsoft Teams
Opsgenie
PagerDuty
Slack
Annotations
Command Menu
Manage
Datasets
Overview
Views
Virtual fields
Access
RBAC
Tokens
CLI
Organization
Labels
Audit log
Settings
Usage and billing
Profile
Extend
Overview
AWS Lambda
AWS PrivateLink
Cloudflare Workers
Cloudflare Logpush
Convex
Grafana
Hex
Netlify
Supabase
Tailscale
Terraform
Unkey
Vercel
Intelligence
Overview
Spotlight
AI agents
Overview
MCP Server
Overview
Tools
Query cost limits
Agent-created orgs
Skills
Overview
Axiom alerting
Build dashboards
Control costs
SRE
Translate SPL to APL
Splunk
Overview
Splunk app
Install and configure
Commands
Examples
Portal
How it works
Set up standard mode
Set up transparent mode
Observability Cloud
OCSF data
OCSF as CIM
SPL command support
Examples
Monitor and troubleshoot

Use cases

ObservabilityProduct analytics
OCSF security data
Overview
Send data
Query data
LLM observability
Overview
Use Vercel AI SDK
Manual instrumentation
OpenAI Agents SDK
GenAI attributes
Redaction policies

Miscellaneous

LLMs
Overview
List of docs pages
Full docs
Query reference
FAQs
Legal
Acceptable use policy
Axiom for Startups terms
Committed use terms
Cookies
Data processing
HIPAA
Partner agreement
Partner program guide
Privacy policy
SLA
Terms of service
Terms of use

Send data from Heroku to Axiom

This page explains how to send traces, logs, and metrics from Heroku Fir apps with telemetry drains, and logs from Heroku Cedar apps with log drains.

Heroku runs apps on two platform generations, and each generation has its own way to export data. For more information, see Heroku generations.

Heroku generationMethodSignalsAxiom edge deployments
FirTelemetry drains over OpenTelemetry (OTLP)Traces, logs, and metricsAll
CedarLog drainsLogsUS East 1 (AWS) only

Use the method that matches the generation of your app or space. Heroku supports telemetry drains only on Fir, and HTTPS log drains only on Cedar. For more information, see Log drains in the Heroku documentation.

Send telemetry from Fir apps

Use Heroku Telemetry Drains to send OpenTelemetry traces, logs, and metrics from Fir apps and spaces to Axiom. Heroku collects telemetry from the platform, such as router logs and dyno metrics, and OpenTelemetry signals that your app emits, and exports them in batches to each drain. For more information, see OpenTelemetry concepts and Heroku.

How telemetry drains map to Axiom datasets

Each telemetry drain has one endpoint, one set of headers, and a list of signals:

  • With the default http transport, the drain exports OTLP over HTTP to the endpoint you specify as a base URL. Heroku appends the path for each signal, so traces go to /v1/traces, logs to /v1/logs, and metrics to /v1/metrics. Don’t add a path to the endpoint.
  • The headers apply to every signal that the drain sends.

Axiom stores each OpenTelemetry signal in its own dataset. Traces and logs each name their dataset in the X-Axiom-Dataset header, and metrics go to a metrics dataset named in the X-Axiom-Metrics-Dataset header. Because a drain sends the same X-Axiom-Dataset value with traces and logs, create one drain for each signal. Drains are additive, so all three drains receive telemetry from the same app or space.

Info

Axiom accepts OTLP over HTTP only. Use --transport http, which is the Heroku default. Don’t use --transport grpc.

Prerequisites

  • Create an Axiom account.
  • Create datasets in Axiom: one for traces and one for logs with the Events type, and one for metrics with the Metrics type. If you don’t send a signal, skip its dataset.
  • Create an API token in Axiom with permissions to ingest data to these datasets.
  • Download and install the Heroku CLI.
  • Create a Fir-generation app or space on Heroku. For more information, see Heroku generations.

Add telemetry drains

shell
heroku telemetry:add https://AXIOM_DOMAIN \
  --app HEROKU_APPLICATION_NAME \
  --signals traces \
  --transport http \
  --headers '{"Authorization":"Bearer API_TOKEN","X-Axiom-Dataset":"TRACES_DATASET_NAME"}'
shell
heroku telemetry:add https://AXIOM_DOMAIN \
  --app HEROKU_APPLICATION_NAME \
  --signals logs \
  --transport http \
  --headers '{"Authorization":"Bearer API_TOKEN","X-Axiom-Dataset":"LOGS_DATASET_NAME"}'
shell
heroku telemetry:add https://AXIOM_DOMAIN \
  --app HEROKU_APPLICATION_NAME \
  --signals metrics \
  --transport http \
  --headers '{"Authorization":"Bearer API_TOKEN","X-Axiom-Metrics-Dataset":"METRICS_DATASET_NAME"}'
Info

Replace AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.

Replace API_TOKEN with the Axiom API token you have generated.

Replace TRACES_DATASET_NAME, LOGS_DATASET_NAME, and METRICS_DATASET_NAME with the names of the Axiom datasets for traces, logs, and metrics.

Replace HEROKU_APPLICATION_NAME with the name of the Heroku app.

To send telemetry from every app in a Fir space, replace --app HEROKU_APPLICATION_NAME with --space HEROKU_SPACE_NAME in each command. Space drains also apply to apps that you create in the space later.

To check the drains, run heroku telemetry --app HEROKU_APPLICATION_NAME. The output lists the ID of each drain. To see the configuration of one drain, run heroku telemetry:info DRAIN_ID.

After Heroku exports the first batch, you see traces, logs, and metrics in the Axiom datasets. To explore them, see Explore traces and Metrics.

Update or remove telemetry drains

To rotate the API token, update the headers of each drain:

shell
heroku telemetry:update DRAIN_ID \
  --headers '{"Authorization":"Bearer NEW_API_TOKEN","X-Axiom-Dataset":"TRACES_DATASET_NAME"}'

The --headers value replaces all existing headers of the drain, so include the dataset header in every update. Heroku leaves the attributes that you don’t specify unchanged.

To remove a drain, run heroku telemetry:remove DRAIN_ID.

For more information about these commands, see Working with Heroku Telemetry Drains.

Send logs from Cedar apps

Use Heroku Log Drains to send logs from your Cedar apps to Axiom.

Warning

With Heroku Log Drains, you can only send data to the US East 1 (AWS) edge deployment. For more information, see Edge deployments.

Prerequisites

  • Create an Axiom account.
  • Create a dataset in Axiom where you send your data.
  • Create an API token in Axiom with permissions to ingest data to the dataset you have created.
  • Create an account on Heroku.
  • Download and install the Heroku CLI.
  • Create a Heroku app.

Add a log drain

shell
heroku drains:add "https://axiom:API_TOKEN@api.axiom.co/v1/datasets/DATASET_NAME/ingest" -a HEROKU_APPLICATION_NAME
Info

Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.

Replace DATASET_NAME with the name of the Axiom dataset where you send your data.

Replace HEROKU_APPLICATION_NAME with the name of the Heroku app.

Was this page helpful?
Suggest edits on GitHub
On this page
Send telemetry from Fir appsHow telemetry drains map to Axiom datasetsPrerequisitesAdd telemetry drainsUpdate or remove telemetry drainsSend logs from Cedar appsPrerequisitesAdd a log drain