★ OverviewIntermediate10 min
OpenTelemetry for Agent Tracing
Vendor-agnostic observability with OpenTelemetry: instrumenting LangGraph agents with spans, tracing across multi-step workflows, and exporting to any backend.
Quick Reference
- →OpenTelemetry (OTel) is the vendor-neutral standard for distributed tracing — works with Datadog, Jaeger, Grafana, and any OTLP-compatible backend
- →Instrument each graph node as a span: capture input, output, duration, token usage, and model name as span attributes
- →Use trace context propagation to link spans across services when agents call remote APIs or other agents
- →LangChain provides OpenTelemetry callback handlers that auto-instrument LLM calls, tool invocations, and chain steps
- →Export traces to multiple backends simultaneously for redundancy and different analysis needs
Why OpenTelemetry
Vendor-neutral observability
OpenTelemetry is the CNCF standard for distributed tracing, metrics, and logs. Instrument your agent once, export to Datadog, Jaeger, Grafana Tempo, Honeycomb, or any OTLP-compatible backend. Switch vendors without changing application code.
- ▸Use OTel when you need unified observability — agents, APIs, databases, and queues in a single trace
- ▸Use LangSmith when you need LLM-specific debugging — prompt inspection, token analytics, eval datasets
- ▸Many production teams use both: OTel for infrastructure-wide traces, LangSmith for LLM-level debugging
- ▸OTel is the right choice when your org already has a tracing backend (Datadog, Jaeger) and wants agents in the same dashboards