module Aspecto::OpenTelemetry::Propagator::Aspecto

Aspecto OpenTelemetry Propagator Configuration

Constants

B3_MULTI_PROPAGATOR
B3_SINGLE_PROPAGATOR
W3C_PROPAGATOR

Public Instance Methods

from_configurator(configurator) click to toggle source
# File lib/aspecto/opentelemetry/propagator/aspecto.rb, line 17
def from_configurator(configurator)
  injectors = [W3C_PROPAGATOR]
  injectors.push(B3_SINGLE_PROPAGATOR) if configurator.inject_b3_context_single_header
  injectors.push(B3_MULTI_PROPAGATOR) if configurator.inject_b3_context_multi_header

  extractors = [W3C_PROPAGATOR]
  extractors.push(B3_SINGLE_PROPAGATOR, B3_MULTI_PROPAGATOR) if configurator.extract_b3_context

  ::OpenTelemetry::Context::Propagation::CompositeTextMapPropagator.compose(injectors: injectors, extractors: extractors)
end