Skip to content

SpanContextDict

Dictionary Type

SpanContextDict

Bases: TypedDict

Dictionary form of SpanContext.

Attributes

session_id instance-attribute
session_id: Required[str]

The unique identifier of the session containing this span. Sessions represent complete conversation flows and are detected using configurable SessionTimeoutMinutes (default 15 minutes).

span_id instance-attribute
span_id: str | None

The unique identifier of the specific span being referenced. Spans represent individual operations like tool calls, model invocations, or other discrete actions within the agent's execution.

trace_id instance-attribute
trace_id: str | None

The unique identifier of the trace containing this span. Traces represent individual request-response interactions within a session and group related spans together.