OpenTelemetry GenAI semantic conventions define attributes and operations for recording model calls, tool calls and agent activity with OpenTelemetry. Exporting those spans over OTLP does not guarantee that another backend will recognize their messages or token counts.
In the November 26, 2026 test reported here, OpenInference model calls reached a local Laminar stack with their attributes intact, but Laminar classified them as generic spans. Phoenix parsed them. Modern OpenLLMetry model calls worked in both, while its Traceloop-specific agent and tool kinds did not.
The useful choice is a convention, version and content encoding your destination backends understand. This guide compares those choices and shows how to check what survives a switch.
The short answer: prefer supported GenAI attributes
For new backend-neutral model-call instrumentation, prefer OpenTelemetry GenAI attributes that your intended backends parse. GenAI has the broadest documented reach across the products examined here. That does not mean every backend implements the latest specification or recognizes every agent operation.
Keep your exporter configuration separate from instrumentation. A vendor SDK can emit portable OpenTelemetry spans; avoiding vendor SDKs alone does not establish portability.
Existing instrumentation may already provide what you need:
- OpenLLMetry migrated its main model-call instrumentations to GenAI attributes during 2026. Its agent and workflow decorators still use Traceloop-specific attributes.
- OpenInference offers experimental GenAI dual-writing through OPENINFERENCE_ENABLE_GENAI_SEMCONV. Python supports it; JavaScript support applies to spans created through OITracer.
- OpenTelemetry's own instrumentations emit GenAI attributes, but their defaults can follow older convention versions.
GenAI remains marked Development. Pin your instrumentation and check a representative trace after upgrades. If your existing OpenInference pipeline serves you well, test dual-writing before replacing it. Evaluations, datasets and saved platform workflows require a separate migration plan.
What OTLP carries, and what a backend interprets
OTLP carries trace IDs, parent relationships, timings, status and attributes. It gives you a common export protocol, not a guarantee that every destination retains every span or attribute. Sampling, ingestion limits and product-specific filtering still apply.
A backend then interprets recognized attributes to derive:
- Operation type: model call, tool execution, agent run or retrieval.
- Model and usage: model identity and input, output or cached tokens.
- Conversation: messages and tool calls reconstructed from their encoded fields.
- Cost: a supplied value or a calculation using model pricing.
The current GenAI registry defines no cost attribute. Token portability therefore does not establish cost parity.
A backend may preserve attributes without interpreting them. That happened with OpenInference in Laminar: raw data remained queryable, but the derived model, token and message fields were empty.
One model call in three attribute layouts
The figure and table describe the tested OpenAI instrumentations, including OpenLLMetry 0.63.1. OpenLLMetry is no longer a wholly separate model-call vocabulary: this version emits GenAI message attributes.
The workload was a shipping-support agent answering a parcel-status request and calling get_shipment_status.
| Field | OTel GenAI | OpenInference | OpenLLMetry 0.63.1 |
|---|---|---|---|
| Model-call type | gen_ai.operation.name=chat | openinference.span.kind=LLM | gen_ai.operation.name=chat |
| Model | gen_ai.request.model | llm.model_name | gen_ai.request.model |
| Provider | gen_ai.provider.name | llm.provider, llm.system | gen_ai.provider.name |
| Input messages | gen_ai.input.messages | llm.input_messages.{i}.message.* | gen_ai.input.messages |
| Output messages | gen_ai.output.messages | llm.output_messages.{i}.message.* | gen_ai.output.messages |
| Input tokens | gen_ai.usage.input_tokens | llm.token_count.prompt | gen_ai.usage.input_tokens |
| Tool operation | execute_tool | TOOL | traceloop.span.kind=tool |
| Agent operation | invoke_agent | AGENT | traceloop.span.kind=agent |
Some older OpenLLMetry releases and current packages use indexed attributes such as gen_ai.prompt.0.content. Those names are not the current official message convention. Check the individual instrumentation, not just the OpenLLMetry project name.
Message shape matters too
The tested GenAI instrumentation encoded this input as a JSON string in gen_ai.input.messages; Jaeger retained it:
[
{"role": "system", "parts": [{"type": "text", "content": "You are a shipping support agent. Use tools to check parcels."}]},
{"role": "user", "parts": [{"type": "text", "content": "Where is my parcel 1Z999AA10123456784? It was due yesterday."}]}
]
The response represented the tool call as a typed part in gen_ai.output.messages. OpenInference instead flattened messages and tool calls into indexed fields:
llm.input_messages.0.message.role = system
llm.input_messages.0.message.content = You are a shipping support agent...
llm.input_messages.1.message.role = user
llm.output_messages.0.message.tool_calls.0.tool_call.function.name = get_shipment_status
A parser needs to understand both the attribute names and their value structure. Matching a familiar prefix is insufficient.
Convention stability and current emitters
OpenTelemetry GenAI
GenAI conventions moved out of the main OpenTelemetry semantic-conventions repository in June 2026. The dedicated repository's first release, v0.1.0, appeared on November 21, 2026 and remains Development.
Its changelog includes material compatibility changes: schema-defined message attributes must use structured values rather than JSON strings, and gen_ai.usage.cache_creation.input_tokens became gen_ai.usage.cache_write.input_tokens. The release also removed older stability-opt-in transition guidance.
Instrumentation can lag that specification. The tested opentelemetry-instrumentation-openai-v2 2.4b0 defaults to v1.30 conventions without content capture. Its latest-experimental mode emitted newer message attributes, but still used JSON strings. That test establishes compatibility with those emitted values, not complete v0.1.0 conformance.
The specification now covers retrieval, memory, planning and agent-to-agent operations. Backend support for those operations varies.
OpenInference
OpenInference is Arize's convention and Phoenix's native format. Its attributes are also marked Development. It defines explicit kinds including RETRIEVER, RERANKER, GUARDRAIL, EVALUATOR, PROMPT and DECISION, alongside LLM, AGENT and TOOL.
Its Python instrumentation coverage includes LangChain, LlamaIndex, CrewAI, DSPy and the OpenAI Agents SDK, with JavaScript and Java packages also available.
GenAI dual-writing preserves the OpenInference attributes and derives additional fields at span end. The mapping is incomplete: kinds including CHAIN, RERANKER, GUARDRAIL, EVALUATOR and PROMPT receive no corresponding GenAI operation. Enabling the flag does not make every OpenInference distinction portable.
OpenLLMetry
OpenLLMetry supplies OpenTelemetry instrumentation libraries. Its recent model-call instrumentations increasingly emit GenAI attributes, while Traceloop SDK decorators retain traceloop.span.kind and traceloop.entity.input / traceloop.entity.output.
Those two layers need separate checks. A backend can parse an OpenLLMetry model call without recognizing its surrounding workflow or tool kind, as both tested backends demonstrated.
Which backends parse which convention
This matrix examines four model-call fields: classification, model, token counts and messages. It does not claim complete agent-operation coverage. Documentation and source inspection are distinguished from runtime tests; undocumented support is not treated as absence.
| Backend | GenAI | OpenInference | OpenLLMetry | Basis |
|---|---|---|---|---|
| Laminar local OSS | All four parsed | Raw attributes only | All four parsed | Tests, source |
| Phoenix 22.1.0 | All four parsed | All four parsed | All four parsed | Tests, source |
| Langfuse | All four mapped | All four mapped | Model-call fields mapped | Ingestion source |
| Datadog Agent Observability | 1.37+ supported; fields untested | Supported; fields untested | 0.47+ supported; fields untested | Vendor docs |
| Grafana Cloud Agent Observability | Operation/model/messages required; tokens unverified here | Not established | GenAI-emitting versions untested | Vendor docs |
| Jaeger 2.23.0 | Attributes retained; presentation untested | Untested | Untested | GenAI test, release notes |
Important limits sit underneath those model-call results:
- Laminar recognizes GenAI model operations and execute_tool, and keeps invoke_agent as an untyped DEFAULT container whose model and tool children carry the content. It does not parse OpenInference fields or use traceloop.span.kind. OpenInference requires conversion or additional recognized attributes for Laminar's model-call views.
- Phoenix converts GenAI to OpenInference at ingest. Its converter is pinned to semconv v1.41.1 and does not assign kinds for every newer operation. Traceloop agent and tool kinds need separate handling.
- Langfuse checks its own type override first, then OpenInference kind, then GenAI operation. Its mapper does not use traceloop.span.kind.
- Datadog prefers GenAI operation when both conventions appear. In qualifying traces, it retains spans with documented AI attributes or markers and drops other spans. OTLP acceptance is not universal retention.
- Grafana requires messages as span attributes; content sent only through OTLP logs does not populate conversations.
Jaeger's experimental GenAI visualization, introduced in v2.22, was not evaluated. Attribute retention alone cannot establish its conversation-view behavior.
Test results: the same workload, separate runs
The workload used gpt-5.6-luna: one chat call requested the shipment tool, a tool span recorded execution, and another chat call answered. Each instrumentation ran in a separate process with OpenTelemetry SDK 1.45.2, exporting to a local Laminar OSS checkout and Phoenix 22.1.0.
Agent and tool spans were manually attributed for each convention. These results therefore test the stated attributes, not every framework's automatic instrumentation. The Jaeger test covered only the latest-experimental GenAI run.
| Instrumentation | Laminar | Phoenix 22.1.0 |
|---|---|---|
| OTel OpenAI-v2 2.4b0, latest-experimental | LLM/tool types, messages, 492 tokens, cost; agent generic | LLM/tool/agent kinds, messages |
| OTel OpenAI-v2, default | LLM/tool types, tokens, cost; no messages | Kinds and tokens; no messages |
| OpenInference 0.1.77 | All generic; derived usage and cost zero | Native kinds, model, tokens, messages |
| OpenInference, GenAI flag enabled | Model calls parsed; manual agent/tool spans generic | Not run |
| OpenLLMetry 0.63.1 | Model calls parsed; agent/tool generic | Model calls parsed; agent/tool UNKNOWN |
Default capture was the first failure point. The official instrumentation did not capture message content by default. Its legacy content path uses log events, which this test did not export. Missing messages here were not evidence that either backend rejected captured span messages.
OpenInference data survived without becoming Laminar fields. Laminar's SQL results showed DEFAULT spans, empty model/message fields and derived totals of zero tokens and $0. Those zeros did not mean the calls consumed no tokens. Raw OpenInference attributes retained the usage.
Dual-writing fixed the model-call fields: Laminar recovered the model, messages, cost and 164/238 input-token counts. The hand-written spans used a plain OpenTelemetry tracer, so OpenInference's flag did not transform them.
OpenLLMetry's model calls were more portable than its surrounding spans. Both backends parsed their GenAI fields. Laminar also extracted traceloop.entity.* input/output, but left agent and tool spans generic. Its transcript excludes DEFAULT spans, although the tree retains them.
Where both backends parsed a first model call, token counts matched: 164 input and 27 output tokens. Second-call outputs varied between runs. These are parsing checks, not identical-response or cost-parity measurements.
When OpenInference is the better fit
OpenInference offers useful detail for pipelines centered on retrieval, reranking or guardrails. Its retrieval fields include document content, scores and metadata, and its explicit operation kinds can preserve distinctions that GenAI conversion loses.
GenAI also has substantial agent coverage: tool execution, retrieval, memory, planning and handoffs. The practical limit is what your backend parses. Laminar's generic invoke_agent classification and Phoenix's unmapped newer operations show why specification coverage cannot substitute for a trace test.
If Phoenix or another OpenInference-aware destination fits your workflow, keeping OpenInference can be reasonable. Add experimental GenAI dual-writing where useful, then check the mapped and unmapped spans. Prefer GenAI for broadly recognized model-call fields, rather than assuming either convention is universally more complete.
What does not move with your spans
OTLP span export does not export an entire observability workspace:
- Evaluations and datasets: scorer definitions, experiment history and dataset formats require separate handling. GenAI's evaluation-result event is not a dataset format.
- Prompt management: registries, versions and platform references need their own migration.
- Queries and alerts: saved queries, dashboards and alert definitions depend on backend schemas and APIs.
- Vendor metadata: session identifiers and type overrides may require mapping, even when another backend recognizes some vendor keys.
Replacing decorators may be a small task. Moving accumulated workflows may not be. Neither open source nor OpenTelemetry removes the need to assess that work.
For an existing Langfuse deployment, Laminar's Langfuse bridge supports a side-by-side trace trial. The platform-selection guide covers the broader decision; the test below isolates trace portability.
Run a portability check with Laminar
Export one representative agent trace to both destinations. This tested setup uses OpenLLMetry's OpenAI instrumentation and two OTLP/HTTP exporters. The second endpoint in testing was local and unauthenticated; configure authentication separately if your destination requires it.
import os
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.instrumentation.openai import OpenAIInstrumentor
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter(
endpoint="https://api.lmnr.ai/v1/traces",
headers={"Authorization": f"Bearer {os.environ['LMNR_PROJECT_API_KEY']}"},
)))
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter(
endpoint=os.environ["SECOND_BACKEND_OTLP_ENDPOINT"],
)))
trace.set_tracer_provider(provider)
OpenAIInstrumentor().instrument()
Laminar's OpenTelemetry docs list other endpoints. If you already have instrumentation and a tracer provider, add export to that setup rather than installing another instrumentation over it.
Open the trace's transcript and tree views. Check whether model calls have messages and whether tool executions appear as typed spans. Then inspect the derived fields in the SQL editor, substituting your trace ID:
SELECT name, span_type, model, input_tokens, output_tokens, total_cost
FROM spans
WHERE trace_id = '90320e6e-63cc-a771-f685-9187080527b9'
ORDER BY start_time
The recorded OpenLLMetry run returned two openai.chat LLM spans with 164 and 238 input tokens, plus DEFAULT agent and tool rows.
Use raw attributes to distinguish unrecognized data from missing data:
SELECT
name,
simpleJSONExtractString(attributes, 'openinference.span.kind') AS oi_kind,
simpleJSONExtractString(attributes, 'llm.model_name') AS oi_model,
simpleJSONExtractInt(attributes, 'llm.token_count.prompt') AS oi_prompt_tokens
FROM spans
WHERE span_type = 'DEFAULT'
AND simpleJSONExtractString(attributes, 'openinference.span.kind') != ''
AND start_time > now() - INTERVAL 1 DAY
This returned OpenInference AGENT, LLM and TOOL kinds, with model and prompt-token values on the completed LLM calls. The query covers the last day's matching spans, not one trace.
Compare the same fields and span IDs in your second destination. A mismatch may call for dual-writing, attribute conversion, changed content settings or a different backend. It does not automatically require replacing the instrumentation.
Use Laminar's attribute reference to check recognized keys. OpenTelemetry for AI agents covers span structure and export in more depth.
FAQ
Which settings reproduced the official OpenAI instrumentation test?
For opentelemetry-instrumentation-openai-v2 2.4b0, the test used OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental and OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=span_only. It pinned opentelemetry-util-genai to 1.1b0 because 1.3b0 caused an import failure.
These are version-specific settings. GenAI v0.1.0 specifies a different content variable, OTEL_INSTRUMENTATION_GENAI_CAPTURE_CONTENT. Follow your installed library's configuration, and enable message capture only where your data policy permits it. Laminar's troubleshooting guide covers export diagnostics.
Does Laminar accept structured GenAI message attributes?
A separate OTLP/JSON test supplied gen_ai.input.messages as an array of structured values. Laminar accepted it, classified the span as LLM and exposed the message in its SQL input field. This supplements the JSON-string instrumentation tests; it does not establish structured-value support in the other backends or complete v0.1.0 compatibility.
Do I need a Collector for the comparison?
No. The example sends directly to two destinations. Keep sampling and content settings equivalent, then compare retained span IDs as well as counts. Datadog's documented span filtering can produce different counts without an exporter failure. A Collector cannot make an unsupported semantic field understood merely by forwarding it.
Can I keep the Laminar SDK and switch backends later?
Its Python SDK uses OpenTelemetry-based instrumentation and emits GenAI message attributes on model calls. Those fields provide a portability path, but Laminar-specific type and metadata attributes need separate checks. Do not assume another backend maps lmnr.* keys. Test actual SDK output through OTLP before deciding whether replacing the SDK is necessary.