Zenaique

Explain what OpenInference adds on top of plain OpenTelemetry for LLM tracing

Flashcard·Medium·4.0 · 0·~30s·Asked atAutodeskLakeraTesla
Attempt it
TL;DR

Arize's open semantic-convention layer for LLM and agent traces. Adds chain, retriever, reranker, tool, and agent attributes on top of OTel. Phoenix consumes it natively.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine OpenTelemetry as a universal alphabet that says "here is how you spell words." Useful, but it does not tell you how to write a recipe. OpenInference is a recipe-specific extension that says "if you are writing a recipe, here is how to label the ingredient list, the steps, and the cooking time." It is still the same alphabet underneath. Anyone who reads recipes (Phoenix) understands the labels natively. Anyone who reads any text (other OTel backends) can still read the recipe because the alphabet has not changed; they just see the labels as generic words.

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.

OpenInference exists because Arize shipped Phoenix in 2023 and needed a way to describe LLM traces that plain OTel could not yet express. Plain OTel had HTTP and database conventions but no idiomatic way to encode "this span was a retrieval step that returned five documents with similarity scores." Arize wrote that vocabulary, called it OpenInference, and released it as an open spec.

OTel's own GenAI semantic conventions began materializing in 2024. The two specs overlap. This deep dive walks through what OpenInference contributes structurally, how it relates to OTel GenAI in 2026, and the practical patterns for keeping both worlds usable as the specs converge.

Convention layer, not protocol

OpenTelemetry has two distinct layers that are easy to conflate.

The protocol layer

OTLP, the wire format. It defines how spans, metrics, and logs serialize and travel over the network. Every OTel SDK and every OTel-compatible backend speaks OTLP. There is one wire format.

The semantic-conventions layer

Namespaces and attribute names with documented meanings. OTel has conventions for HTTP (http.method, http.status_code), databases (db.statement, db.system), messaging (messaging.system, messaging.destination), and now GenAI (gen_ai.request.model, gen_ai.usage.input_tokens).

The conventions layer is what makes spans portable across teams and tools. If everyone agrees that http.status_code means the HTTP status code, every backend can filter on it.

Where OpenInference fits

OpenInference is a semantic-conventions layer for LLM-specific concepts. It sits at the same architectural level as the OTel HTTP or DB conventions. The wire is still OTLP; the spans are still OTel spans; the attributes follow OpenInference's naming.

This is why a backend like Langfuse that ingests OTel can read OpenInference-instrumented apps. The wire is what it understands; the attribute names are what it parses out of the standard span attribute bag.

What OpenInference adds
Why it pre-existed OTel GenAI
Interop patterns in 2026
OpenInference versus OpenLLMetry
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.
ConcernPlain OTelOpenInferenceOTel GenAI
LLM call basics (model, tokens)Custom keys requiredllm.model_name, llm.token_count.*gen_ai.request.model, gen_ai.usage.*
Prompt contentNo standardAttributes (older), events (newer)Events (gen_ai.user.message, etc.)
Retrieval resultsNo standardretrieval.documents.* indexed arrayLimited coverage as of 2026
Reranker spansNo standardopeninference.span.kind=rerankerLimited coverage
Agent stepsNo standardopeninference.span.kind=agent + step kindsPartial coverage, evolving
Tool callsNo standardtool.name, tool.parameters, tool.outputgen_ai.tool.* (newer)

Real products, models, and research that use this idea.

  • Phoenix's auto-instrumentation for LangChain, LlamaIndex, and DSPy emits OpenInference-conformant spans by default, which is what powers Phoenix's RAG and agent-trace UIs.
  • OpenLLMetry's OpenAI auto-instrumentation emits OpenInference attributes; production stacks shipping to both Phoenix and Langfuse work with no code change.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QIf you instrument with both OpenInference and OTel GenAI attributes simultaneously, do you double the span size?
A

Yes, by a small amount. The model id, token counts, and finish reason live under both naming schemes (llm.model_name and gen_ai.request.model, for example). In practice the dual-emit cost is under 10 percent of span size, and it lets you use either backend without changing instrumentation. Normalize at ingest if the cost matters.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Treating OpenInference as a competitor to OpenTelemetry. It is a semantic-convention layer on top of OTel, not a separate protocol.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Why OpenInference is a semantic-convention layer rather than a wire protocol

  • What span kinds OpenInference adds beyond plain OTel

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Describe how end user thumbs up/down should flow back onto a trace
Flashcard·Easy