OpenTelemetry | Honeycomb

We use cookies or similar technologies to personalize your online experience & tailor marketing to you. Many of our product features require cookies to function properly.

Read our privacy policy I accept cookies from this site

OpenTelemetry

Honeycomb supports OpenTelemetry, the CNCF open standard for sending tracing and metrics data, in a few different forms. If your application is already instrumented for OpenTelemetry, you can send OTLP data directly to Honeycomb’s endpoint. Read more about instrumenting with OpenTelemetry.

Honeycomb supports receiving telemetry data via OpenTelemetry’s native protocol, OTLP, over gRPC and HTTP/protobuf. Currently supported versions of OTLP protobuf definitions are 0.7.0 through 0.16.0 for traces, and 0.7.0 through 0.11.0 for metrics.

If a system is already instrumented with OpenTracing, OpenCensus, Zipkin, or Jaeger, you might want to use an OpenTelemetry Collector to export your data to Honeycomb.

If you are instrumenting code for the first time, you can use one of Honeycomb’s OpenTelemetry Distributions.

About Honeycomb OpenTelemetry Distributions 

Honeycomb’s OpenTelemetry Distributions wrap an OpenTelemetry SDK and provide more features in addition to what the SDK already gives you:

  • Additional configuration options for instrumentation based on common ways to configure applications
  • Compatibility with any of your existing OpenTelemetry instrumentation
  • Deterministic sampling for spans, configurable to your preferred sampling rate. (Defaults to a sample rate of 1.0)
  • Multi-span attributes. This gives you automatic propagation of span attributes, so you can add attributes to a span and have it propagate down on all child spans.

We currently support distributions for Java and .NET.

Instrumenting with OpenTelemetry 

Select your application’s language for instructions on instrumenting with OpenTelemetry:

Using the Honeycomb OpenTelemetry Endpoint 

If you are not using an OpenTelemetry Distribution, you can send data to Honeycomb directly over OTLP with an OpenTelemetry SDK or the OpenTelemetry Collector.

In general, any OpenTelemetry integration should carry out these two steps:

  • Set the endpoint:
    • If using OTLP/gRPC, set OTEL_EXPORTER_OTLP_ENDPOINT to: api.honeycomb.io:443
    • If using OTLP/HTTPS, set OTEL_EXPORTER_OTLP_ENDPOINT to: https://api.honeycomb.io
  • Configure:
    • Set the x-honeycomb-team header with your API key
    • Set the name of your service specified as the service.name resource attribute

When using the OTEL_EXPORTER_OTLP_ENDPOINT environment variable with an SDK and an HTTP exporter, the final path of the endpoint is actually modified by the SDK to represent the specific signal being sent.

For example, when exporting trace data, the endpoint is updated to append v1/traces. When exporting metrics data, the endpoint is updated to append v1/metrics. The same modification is not necessary for gRPC.

By setting OTEL_EXPORTER_OTLP_ENDPOINT to https://api.honeycomb.io, traces are sent to https://api.honeycomb.io/v1/traces and metrics to https://api.honeycomb.io/v1/metrics.

export OTEL_EXPORTER_OTLP_ENDPOINT=https://api.honeycomb.io

If the desired outcome is to send data to a different endpoint depending on the signal, use OTEL_EXPORTER_OTLP_<SIGNAL>_ENDPOINT instead of the more generic OTEL_EXPORTER_OTLP_ENDPOINT.

When using a signal-specific environment variable, these paths must be appended manually. Set OTEL_EXPORTER_OTLP_TRACES_ENDPOINT for traces, appending the endpoint with v1/traces, and OTEL_EXPORTER_OTLP_METRICS_ENDPOINT for metrics, appending the endpoint with v1/metrics.

Send both traces and metrics to Honeycomb using this method by setting the following variables:

export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://api.honeycomb.io/v1/traces
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://api.honeycomb.io/v1/metrics

More details about endpoints and signals can be found in the OpenTelemetry Specification.

Did you find what you were looking for?