Skip to main content
OpenInference uses a hierarchical data model to represent AI application execution as distributed traces.

Traces

A trace records the full execution path of a request — from the user’s initial input through every LLM call, tool invocation, and retrieval step to the final response. Traces are trees of spans connected by parent–child relationships. The root span typically represents an agent turn or pipeline invocation; child spans represent individual operations within it.

Spans

A span is the atomic unit of work: one LLM call, one tool execution, one retrieval query, one embedding generation. Every span carries:

Span Kinds

The openinference.span.kind attribute classifies what an operation does, enabling observability platforms to render traces with AI-aware visualizations and aggregations:

Attributes

Attributes are typed key/value pairs attached to spans following a structured naming convention. They are the primary payload of OpenInference: they carry the prompt, the response, the model name, the retrieved documents, the tool arguments, and everything else needed to understand and reproduce a given execution. Attribute names use dot-separated namespaces (e.g., llm.input_messages, llm.token_count.prompt). List-valued attributes use zero-based integer indices in flattened form (e.g., llm.input_messages.0.message.role).
The Semantic Conventions document is the authoritative reference for all attribute names, types, and meanings.