If you are wiring up an LLM application, every prompt call, vector-DB fetch, or tool invocation is another moving part in a distributed system. OpenTelemetry gives you a common language — spans, traces, and now sessions — to follow each hop. But the raw terms don’t always translate cleanly to AI workflows: a “trace” isn’t a concrete object, for example.
When you instrument an LLM or agent pipeline you actually juggle two parallel vocabularies:
- Pure OpenTelemetry primitives: defined by the OTEL spec.
- AI-centric views: built on top of those primitives to make conversations, tool calls, and evals intelligible (this post explores terminology for Arize Phoenix).
Keeping the layers separate stops the usual “trace vs. session” head-scratching.
For more detail, check out our guide on OTEL for LLMs.
What is a Span?
A span is a single timed operation. It carries its own ID plus contextual attributes such as latency, status, prompt text, token counts, etc. Phoenix uses OTEL’s Trace API to create rich LLM-aware spans, so you can add semantic attributes or mask sensitive data without leaving the OTEL ecosystem.
What is a Trace?
A trace is simply all spans that share the same trace_id. In micro-service or agent graphs, the ID is propagated across network boundaries, building a parent-child tree of spans that reflects the full request path. Phoenix’s Trace view renders this tree automatically, letting you zoom from root spans down to token-level details.
What is a Session?
Conversational and agentic apps rarely end after one request. A session groups many traces—every back-and-forth turn with a user—under a stable session.id. Phoenix’s Sessions feature threads these traces into a chat-style timeline, tracks cumulative token usage, and lets you search conversations just like chat history.
Phoenix View | How It Maps to OTEL | Why It Exists for AI |
---|---|---|
Span | Direct dump of OTEL spans (root-filter on/off) | Inspect every LLM call, DB query, tool invocation |
Trace | Groups spans by the same trace_id |
Visualizes one request/response path (like a single chat turn) |
Session | Adds a higher-level session.id attribute across many traces |
Threads multi-turn conversations or agent loops |