@ Override public < C > BraveSpanContext extract ( Format < C > format , C carrier ) { Extractor < TextMap > extractor = formatToExtractor . get ( format ) ; if ( extractor == null ) { throw new UnsupportedOperationException ( format + " not in " + formatToExtractor . keySet ( ) ) ; } TraceContextOrSamplingFlags extractionResult = extractor . extract ( ( TextMap ) carrier ) ; return BraveSpanContext . create ( extractionResult ) ; }
Extracts the underlying context using B3 encoding by default . Null is returned when there is no encoded context in the carrier or upon error extracting it .