Datadog observability specialist for AI workloads — designs monitors, APM traces, dashboards, and custom metrics for token usage, model latency, quality, and cost tracking.
Ships in frootai-deploy-infra-skills. Installing the plugin adds it to Claude Code.
Datadog observability specialist for AI workloads. Designs monitors, APM traces, dashboards, and custom metrics for token usage, model latency, quality scores, and cost tracking across AI applications.
ai.tokens.total, ai.latency.p95, ai.quality.groundedness, ai.cost.per_query — submitted via DogStatsD| Mistake | Why Wrong | Correct Approach |
|---|---|---|
| Monitors only HTTP status codes | 200 OK but hallucinated response = invisible failure | Monitor AI-specific metrics: groundedness < 0.7, latency p95 > 5s |
| Logs full prompt text to Datadog | PII exposure, massive log volume, cost explosion | Log metadata only: model, tokens, latency, correlationId — never prompt text |
| Creates one alert for all AI issues | Alert fatigue, can't prioritize | Severity-tiered: P1 (safety < 0.5), P2 (quality < 0.7), P3 (latency > 5s) |
| Uses default APM without custom spans | Can't see LLM call breakdown within a request | Custom spans: retrieval, embedding, completion, safety_check |
| No cost monitoring | Token spend spirals undetected | Custom metric ai.cost.daily with anomaly detection monitor |
from datadog import statsd
def track_ai_completion(model: str, prompt_tokens: int, completion_tokens: int,
latency_ms: float, groundedness: float, team: str):
tags = [f"model:{model}", f"team:{team}"]
statsd.increment("ai.completions.count", tags=tags)
statsd.histogram("ai.latency.ms", latency_ms, tags=tags)
statsd.gauge("ai.tokens.prompt", prompt_tokens, tags=tags)
statsd.gauge("ai.tokens.completion", completion_tokens, tags=tags)
statsd.gauge("ai.quality.groundedness", groundedness, tags=tags)
# Cost calculation
cost = calculate_cost(model, prompt_tokens, completion_tokens)
statsd.increment("ai.cost.usd", cost, tags=tags)
from ddtrace import tracer
@tracer.wrap("ai.chat_pipeline")
async def handle_chat(query: str):
with tracer.trace("ai.retrieval", service="ai-search") as span:
results = await search(query)
span.set_tag("ai.results_count", len(results))
with tracer.trace("ai.completion", service="azure-openai") as span:
response = await complete(query, results)
span.set_tag("ai.model", "gpt-4o")
span.set_tag("ai.tokens.total", response.usage.total_tokens)
span.set_tag("ai.temperature", 0.3)
with tracer.trace("ai.safety_check", service="content-safety") as span:
safety = await check_safety(response.content)
span.set_tag("ai.safety.passed", safety.passed)
return response
resource "datadog_monitor" "ai_quality_degradation" {
name = "AI Quality: Groundedness Below Threshold"
type = "metric alert"
query = "avg(last_15m):avg:ai.quality.groundedness{env:production} < 0.7"
message = "AI groundedness dropped below 0.7. Check retrieval pipeline. @slack-ai-alerts"
monitor_thresholds {
critical = 0.7
warning = 0.75
}
tags = ["service:ai-chat", "team:ai-platform", "severity:p2"]
}
resource "datadog_monitor" "ai_cost_anomaly" {
name = "AI Cost: Daily Spend Anomaly"
type = "query alert"
query = "avg(last_1d):anomalies(sum:ai.cost.usd{env:production}.as_count(), 'agile', 3) >= 1"
message = "Unusual AI spend detected. Review token usage by team. @pagerduty-finops"
tags = ["service:ai-gateway", "team:finops", "severity:p2"]
}
{
"title": "AI Operations",
"widgets": [
{"definition": {"type": "timeseries", "title": "Token Usage by Model",
"requests": [{"q": "sum:ai.tokens.total{*} by {model}", "display_type": "bars"}]}},
{"definition": {"type": "toplist", "title": "Cost by Team",
"requests": [{"q": "sum:ai.cost.usd{*} by {team}"}]}},
{"definition": {"type": "timeseries", "title": "Latency P95",
"requests": [{"q": "p95:ai.latency.ms{*} by {model}"}]}},
{"definition": {"type": "query_value", "title": "Groundedness Score",
"requests": [{"q": "avg:ai.quality.groundedness{env:production}"}]}}
]
}
ai.cost.daily with anomaly detection| Scenario | Use This Agent | Don't Use |
|---|---|---|
| Datadog monitoring for AI apps | ✅ | |
| Custom AI metrics + dashboards | ✅ | |
| Azure Monitor / App Insights | ❌ Use fai-azure-monitor-expert | |
| Prometheus / Grafana stack | ❌ Use fai-opentelemetry-expert |
| Play | How This Agent Helps |
|---|---|
| 17 — AI Observability | Datadog monitors, dashboards, APM traces |
What the agent file sets; muted values are Claude Code's defaults
7-day visitors to each agent page
@agent-frootai-deploy-infra-skills:FAI Datadog Expertfrom frootai-deploy-infra-skills
npx claudepluginhub frootai/frootai --plugin frootai-deploy-infra-skills327 agents in this plugin
AGENTSAGENTS.md — FrootAI Standalone Agents (Auto-Generated Catalog)> **GENERATED FILE — DO NOT EDIT BY HAND.** Re-run `node scripts/generate-agents-md.js` to refresh.FAI A2A ExpertAgent-to-Agent (A2A) protocol specialist — Google's agent interop standard, AgentCard discovery, task lifecycle, streaming artifacts, push notifications, and multi-agent communication patterns.FAI Accessibility ExpertAccessibility specialist — WCAG 2.2 AA/AAA compliance, ARIA 1.2 patterns, screen reader optimization, keyboard navigation, focus management, and inclusive design for AI chatbots and dashboards.Other plugins' agents for the same job