Why does OpenTelemetry's GenAI semantic convention spec matter for choosing an observability stack in 2026?
Explain why OpenTelemetry's GenAI semantic convention spec matters for picking an observability stack in 2026, and what specifically you lose by going with a proprietary surface like LangSmith instead.
OTel's GenAI conventions standardise LLM-trace attribute names so any conformant backend reads them. Instrument once, switch vendors via exporter config, dodge proprietary lock-in.
Imagine every electrician used a different colour code for live, neutral, and earth wires. To swap from one electrician to another, you'd have to rewire every socket in the house. Then everyone agreed on a shared colour code, black, red, green, and now any electrician can plug into any house and read the wires correctly. OpenTelemetry's GenAI conventions are that shared colour code for LLM traces. Once your code emits standard attribute names, any monitoring vendor that reads OpenTelemetry can use your traces. If you instead used a vendor whose colours only their own electricians can read, leaving them means rewiring the house.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Observability for LLM applications was a vendor by vendor mess through 2023 and most of 2024. Every tracer, LangSmith, Helicone, Arize Phoenix, Langfuse, Datadog, had its own trace shape, its own SDK, its own dashboard. Switching vendors meant a re-instrumentation pass over the entire codebase.
In late 2024 and through 2025, the OpenTelemetry community stabilised the GenAI semantic conventions, and the major LLM-observability vendors converged on supporting them. In 2026, this convergence is the single most consequential observability decision a team can get right or wrong. This deep dive covers what the conventions standardise, why the trace format is the real lock-in (not the dashboard), the two leading conformant instrumentation libraries, and why LangSmith is the conspicuous proprietary outlier.
What the GenAI conventions actually standardise
The OTel GenAI semantic conventions define a vocabulary for LLM-related spans: which attribute names go on which span, what values they carry, what operations exist, and how prompt/completion content is captured as events.
Core span attributes
gen_ai.system. The provider identifier. Values include openai, anthropic, google.gemini, aws.bedrock, azure.openai, mistral, and cohere.gen_ai.request.model. The model id requested by the call (for example gpt-5.5, claude-sonnet-4-6, gemini-3.1-pro).gen_ai.response.model. The model id the provider actually served (sometimes differs after routing).gen_ai.request.max_tokens,gen_ai.request.temperature,gen_ai.request.top_p,gen_ai.request.frequency_penalty. Call parameters.gen_ai.usage.input_tokens,gen_ai.usage.output_tokens. Token accounting.gen_ai.response.finish_reasons. Array of finish reasons from the provider.gen_ai.response.id. The provider's response id, useful for correlating with provider-side logs.
Operation names
Spans set gen_ai.operation.name to one of: chat, text_completion, embeddings, or tool_call. This is what backends key off to render the right per-operation views.
Content events
Prompt content and completion content are not span attributes (they would be too large and too sensitive). They're emitted as span events such as gen_ai.user.message, gen_ai.system.message, gen_ai.assistant.message, gen_ai.tool.message, and gen_ai.choice. Each event carries the message role and content as structured fields.
Content capture is gated behind a flag (OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT) so regulated workloads can disable it without losing the structural traces.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
# Emit OTel GenAI traces from LangChain without LangSmith lock-in
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from openinference.instrumentation.langchain import LangChainInstrumentor
provider = TracerProvider()
provider.add_span_processor(
BatchSpanProcessor(
OTLPSpanExporter(endpoint="https://your-backend/v1/traces")
)
)
trace.set_tracer_provider(provider)
# One line wires LangChain to emit OTel GenAI conventions on every call
LangChainInstrumentor().instrument()
# Now switch backends by changing the exporter endpoint: Langfuse, Phoenix,
# Datadog, Honeycomb, Grafana Tempo all parse the same trace shape.| Aspect | OTel GenAI conventions | LangSmith (proprietary) |
|---|---|---|
| Trace format | Open spec, vendor-neutral | Proprietary, LangChain-coupled |
| Backend portability | Langfuse, Phoenix, Datadog, Honeycomb, Tempo | LangSmith only |
| Instrumentation effort | Once, with OTel SDK or OpenInference/OpenLLMetry | Implicit via LangChain callbacks |
| Cost to switch backend | Exporter config change | Full re-instrumentation |
| Best fit | Multi-vendor or open-source observability | Teams committed to LangChain + LangSmith ecosystem |
Real products, models, and research that use this idea.
- Langfuse natively ingests OTel GenAI conventions and renders the standard attributes (system, model, token counts, finish reasons) without per-vendor mapping.
- Arize Phoenix is OTel-native and uses the GenAI conventions as its primary trace format, with OpenInference as the complementary spec for LLM-specific events.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you migrate an existing LangChain + LangSmith codebase to OTel GenAI conventions?
Add OpenInference's LangChain instrumentor, point its exporter at your OTel collector, run both LangSmith and OTel in parallel for validation, then disable LangSmith default callbacks once the OTel traces are validated.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Treating observability vendor choice as a dashboard decision rather than a trace-format decision. And discovering, when migration is needed, that the trace shape itself is the lock-in.
60 second bullets to scan on the way to the call.
What the GenAI conventions standardise (attribute names + operations + events)
Five specific gen_ai.* attributes and what they carry
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.