Class swarmauri_core.tracing.ITracer.ITracer
swarmauri_core.tracing.ITracer.ITracer
Bases: ABC
Interface for implementing distributed tracing across different components of the system.
start_trace
abstractmethod
start_trace(name, initial_attributes=None)
Starts a new trace with a given name and optional initial attributes.
PARAMETER | DESCRIPTION |
---|---|
name
|
Name of the trace, usually represents the operation being traced.
TYPE:
|
initial_attributes
|
Key-value pairs to be attached to the trace initially.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
ITraceContext
|
A context object representing this particular trace instance.
TYPE:
|
Source code in swarmauri_core/tracing/ITracer.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
end_trace
abstractmethod
end_trace(trace_context)
Marks the end of a trace, completing its lifecycle and recording its details.
PARAMETER | DESCRIPTION |
---|---|
trace_context
|
The trace context to be ended.
TYPE:
|
Source code in swarmauri_core/tracing/ITracer.py
27 28 29 30 31 32 33 34 35 |
|
annotate_trace
abstractmethod
annotate_trace(trace_context, key, value)
Adds an annotation to an existing trace, enriching it with more detailed information.
PARAMETER | DESCRIPTION |
---|---|
trace_context
|
The trace context to annotate.
TYPE:
|
key
|
The key or name of the annotation.
TYPE:
|
value
|
The value of the annotation.
TYPE:
|
Source code in swarmauri_core/tracing/ITracer.py
37 38 39 40 41 42 43 44 45 46 47 |
|