Class: OpenTelemetry::Context::Propagation::NoopTextMapPropagator
- Inherits:
-
Object
- Object
- OpenTelemetry::Context::Propagation::NoopTextMapPropagator
- Defined in:
- lib/opentelemetry/context/propagation/noop_text_map_propagator.rb
Overview
A no-op text map propagator implementation
Instance Method Summary collapse
-
#extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter) ⇒ Context
Extracts and returns context from a carrier.
-
#fields ⇒ Array<String>
Returns the predefined propagation fields.
-
#inject(carrier, context: Context.current, setter: Context::Propagation.text_map_setter) ⇒ Object
Injects the provided context into a carrier.
Instance Method Details
#extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter) ⇒ Context
Extracts and returns context from a carrier. Returns the provided context and logs a warning if an error if extraction fails.
37 38 39 |
# File 'lib/opentelemetry/context/propagation/noop_text_map_propagator.rb', line 37 def extract(carrier, context: Context.current, getter: Context::Propagation.text_map_getter) context end |
#fields ⇒ Array<String>
Returns the predefined propagation fields. If your carrier is reused, you should delete the fields returned by this method before calling inject
.
45 46 47 |
# File 'lib/opentelemetry/context/propagation/noop_text_map_propagator.rb', line 45 def fields EMPTY_LIST end |
#inject(carrier, context: Context.current, setter: Context::Propagation.text_map_setter) ⇒ Object
Injects the provided context into a carrier.
23 |
# File 'lib/opentelemetry/context/propagation/noop_text_map_propagator.rb', line 23 def inject(carrier, context: Context.current, setter: Context::Propagation.text_map_setter); end |