Skip to main content

extract_context

Function extract_context 

Source
pub fn extract_context<'a, I, V>(headers: I) -> Context
where I: IntoIterator<Item = (&'a str, V)>, V: AsRef<[u8]>,
Expand description

Rebuild an OpenTelemetry Context from Kafka record headers.

Each header is a key plus a raw byte value. This function skips a non-UTF-8 value. Use the result as the remote parent of a consumer-side span: see set_remote_parent.