pub fn extract_context(metadata: &MetadataMap) -> ContextExpand description
Extracts the OpenTelemetry context from tonic metadata.
This extracts both W3C TraceContext and W3C Baggage headers from the metadata, returning a context that can be used as a parent for new spans or to read baggage values.
§Arguments
metadata- The tonic metadata map to extract from
§Returns
The extracted OpenTelemetry context, or an empty context if no propagation headers were found.