New Relic
Export TheRouter.ai spans to New Relic distributed tracing
New Relic integration streams TheRouter.ai trace data over OTLP with model usage, costs, finish reason, and custom metadata for NRQL queries and dashboards.
broadcast-newrelic-config.json
{
"destination": "newrelic",
"enabled": true,
"license_key": "nr_...",
"region": "us",
"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":"openai/gpt-4.1",
"messages":[{"role":"user","content":"Summarize this outage"}],
"trace":{"trace_name":"NewRelic Smoke","service":"status-bot"}
}'Verification
Query recent spans in New Relic and filter by `trace.metadata.service` or your custom `trace_name` to validate ingestion.