OpenTelemetry Collector

Beta

Send traces to any OpenTelemetry-compatible backend

OpenTelemetry is an open-source observability framework for collecting, processing, and exporting telemetry data. OpenRouter can send traces to any backend that supports the OpenTelemetry Protocol (OTLP), including Axiom, Jaeger, Grafana Tempo, and self-hosted collectors.

Step 1: Get your OTLP endpoint and credentials

Set up your OpenTelemetry-compatible backend and obtain the OTLP traces endpoint URL along with any required authentication headers.

For Axiom:

  1. Create an Axiom account and dataset
  2. Go to Settings > API Tokens and create a new token
  3. Your endpoint is https://api.axiom.co/v1/traces
  4. You’ll need headers: Authorization: Bearer xaat-xxx and X-Axiom-Dataset: your-dataset

For self-hosted collectors:

  1. Deploy an OpenTelemetry Collector with an OTLP receiver
  2. Configure the receiver to listen on a publicly accessible endpoint
  3. Note the endpoint URL (typically ending in /v1/traces)

Step 2: Enable Broadcast in OpenRouter

Go to Settings > Broadcast and toggle Enable Broadcast.

Enable Broadcast

Step 3: Configure OpenTelemetry Collector

Click the edit icon next to OpenTelemetry Collector and enter:

  • Endpoint: Your OTLP traces endpoint URL (e.g., https://api.axiom.co/v1/traces or https://your-collector.example.com:4318/v1/traces)
  • Headers (optional): Custom HTTP headers as a JSON object for authentication

Example headers for Axiom:

1{
2 "Authorization": "Bearer xaat-your-token",
3 "X-Axiom-Dataset": "your-dataset"
4}

Example headers for authenticated collectors:

1{
2 "Authorization": "Bearer your-token",
3 "X-Custom-Header": "value"
4}

Step 4: Test and save

Click Test Connection to verify the setup. The configuration only saves if the test passes.

Step 5: Send a test trace

Make an API request through OpenRouter and view the trace in your OpenTelemetry backend.

Compatible backends

The OpenTelemetry Collector destination works with any backend that supports OTLP over HTTP, including:

  • Axiom - Cloud-native log and trace management
  • Jaeger - Distributed tracing platform
  • Grafana Tempo - High-scale distributed tracing backend
  • Honeycomb - Observability for distributed systems
  • Lightstep - Cloud-native observability platform
  • Self-hosted OpenTelemetry Collector - Route traces to multiple backends

OpenRouter sends traces using the OTLP/HTTP protocol with JSON encoding. Ensure your collector or backend is configured to accept OTLP over HTTP on the /v1/traces path.