dragon.ai.agent.observability.ddict_tracer.DictTracingProcessor

class DictTracingProcessor[source]

Bases: TracingProcessor

Write trace spans to a Dragon Distributed Dictionary.

Parameters

ddict:

An attached DDict instance.

task_id:

The current pipeline run’s task_id (used for key formatting).

agent_id:

The agent_id for this processor instance.

dispatch_id:

The dispatch_id for this invocation.

__init__(ddict: Any , task_id: str , agent_id: str , dispatch_id: str ) None [source]

Methods

__init__(ddict, task_id, agent_id, dispatch_id)

on_span_end(span)

Update the existing span entry in the DDict span list.

on_span_start(span)

Append a span (with end_time=None) to the DDict span list.

__init__(ddict: Any , task_id: str , agent_id: str , dispatch_id: str ) None [source]
on_span_start(span: Span) None [source]

Append a span (with end_time=None) to the DDict span list.

Makes in-progress spans visible to the TCP bridge immediately.

on_span_end(span: Span) None [source]

Update the existing span entry in the DDict span list.

Finds the entry by span_id and replaces it with the completed version (end_time set, final attributes, error).