Send OpenRouter traces to Noveum
Forward every OpenRouter request to Noveum with OpenRouter Broadcast and the OTLP trace endpoint, with no code changes.
OpenRouter Broadcast can forward a trace of every request your OpenRouter API keys make. Point its OpenTelemetry Collector destination at Noveum and each request lands in Project Traces with its model, provider, token usage, cost, prompt, and completion.
No SDK or code change is needed in the application.
Configure the destination
-
Create a Noveum API key with permission to write traces.
-
In OpenRouter, open Settings > Observability and turn on Enable Broadcast.
-
Edit the OpenTelemetry Collector destination and enter:
-
Endpoint:
https://api.noveum.ai/api/v1/otlp/v1/traces -
Headers:
Code { "Authorization": "Bearer YOUR_NOVEUM_API_KEY", "x-noveum-project": "openrouter" }
-
-
Click Test Connection, then save.
-
Send a request through OpenRouter and open the project in Project Traces.
The same endpoint and headers also work with OpenRouter's Webhook destination. Keep its method set to POST.
Choose the project and environment
| Header | Effect |
|---|---|
x-noveum-project | Project that receives the traces. Without it, traces go to a project named after the OTLP service.name, which is openrouter for Broadcast. Projects are created on first use. |
x-noveum-environment | Environment for every trace. Without it, Noveum uses the environment key of the request's trace object, then production. |
Use one destination per project, or set trace.environment in each OpenRouter request to separate environments within one project.
What Noveum stores
Each OTLP span becomes a Noveum span, and the spans of one trace ID in one delivery become one Noveum trace. OpenRouter delivers each request separately, so each OpenRouter request becomes its own trace. Every attribute OpenRouter sends is kept. Noveum also copies the OpenTelemetry GenAI attributes onto the names its dashboards read:
| OpenRouter attribute | Noveum attribute |
|---|---|
gen_ai.response.model, gen_ai.request.model | llm.model |
gen_ai.provider.name, gen_ai.system | llm.provider |
gen_ai.usage.input_tokens, gen_ai.usage.prompt_tokens | llm.usage.input_tokens |
gen_ai.usage.output_tokens, gen_ai.usage.completion_tokens | llm.usage.output_tokens |
gen_ai.usage.total_tokens | llm.usage.total_tokens |
gen_ai.usage.total_cost, gen_ai.usage.cost | llm.cost.total |
gen_ai.prompt, span.input | llm.prompt |
gen_ai.completion, span.output | llm.completion |
Prompt and completion content is stored once, as llm.prompt and llm.completion. Identical copies under gen_ai.prompt, span.input, gen_ai.completion, and span.output are not stored again.
The request's user and session_id become the trace's user and session, and keys in the request's trace object are stored as trace metadata.
Grouped requests
When several OpenRouter requests share a trace.trace_id, each request is still stored as its own Noveum trace. Its ID is the OpenTelemetry trace ID followed by the request's root span ID, and the original ID is kept in the trace attribute otel.trace_id. Use session_id or otel.trace_id to find every request in a workflow. Redelivery of the same request maps to the same trace and is not stored twice.
OpenRouter's Privacy Mode removes prompts and completions before they leave OpenRouter. Token usage, cost, timing, and metadata still arrive. Turn it on when request content must not be stored in Noveum.
Use the endpoint from other OpenTelemetry exporters
The endpoint accepts any OTLP/HTTP trace export with JSON encoding, optionally gzip compressed. Set the exporter's traces endpoint to https://api.noveum.ai/api/v1/otlp/v1/traces and send the same Authorization header. Protobuf and gRPC encodings are not supported and return 415. Exporters that send one trace in several batches produce one Noveum trace per batch, linked by otel.trace_id. When an OpenTelemetry Collector sits in front of the endpoint, keep its batch processor at about 500 spans per export so each request stays under the limits below.
Limits and responses
| Response | Meaning |
|---|---|
200 | Spans were accepted and queued, and the body is {}. Spans without a valid traceId (32 hex characters), spanId (16 hex characters) or startTimeUnixNano are dropped, and the body is then an OTLP partial success whose partialSuccess.rejectedSpans counts them, even when every span was dropped. An empty export, such as the connection test, returns {}. |
400 | The body is not valid UTF-8, JSON or OTLP, a gzip body cannot be decoded, or the export holds more than 1,000 traces. |
401 or 403 | The API key is missing, invalid, or cannot write traces. |
413 | The decompressed body is larger than 32 MiB, contains more than 250,000 JSON values, or is nested more than 32 levels deep. Resource attributes are copied onto every trace, so an export also gets 413 when its resource attributes multiplied by its span count exceed 32 MiB, or when the converted traces would exceed 32 MiB. |
415 | The body is protobuf or gRPC. |
429 | The API key sent more than 6,000 exports in a minute, or the organization's span quota is exhausted. |
500 | Noveum could not queue the spans. |
Requests are processed asynchronously, so a trace can take a short time to appear. OpenRouter does not retry failed deliveries, so traces rejected with 429 or 413 are not recovered. Use a separate API key per high-volume OpenRouter workspace to give each its own rate limit.