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 setting these environment variables:
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.
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_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