By Sagar Shankaran, Founder of CallSphere
A complete observability stack for AI voice agents — distributed tracing across STT/LLM/TTS, metrics, logs, and SLO dashboards.
Key takeaways
The worst voice-agent ticket you will ever get is "it's slow sometimes." Without proper observability you cannot tell if it was the carrier, the STT stage, the LLM first token, the tool call, or the TTS stream. With proper observability you can pull up one trace and see exactly which stage blew its budget.
This post walks through the observability stack CallSphere runs in production — distributed traces, RED metrics, structured logs, and SLO dashboards that fire alerts before customers notice.
per-call trace
│
├── span: network_in
├── span: stt
├── span: llm_first_token
├── span: tool_call (repeated)
├── span: tts_first_frame
└── span: network_out
┌─────────────┐ OTLP ┌─────────────┐
│ Voice edge │────────► │ Collector │
└─────────────┘ └──────┬──────┘
│
┌──────────────────┼──────────────────┐
▼ ▼ ▼
┌───────────┐ ┌───────────┐ ┌───────────┐
│ Traces │ │ Metrics │ │ Logs │
│ (Tempo) │ │ (Prom) │ │ (Loki) │
└───────────┘ └───────────┘ └───────────┘
│
▼
┌───────────┐
│ Grafana │
│ + alerts │
└───────────┘
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter(endpoint="collector:4317", insecure=True)))
trace.set_tracer_provider(provider)
tracer = trace.get_tracer("voice-edge")
async def handle_turn(audio):
with tracer.start_as_current_span("turn") as span:
span.set_attribute("call_id", current_call_id())
with tracer.start_as_current_span("stt") as s:
text = await stt(audio)
s.set_attribute("stt.chars", len(text))
with tracer.start_as_current_span("llm") as s:
first_token_at = None
async for token in llm_stream(text):
if first_token_at is None:
first_token_at = time.time()
s.set_attribute("llm.first_token_ms", (first_token_at - s.start_time) * 1000)
Carrier Call SID is the one ID that everyone — ops, support, legal — agrees on. Use it as the trace root so you can paste a Call SID into Grafana and get the whole pipeline.
flowchart LR
APP(["Agent or API"])
SDK["OTel SDK<br/>GenAI conventions"]
COL["OTel Collector"]
subgraph BACKENDS["Backends"]
TR[("Traces<br/>Tempo or Honeycomb")]
MET[("Metrics<br/>Prometheus")]
LOG[("Logs<br/>Loki or ELK")]
end
DASH["Grafana plus alerts"]
PAGE(["Pager"])
APP --> SDK --> COL
COL --> TR
COL --> MET
COL --> LOG
TR --> DASH
MET --> DASH
LOG --> DASH
DASH --> PAGE
style SDK fill:#4f46e5,stroke:#4338ca,color:#fff
style DASH fill:#f59e0b,stroke:#d97706,color:#1f2937
style PAGE fill:#dc2626,stroke:#b91c1c,color:#fff
from opentelemetry.trace import SpanContext, TraceFlags
def trace_id_from_call_sid(sid: str) -> int:
return int.from_bytes(hashlib.sha256(sid.encode()).digest()[:16], "big")
Rate, Errors, Duration — for every stage.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
from prometheus_client import Counter, Histogram
STT_LAT = Histogram("stt_duration_seconds", "STT stage duration", buckets=[0.05, 0.1, 0.2, 0.5, 1, 2])
LLM_FT = Histogram("llm_first_token_seconds", "LLM first-token latency", buckets=[0.1, 0.2, 0.3, 0.5, 1])
ERRORS = Counter("stage_errors_total", "Errors by stage", ["stage"])
import structlog
log = structlog.get_logger()
log.info("call_end", call_id=sid, trace_id=tid, outcome="resolved", duration_sec=184)
Use multi-window multi-burn-rate alerts so you catch fast and slow SLO burns before they become incidents.
groups:
- name: voice-slo
rules:
- alert: HighTurnLatency
expr: histogram_quantile(0.95, sum(rate(turn_duration_seconds_bucket[5m])) by (le)) > 1.2
for: 5m
labels: {severity: page}
annotations: {summary: "Turn p95 latency over 1.2s"}
CallSphere instruments its voice edge with OpenTelemetry and routes traces, metrics, and logs through a collector into Tempo, Prometheus, and Loki. Every call's Twilio SID is used as the trace root, so support tickets referencing a specific call SID pull up the full pipeline in one click. RED metrics exist for every stage of the STT → LLM → TTS pipeline powered by the OpenAI Realtime API (gpt-4o-realtime-preview-2025-06-03) at 24kHz PCM16 with server VAD.
Multi-window burn-rate alerts fire on turn latency, tool error rate, and guardrail rejection rate across all verticals — 14 healthcare tools, 10 real estate agents, 4 salon agents, 7 after-hours escalation tools, 10 plus RAG IT helpdesk tools, and the 5-specialist ElevenLabs sales pod. A GPT-4o-mini post-call pipeline produces analytics that are also exported as metrics so sentiment trends show up on the same dashboards as SRE metrics. CallSphere supports 57+ languages and maintains sub-second end-to-end latency visible in Grafana at all times.
OpenTelemetry. It decouples you from any single vendor.
Grafana is enough for most teams. Honeycomb shines for exploratory trace analysis.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
Caller number → recent calls table → Call SID → trace.
No. Trace at the event level, not the frame level.
Yes — join trace IDs to your call log and carrier CDRs.
Want full-stack observability on your voice agent? Book a demo, explore the technology page, or see pricing.
#CallSphere #Observability #OpenTelemetry #VoiceAI #SLO #Tracing #AIVoiceAgents

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
A 2026 market read on financial services and fintech SMBs across Singapore, Malaysia, the Philippines, and Indonesia — and how CallSphere AI voice and chat agents deliver multilingual, compliant, 24/7 customer conversations.
Ethiopian coffee exporters and cooperatives lose buyer enquiries across time zones. See how a CallSphere AI voice and chat agent answers international coffee buyers 24/7 in Amharic and English.
Hotels, event venues, and professional-services firms in Erbil serve guests and clients in Kurdish, Arabic, and English. CallSphere answers every call and message 24/7 and books directly.
Grenada businesses serving St George's University students and families, from rentals and clinics to tutoring and professional services, use CallSphere AI voice and chat agents to answer enquiries across every time zone and language, 24/7.
Equatorial Guinea shops, restaurants and hotels serve a mix of local and international customers who call at all hours in several languages. See how CallSphere answers every one 24/7 and books the sale or table.
A step-by-step guide for Moroccan retail and e-commerce businesses to cut COD returns, recover abandoned carts, and answer buyers in Darija, French, and English with a CallSphere AI agent.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI