HomeRoadmapsCloud AI Eval Day 6
Cloud AI Evaluation & Azure AI Foundry QE Β· Day 6 Β· 20 min

GenAI Telemetry, Cost & Drift Alerting
Cloud AI Evaluation & Azure AI Foundry QE β€” Day 6

Validate OpenTelemetry GenAI semantic attributes (gen_ai.*), enforce p95 latency and token-cost SLO budgets, and trigger rolling-window quality and cost drift alerts.

⚑ Runtime: Python 3.10+ Β· Offline Azure AI Foundry Simulators (unittest)πŸ›‘οΈ Cloud AI Evaluation & Foundry QE Architect
OpenTelemetry GenAIFinOpsp95 Latency SLODrift AlertingToken Budgets
About this lab

Production AI systems fail silently when prompt bloat doubles token spend or RAG index drift erodes answer quality. Today you will validate OpenTelemetry gen_ai.* spans, assert p95 latency and cost-per-1k-requests SLOs, and evaluate rolling-window drift alerts.

πŸ“¦Sample Codebase & Working Solution (Day 6)Available Now
View on GitHub

The official reference codebase for Day 6 is hosted in the repository. Clone the repository and navigate to day-6-genai-telemetry/test_genai_telemetry.py to run the working solution.

Git Clone β€” Working Solution
git clone https://github.com/777abhi/cloud-ai-eval-roadmap.git
cd cloud-ai-eval-roadmap/day-6-genai-telemetry/test_genai_telemetry.py
🏭Production Context & Enterprise Implementation
πŸ’‘ Why We Are Doing This: Standardized OpenTelemetry GenAI attributes let Azure Monitor and FinOps dashboards track cost per customer interaction alongside p95 latency and live quality scores.
🏒 Real-World Production Usecase: Continuous post-release observability and automated drift alerting for high-volume support and claims assistants.
βš™οΈ How Implemented in Production: validate_otel_genai_span enforces gen_ai.system, gen_ai.request.model, and token counts; evaluate_slo_budget and evaluate_rolling_drift catch SLO breaches and drift.
Phase 1

Run Telemetry, Cost SLO & Drift Tests

Step 1.1: Execute Day 6 Suite
Terminal β€” Day 6 Lab
npm run test:day6
Step 1.2: SLO Budget & Rolling Drift Evaluation
cloudaieval/telemetry.py
slo = evaluate_slo_budget(spans, p95_latency_ms_max=1500.0, max_cost_per_1k_requests_usd=12.0)
drift = evaluate_rolling_drift(baseline_spans, current_spans, max_quality_drop=0.25, max_cost_spike_pct=25.0)
Day 6 Key Learnings
  • Validated OpenTelemetry GenAI semantic conventions (gen_ai.system, request.model, usage tokens).
  • Enforced p95 latency and projected cost-per-1,000-requests FinOps SLO budgets.
  • Detected rolling-window quality drops and token-cost spikes before they impact customers.

🧠 Knowledge Check

Which OpenTelemetry GenAI semantic attributes are essential for attributing token spend per model deployment?