swarmauri.standard.tracing.concrete.SimpleTraceContext module

class swarmauri.standard.tracing.concrete.SimpleTraceContext.SimpleTraceContext(trace_id, name, initial_attributes=None)[source]

Bases: ITraceContext

add_attribute(key, value)[source]

Adds or updates an attribute associated with this trace.

Parameters:
  • key (str) – The attribute key or name.

  • value (Any) – The value of the attribute.

close()[source]
get_trace_id()[source]

Retrieves the unique identifier for this trace.

Returns:

The unique trace identifier.

Return type:

str