swarmauri.core.tracing.ITracer module
- class swarmauri.core.tracing.ITracer.ITracer[source]
Bases:
ABC
Interface for implementing distributed tracing across different components of the system.
- abstract annotate_trace(trace_context, key, value)[source]
Adds an annotation to an existing trace, enriching it with more detailed information.
- Parameters:
trace_context (ITraceContext) – The trace context to annotate.
key (str) – The key or name of the annotation.
value (Any) – The value of the annotation.
- abstract end_trace(trace_context)[source]
Marks the end of a trace, completing its lifecycle and recording its details.
- Parameters:
trace_context (ITraceContext) – The trace context to be ended.
- abstract start_trace(name, initial_attributes=None)[source]
Starts a new trace with a given name and optional initial attributes.
- Parameters:
name (str) – Name of the trace, usually represents the operation being traced.
initial_attributes (Optional[Dict[str, Any]]) – Key-value pairs to be attached to the trace initially.
- Returns:
A context object representing this particular trace instance.
- Return type: