Skip to content

Observability

Content-capture config primitives for GLLM Core.

ComponentIOCaptureConfig

Bases: ContentCaptureConfig

Configuration for capturing Component.run() input/output on trace spans.

Attributes:

Name Type Description
capture_input bool

Whether to capture the component's input kwargs. Defaults to False.

capture_output bool

Whether to capture the component's output. Defaults to False.

ContentCaptureConfig

Bases: BaseModel

Base for process-wide opt-in content-capture configs.

Attributes:

Name Type Description
max_attribute_bytes int

Maximum number of bytes to capture for each attribute. Defaults to DEFAULT_MAX_ATTRIBUTE_BYTES.

SpanAttribute

Span attributes for GLLM Core component instrumentation.

build_content_capture_accessors(default, *, name)

Build an isolated (configure, get) pair for one content-capture config domain.

Parameters:

Name Type Description Default
default T

The config a fresh domain starts with, and the exact instance restored whenever the returned configure function is called with None.

required
name str

Domain identifier stamped onto the returned functions' __name__ and __doc__ (e.g. "lm_trace_content"). Never used for lookup or cross-domain behavior.

required

Returns:

Type Description
tuple[Callable[[T | dict[str, Any] | None], None], Callable[[], T]]

tuple[Callable[[T | dict[str, Any] | None], None], Callable[[], T]]: The configure_fn and get_fn for this domain, each with its own isolated lock and global state, independent of any other domain's accessor pair.

Raises:

Type Description
ValueError

If name is empty or whitespace-only.

get_tracer()

Gets the GLLM Core tracer singleton.

Returns:

Type Description
Tracer

trace.Tracer: The versioned tracer for GLLM Core instrumentation.