Functions
get_current_trace()
Trace object, or None if called outside a trace context.
get_current_trace_id()
get_current_trace().id. Returns the active trace ID string, or None.
Use Cases
Both functions are useful for correlating RDK traces with your application logs, metrics, or external systems.Examples
Log correlation
Attach trace ID to response headers
Read trace fields
Outside a trace
See Also
- @observe — Create a trace context
- trace() — Context manager trace creation
- Trace model — Trace fields

