lib/opentelemetry/baggage/propagation.rb in opentelemetry-api-0.16.0 vs lib/opentelemetry/baggage/propagation.rb in opentelemetry-api-0.17.0

- old
+ new

@@ -3,35 +3,26 @@ # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 require 'opentelemetry/baggage/propagation/context_keys' -require 'opentelemetry/baggage/propagation/text_map_injector' -require 'opentelemetry/baggage/propagation/text_map_extractor' +require 'opentelemetry/baggage/propagation/text_map_propagator' module OpenTelemetry module Baggage - # The Baggage::Propagation module contains injectors and - # extractors for sending and receiving baggage over the wire + # The Baggage::Propagation module contains a text map propagator for + # sending and receiving baggage over the wire. module Propagation extend self - BAGGAGE_KEY = 'baggage' - TEXT_MAP_EXTRACTOR = TextMapExtractor.new - TEXT_MAP_INJECTOR = TextMapInjector.new + TEXT_MAP_PROPAGATOR = TextMapPropagator.new - private_constant :BAGGAGE_KEY, :TEXT_MAP_INJECTOR, :TEXT_MAP_EXTRACTOR + private_constant :TEXT_MAP_PROPAGATOR - # Returns an extractor that extracts context using the W3C Baggage - # format - def text_map_injector - TEXT_MAP_INJECTOR - end - - # Returns an injector that injects context using the W3C Baggage - # format - def text_map_extractor - TEXT_MAP_EXTRACTOR + # Returns a text map propagator that propagates context using the + # W3C Baggage format. + def text_map_propagator + TEXT_MAP_PROPAGATOR end end end end