Skip to content

OpenTelemetry Protocol (OTLP)

View Markdown

Honeybadger can ingest OpenTelemetry traces, metrics, and logs directly via the OpenTelemetry Protocol (OTLP). If you’re already using OpenTelemetry to instrument your applications, you can send that data to Honeybadger Insights without changing your instrumentation code—just point your OTLP exporter at our endpoint.

The quickest way to send OpenTelemetry data to Honeybadger is by pointing your OTLP exporter at our endpoint:

Terminal window
export OTEL_EXPORTER_OTLP_ENDPOINT=https://api.honeybadger.io
export OTEL_EXPORTER_OTLP_HEADERS=X-API-Key=PROJECT_API_KEY

We accept the http/protobuf protocol, which is the default for most SDKs. See Authentication below for other ways to pass your API key.

Honeybadger accepts your project API key via either the X-API-Key header or a standard Authorization: Bearer header. Use whichever fits your exporter or collector configuration:

Terminal window
export OTEL_EXPORTER_OTLP_HEADERS=X-API-Key=PROJECT_API_KEY
Terminal window
export OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20PROJECT_API_KEY

Note that OTEL_EXPORTER_OTLP_HEADERS requires the space between Bearer and your key to be URL-encoded as %20.

Your API key is available on the API keys tab of your project settings page.

If you’re using the OpenTelemetry Collector, add an otlphttp exporter to your configuration:

exporters:
otlphttp/honeybadger:
endpoint: https://api.honeybadger.io
headers:
X-API-Key: PROJECT_API_KEY

You can also authenticate using a bearer token:

exporters:
otlphttp/honeybadger:
endpoint: https://api.honeybadger.io
headers:
Authorization: Bearer PROJECT_API_KEY

Then add otlphttp/honeybadger to your pipeline exporters.

We accept traces, metrics, and logs at the following endpoints:

SignalEndpoint
Traceshttps://api.honeybadger.io/v1/traces
Metricshttps://api.honeybadger.io/v1/metrics
Logshttps://api.honeybadger.io/v1/logs

Once your data is flowing, you can query it in Insights using BadgerQL. OpenTelemetry data appears as events with these types:

  • Traces: event_type = otel.span
  • Metrics: event_type = otel.metric
  • Logs: event_type = otel.log

For example, to view recent spans:

fields @ts, span_name::str, duration::float, status.code::str, resource.service.name::str
| filter event_type::str == "otel.span"
| sort @ts