Grafana
Send TheRouter.ai traces into Grafana Tempo via OTLP
Grafana integration uses OTLP HTTP. Once configured, traces are queryable with TraceQL and can be combined with logs/metrics in Grafana dashboards.
broadcast-grafana-config.json
{
"destination": "grafana",
"enabled": true,
"base_url": "https://otlp-gateway-prod-us-west-0.grafana.net",
"instance_id": "123456",
"api_key": "glc_...",
"sampling_rate": 1
}cURL
curl https://api.therouter.ai/v1/chat/completions -H "Authorization: Bearer $THEROUTER_API_KEY" -H "Content-Type: application/json" -H "X-TheRouter.ai-Broadcast: true" -d '{
"model":"anthropic/claude-sonnet-4.5",
"messages":[{"role":"user","content":"Generate release summary"}],
"trace":{"trace_name":"Grafana Integration Test","environment":"staging"}
}'Use OTLP gateway URL
Configure the OTLP gateway endpoint, not your main Grafana UI URL. Wrong endpoints are the most common cause of connection-test failures.