Datadog
Observe LLM quality and cost in Datadog alongside app telemetry
Datadog broadcast emits spans with GenAI semantic attributes and usage metrics. This is useful for model-level SLOs, cost dashboards, and incident investigations.
broadcast-datadog-config.json
{
"destination": "datadog",
"enabled": true,
"api_key": "dd_...",
"ml_app": "customer-support-prod",
"url": "https://api.us5.datadoghq.com",
"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-mini",
"messages":[{"role":"user","content":"Summarize customer sentiment"}],
"user":"user_42",
"trace":{"trace_name":"Datadog Trace Check","team":"support"}
}'Verification
In Datadog, search LLM Observability traces by your `ml_app` service tag and confirm custom metadata appears in span meta.