Skip to main content

Module context

Module context 

Source
Expand description

Basic trace context foundation for observability core

Provides W3C trace context implementation and basic context management ports. Domain-specific implementations (LLM, A2A, etc.) are provided by higher-level crates.

Structs§

ContextFuture
Future wrapper that restores trace context across async poll boundaries.
HeaderExtractor
Header extractor for W3C trace context propagation
HeaderInjector
Header injector for W3C trace context propagation
TraceContext
Simplified trace context for internal use
W3CTraceContext
W3C Trace Context implementation for distributed tracing

Functions§

clear_current_context
Clear the current trace context
get_current_context
Get the current trace context for this thread
set_current_context
Set the current trace context for this thread
with_context
Execute a function with a specific trace context
with_context_future
Execute a future with a specific trace context re-applied on every poll.