This page configures OpenRouter to broadcast traces for all of its traffic. To instead instrument your own application’s calls to OpenRouter from Python, see OpenRouter Tracing.
How it works
OpenRouter sends Broadcast traces from its own infrastructure using OTLP over HTTP with JSON encoding. Phoenix accepts OTLP over HTTP with protobuf encoding, so you run an OpenTelemetry Collector between the two. The collector:- receives OpenRouter’s OTLP/JSON traces on a public HTTPS endpoint
- sets the Phoenix project with the
openinference.project.nameresource attribute - forwards the traces to Phoenix as OTLP/protobuf
localhost is not reachable from OpenRouter.
Launch Phoenix
The simplest option is a free Phoenix Cloud account. You can also self-host Phoenix alongside the collector. From the settings page in your Phoenix instance, copy your:- Endpoint — for Phoenix Cloud,
https://app.phoenix.arize.com/s/<your-space-name> - API key — required when authentication is enabled, as it is on Phoenix Cloud
Run an OpenTelemetry Collector
Createotel-collector-config.yaml. The bearertokenauth extension makes the collector reject requests that don’t carry your shared token, so only OpenRouter can send it traces:
otlp_http exporter appends /v1/traces to the endpoint and sends protobuf by default, which is what Phoenix expects. If your Phoenix instance doesn’t have authentication enabled, remove the headers block.
Run the collector with your Phoenix credentials and a token of your choice:
4318 on a public HTTPS URL, for example behind your cloud load balancer or a reverse proxy that terminates TLS. The rest of this page calls that URL https://<your-collector-host>.
Configure Broadcast in OpenRouter
- In the OpenRouter dashboard, navigate to Settings → Observability and toggle Enable Broadcast.
- Add the OpenTelemetry Collector destination.
-
Set the Endpoint to
https://<your-collector-host>/v1/traces. -
Set Headers to a JSON object that carries your collector token:
- Click Test Connection. OpenRouter only saves the configuration if the test passes.
- Save the destination.
- Custom metadata: the
tracefield on an OpenRouter request is sent as span attributes, so you can attach your own identifiers to each trace. - Privacy mode: enable it to exclude prompt and completion content from broadcast traces; metadata and usage data are still sent.
Observe
Once Broadcast is enabled, every request through OpenRouter is exported to Phoenix. Open theopenrouter project, or the name you set in the collector’s resource/phoenix_project processor, to see traces appear shortly after activity. Each trace includes the model, prompt, response, token usage, and latency for the request.
Troubleshooting
- Test Connection fails. Confirm the collector is reachable at the public HTTPS URL, the endpoint ends in
/v1/traces, and theAuthorizationheader matchesCOLLECTOR_TOKEN. - Test Connection passes but no traces appear in Phoenix. Check the collector logs for export errors. Confirm
PHOENIX_COLLECTOR_ENDPOINTis your Phoenix base URL without/v1/traces, and thatPHOENIX_API_KEYis valid. - Traces land in the
defaultproject. Confirm theresource/phoenix_projectprocessor is listed in the traces pipeline.

