Set up OpenRouter Beta
OpenRouter sends traces with its Broadcast feature. You set it up in the OpenRouter dashboard. Your app doesn't change.
1. Find your project secret
- Sign in to WildEdge and open the project that should receive the events.
- Open API Keys and select Reveal DSN on a project key.
The DSN looks like this:
https://<secret>@ingest.wildedge.dev/<key>The part between https:// and @ is your project secret. You need only the secret.
Protect the secret
Anyone with the secret can send events to your project. Keep it in your secret store, not in source control. Use a separate project key for the gateway, so you can revoke it without affecting your apps.
2. Add WildEdge as a Broadcast destination
In OpenRouter, open Settings → Observability and turn on Enable Broadcast.
Edit the OpenTelemetry Collector destination.
Set Endpoint to the full traces URL:
texthttps://ingest.wildedge.dev/api/otlp/v1/tracesSet Headers to:
json{"X-Project-Secret": "<secret>"}Turn on Privacy Mode. Without it, each export carries the full prompt and response, which WildEdge keeps as the event's summaries. WildEdge also rejects exports over 2 MB.
Select Test Connection, then save. The test doesn't create an event.
3. Check that events arrive
Send one request through OpenRouter with the API key you use in your app. Open Events in WildEdge. Events appear within a few minutes, one inference event per request.
What you get
gatewayandmodel_providerare bothopenrouter, because OpenRouter is the API you call and pay. The provider that served the call, for exampleazure, isn't a column yet.model_nameis OpenRouter's model ID, for exampleopenai/gpt-4o-mini.reported_cost_amountis what OpenRouter charged, in USD, soreported_cost_is_estimatedisfalse. A stream your app cancels is charged, and its event is marked as failed.request_idis OpenRouter's generation ID, the one shown in its activity log.- Time to first token is recorded on every call, streamed or not. It's how long the model took to start answering, measured by OpenRouter.
See Query gateway events for the columns and an example query.
Known limitations
- Fallbacks. Each request is one event, for the model and provider that answered. Attempts that failed before a fallback aren't recorded.
- Requests OpenRouter rejects before routing, for example with an unknown model ID. OpenRouter sends no trace for them.
Retries
OpenRouter retries failed deliveries from a queue. It doesn't document for how long.
Troubleshooting
OpenRouter saves a destination only after Test Connection passes. If it fails, check that the endpoint ends in /v1/traces and that the header is valid JSON. See status codes for what each HTTP status means.
Next
- Investigate events and traces, or connect your AI agent to do it for you.
- Also using a WildEdge SDK? Follow App + gateway so each call is recorded once.