Overview
get_client() returns a RespanClient instance bound to the singleton tracer. Use it inside decorated functions to read trace/span IDs, update the current span, add events, record exceptions, and control export.
Usage
RespanClient methods
| Method | Description |
|---|---|
get_current_trace_id() | Get active trace ID as hex string. |
get_current_span_id() | Get active span ID as hex string. |
update_current_span() | Update attributes, status, and Respan params on the current span. |
add_event() | Add a timestamped event to the current span. |
record_exception() | Record an exception on the current span. |
get_context_value() | Read a value from the OpenTelemetry context. |
set_context_value() | Set a value in the OpenTelemetry context. |
is_recording() | Check if the current span is recording. |
get_tracer() | Get the OpenTelemetry tracer for manual span creation. |
flush() | Force flush pending spans. |
get_span_buffer() | Get a span buffer for manual batch collection. |
process_spans() | Process collected spans through the processor pipeline. |