Module: OpenTelemetry::Propagator::B3::TextMapExtractor
- Included in:
- Multi::TextMapPropagator, Single::TextMapPropagator
- Defined in:
- lib/opentelemetry/propagator/b3/text_map_extractor.rb
Overview
Extracts trace context using the b3 single or multi header formats, favouring b3 single header.
Instance Method Summary collapse
-
#extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter) ⇒ Context
Extract trace context from the supplied carrier.
Instance Method Details
#extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter) ⇒ Context
Extract trace context from the supplied carrier. The b3 single header takes precedence over the multi-header format. If extraction fails, the original context will be returned.
47 48 49 |
# File 'lib/opentelemetry/propagator/b3/text_map_extractor.rb', line 47 def extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter) extract_b3_single_header(carrier, context, getter) || extract_b3_multi_header(carrier, context, getter) || context end |