Class swarmauri_core.tracing.ITraceContext.ITraceContext
swarmauri_core.tracing.ITraceContext.ITraceContext
Bases: ABC
Interface for a trace context, representing a single trace instance. This context carries the state and metadata of the trace across different system components.
get_trace_id
abstractmethod
get_trace_id()
Retrieves the unique identifier for this trace.
RETURNS | DESCRIPTION |
---|---|
str
|
The unique trace identifier.
TYPE:
|
Source code in swarmauri_core/tracing/ITraceContext.py
11 12 13 14 15 16 17 18 19 |
|
add_attribute
abstractmethod
add_attribute(key, value)
Adds or updates an attribute associated with this trace.
PARAMETER | DESCRIPTION |
---|---|
key
|
The attribute key or name.
TYPE:
|
value
|
The value of the attribute.
TYPE:
|
Source code in swarmauri_core/tracing/ITraceContext.py
21 22 23 24 25 26 27 28 29 30 |
|