Skip to main content

hash_to_w3c_trace_id

Function hash_to_w3c_trace_id 

Source
pub fn hash_to_w3c_trace_id(legacy_id: &str) -> String
Expand description

Convert a non-W3C trace ID to a W3C-compliant 32-hex-char wire ID via deterministic BLAKE3 hash truncation.

The same input always produces the same output. The original legacy identifier should be preserved in baggage under the key legacy_trace_id by the caller if round-trip is needed.

Padding and truncation are forbidden. This is the only canonical conversion path for non-W3C trace IDs.