dragon.ai.agent.observability.tracer.Trace

class Trace[source]

Bases: object

Top-level container for a pipeline run trace.

Attributes

trace_id:

Shared identifier across all spans in this run.

name:

Human-readable label (e.g. pipeline name, task description).

start_time:

Unix timestamp when the pipeline started.

end_time:

Unix timestamp when the pipeline ended, or None while running.

__init__(trace_id: str = <factory>, name: str = '', start_time: float = <factory>, end_time: float | None = None) None

Methods

__init__(trace_id, name, start_time, end_time)

from_dict(d)

Reconstruct a Trace from a dict.

to_dict()

Serialise to a plain dict (JSON-safe).

Attributes

end_time

name

trace_id

start_time

trace_id: str
name: str = ''
start_time: float
end_time: float | None = None
to_dict() dict [str , Any ][source]

Serialise to a plain dict (JSON-safe).

classmethod from_dict(d: dict [str , Any ]) Trace[source]

Reconstruct a Trace from a dict.

__init__(trace_id: str = <factory>, name: str = '', start_time: float = <factory>, end_time: float | None = None) None