Use this file to discover all available pages before exploring further.
A span kind is the category of operation a span represents. OpenTelemetry has its own span kinds for network calls (SERVER, CLIENT, PRODUCER, …). OpenInference adds an AI-specific set: LLM, Tool, Agent, Chain, Retriever, and more.Span kind is what drives the span-kind icons in the Arize AX UI. It’s also how Arize AX knows which attributes to expect — an LLM span gets a different visual treatment from a tool span.
Span kind is set via the openinference.span.kind attribute. The value is ALL CAPS — "TOOL", not "Tool". Casing matters: the canonical OpenInference Python enum is OpenInferenceSpanKindValues.TOOL = "TOOL".
from openinference.semconv.trace import ( SpanAttributes, OpenInferenceSpanKindValues,)span.set_attribute( SpanAttributes.OPENINFERENCE_SPAN_KIND, OpenInferenceSpanKindValues.TOOL.value,)
Arize AX UI behavior: span-kind icons in the Arize AX trace tree come directly from the openinference.span.kind attribute. A span without that attribute renders with a blank icon. Auto-instrumentors set this for you — set it explicitly on every manual span.
Arize AX UI behavior: Arize AX reads the trace-level input and output from the root span’sinput.value and output.value. If your root span doesn’t set them, the trace list view shows those columns as blank even if child spans have data.
A call to an external tool, API, or function on behalf of an LLM.
Attribute
Description
tool.id
A unique identifier for the tool invocation (often correlated with the LLM’s tool-call ID).
tool.name
The tool’s name.
tool.description
The tool’s description (often matches what was shown to the model).
tool.parameters
The JSON-serialized parameters passed to the tool.
tool.json_schema
The tool’s full JSON schema as exposed to the model.
Tool calls are one of the clearest cases where you must instrument manually when making an LLM calls directly, instead of via a framework. When you call OpenAI directly, the auto-instrumentor traces the model’s request for a tool call — but the actual execution of the tool function happens in your Python code, where the instrumentor can’t see it. Wrap the function in a tool span yourself.
A starting point or a link between different application steps. Use a chain span to group pre/post-processing logic that doesn’t fit any of the more specific kinds.Chain spans use only the common attributes — input.value, output.value, metadata, session.id, etc.
The remaining seven span kinds — RETRIEVER, EMBEDDING, RERANKER, GUARDRAIL, EVALUATOR, PROMPT, UNKNOWN — each have their own attribute schemas. Consult the canonical source for the full per-kind attribute list.
Inputs and outputs in modern AI applications aren’t always plain text. OpenInference defines a message_content attribute family for multimodal content:
Attribute
Description
message_content.type
One of text, image, audio, reasoning, tool_use.
message_content.text
The text payload (when type is text or reasoning).
message_content.image
The image payload — URL or inline base64 (when type=image).
message_content.id
Provider-assigned identifier for the message content item (e.g., OpenAI Responses reasoning IDs).