OpenTelemetry Protocol (OTLP)
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.
Getting started
Section titled “Getting started”The quickest way to send OpenTelemetry data to Honeybadger is by pointing your OTLP exporter at our endpoint:
export OTEL_EXPORTER_OTLP_ENDPOINT=https://api.honeybadger.ioexport OTEL_EXPORTER_OTLP_HEADERS=X-API-Key=PROJECT_API_KEYWe accept the http/protobuf protocol, which is the default for most SDKs. See Authentication below for other ways to pass your API key.
Authentication
Section titled “Authentication”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:
export OTEL_EXPORTER_OTLP_HEADERS=X-API-Key=PROJECT_API_KEYexport OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer%20PROJECT_API_KEYNote 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.
Using the OpenTelemetry Collector
Section titled “Using the OpenTelemetry Collector”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_KEYYou can also authenticate using a bearer token:
exporters: otlphttp/honeybadger: endpoint: https://api.honeybadger.io headers: Authorization: Bearer PROJECT_API_KEYThen add otlphttp/honeybadger to your pipeline exporters.
Supported signals
Section titled “Supported signals”We accept traces, metrics, and logs at the following endpoints:
| Signal | Endpoint |
|---|---|
| Traces | https://api.honeybadger.io/v1/traces |
| Metrics | https://api.honeybadger.io/v1/metrics |
| Logs | https://api.honeybadger.io/v1/logs |
Querying your data
Section titled “Querying your data”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