AI Wisdom

OpenTelemetry for AI

Using OpenTelemetry semantic conventions to trace and instrument LLM systems for observability.

In this article

OpenTelemetry (OTel) is the emerging standard for instrumenting AI/LLM applications. The OpenTelemetry Semantic Conventions for GenAI define standard span attributes: gen_ai.system (e.g., openai), gen_ai.request.model, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens, and gen_ai.prompt. Libraries like opentelemetry-instrumentation-openai, OpenLLMetry (Traceloop), and @arizeai/openinference provide automatic instrumentation. OTel traces can be routed to any OTLP-compatible backend (Datadog, Grafana Tempo, Jaeger, LangSmith, Phoenix), enabling vendor-neutral observability.

What it means in practice

OpenTelemetry for AI is not just vocabulary; it is a design handle. In AI observability, this term usually appears when engineers are designing, reviewing, or troubleshooting real production flows rather than only naming the concept. It becomes important after launch, when teams need evidence about quality, cost, regressions, and user-visible reliability.

Why engineers care

  • It gives teams a shared name for the behaviour, risk, or architecture choice being discussed.
  • It helps separate the goal from the implementation detail, so you can compare alternatives instead of copying a tool pattern blindly.
  • It creates a useful checklist for reviews: inputs, outputs, failure modes, ownership, cost, latency, and measurement.

Production watch-outs

Avoid vanity metrics. Prefer measurements tied to user outcomes, regression prevention, incident response, and known quality risks.

Related context

Useful neighbouring concepts: Langsmith, Phoenix, LLM Evaluation.

Discussion

Sign in to share your feedback and join the discussion.