Skip to main content

Module context

Module context 

Source
Expand description

Context propagation for distributed tracing.

This module provides utilities for propagating trace context across service boundaries using W3C Trace Context and Baggage standards.

Structs§

BaggageItem
Baggage item for propagating additional context.
HeaderCarrier
A carrier for injecting and extracting trace context from HTTP headers.

Functions§

context_with_span
Creates a new context with the current span.
extract_context
Extracts trace context from a carrier.
extract_from_headers
Extracts trace context from HTTP headers.
get_baggage
Gets baggage value from context.
inject_context
Injects the current trace context into a carrier.
inject_into_headers
Injects trace context into HTTP headers.
propagate_context
Propagates context across async task boundaries.
with_baggage
Adds baggage to the current context.
with_context
Attaches a context for the duration of the async function.