OpenTelemetry Collector
Send traces to any OpenTelemetry-compatible backend
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.
Set up your OpenTelemetry-compatible backend and obtain the OTLP traces endpoint URL along with any required authentication headers.
For Axiom:
https://api.axiom.co/v1/tracesAuthorization: Bearer xaat-xxx and X-Axiom-Dataset: your-datasetFor self-hosted collectors:
/v1/traces)Go to Settings > Observability and toggle Enable Broadcast.

Click the edit icon next to OpenTelemetry Collector and enter:
https://api.axiom.co/v1/traces or https://your-collector.example.com:4318/v1/traces)Example headers for Axiom:
Example headers for authenticated collectors:
Click Test Connection to verify the setup. The configuration only saves if the test passes.
Make an API request through OpenRouter and view the trace in your OpenTelemetry backend.
The OpenTelemetry Collector destination works with any backend that supports OTLP over HTTP, including:
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.
Custom metadata from the trace field is sent as span attributes in the OTLP payload. How this metadata appears depends on your downstream backend.
Custom metadata keys are included as span attributes under the trace.metadata.* namespace. For example, environment from the trace field becomes trace.metadata.environment in the OTLP payload.
Standard GenAI semantic conventions (gen_ai.*) are used for model, token usage, and cost attributes.
user field maps to user.id in span attributessession_id field maps to session.id in span attributesparent_span_id lets you link OpenRouter traces to your application’s existing distributed tracesWhen Privacy Mode is enabled for this destination, prompt and completion content is excluded from traces. All other trace data — token usage, costs, timing, model information, and custom metadata — is still sent normally. See Privacy Mode for details.