Skip to main content
Both Catalyst tracing SDKs export the OpenInference attribute keys and span kinds they emit. Use them when you author manual spans, when you need to filter on a specific attribute from the CLI, or when you want to understand what each span in the trace tree should carry. Attr is not a whitelist. A span is an ordinary OpenTelemetry span, so you can set any key you like with setAttribute (see custom attributes). The keys below are the ones the dashboard understands: set Attr.MODEL_NAME (llm.model_name) and it shows the model and computes cost; set Attr.SESSION_ID (session.id) and it groups the conversation. Attr just spares you from typing, and mistyping, the wire keys by hand. The wire-format values are byte-identical to the upstream OpenInference semantic conventions, so OpenInference-aware viewers render Catalyst spans without configuration.

Span Kinds

SpanKindValues is the canonical set of values for the openinference.span.kind attribute. Pick the kind that best describes the work the span wraps. The patched provider SDKs emit LLM-kind spans automatically with all required and most optional attributes filled in. You only need to author LLM spans manually if you are wrapping an SDK Catalyst does not patch.

Attribute Constants

All attributes are exported on the Attr object. The constant name is the left-hand column; the wire-format key in the right-hand column is what actually goes on the span.

Span Identity

Agent Identity

Set on AGENT spans, copied onto child LLM/TOOL spans by the per-SDK patchers and by agentSpan() / agent_span() when the child is created in the active context.

Inputs And Outputs

Model And Provider

Set on LLM and EMBEDDING spans. Also useful on AGENT spans to declare the provider the agent runs on.

Token Usage

The per-SDK patchers fill these in automatically when the provider returns usage. For manual spans, use the helpers on the span handle:
  • TypeScript: span.recordTokens({ prompt, completion, total }) to pass the counts directly.
  • Python: span.record_tokens(prompt=..., completion=..., total=...) for manual counts, or span.record_usage(response.usage) to let the SDK normalize an OpenAI- or Anthropic-shaped usage object (including cache fields).

Tools

Set on TOOL spans. Also set on LLM spans by the provider patchers when the LLM emits a tool_use block, so the dashboard can show the tool the model asked for.

Messages

LLM spans emit per-message attributes for each input and output message. The keys are indexed and machine-generated. Use the OpenInferenceAttribute helper to compose them rather than hand-rolling the strings.
TypeScript
The wire keys take the form llm.input_messages.0.message.role, llm.input_messages.0.message.content, llm.output_messages.0.message.role, and so on. For tool-call messages, the helper also generates ...tool_calls.0.tool_call.function.name, ...tool_calls.0.tool_call.function.arguments, and ...tool_calls.0.tool_call.id. You rarely need to author these by hand; the per-SDK patchers emit them. This block is here so the keys are searchable when you are debugging captured output.

Using Attributes From The CLI

The same attribute keys are filterable from inf trace and inf span:
See inf span and inf trace for the full filter syntax.

Next Steps

Handle API reference

The typed methods on agentSpan / manual_span handles that write these attributes for you.

Manual spans

Author TOOL, CHAIN, and RETRIEVER spans inside your agent loop.

Agent identity

Pick stable agent.id and session.id values for the Agents dashboard.

CLI span reference

Filter, search, and inspect spans by attribute from the terminal.