lib/opentelemetry/trace/propagation/trace_context.rb in opentelemetry-api-0.13.0 vs lib/opentelemetry/trace/propagation/trace_context.rb in opentelemetry-api-0.14.0

- old
+ new

@@ -13,24 +13,17 @@ module Propagation # The TraceContext module contains injectors, extractors, and utilties # for context propagation in the W3C Trace Context format. module TraceContext extend self - + TRACEPARENT_KEY = 'traceparent' + TRACESTATE_KEY = 'tracestate' TEXT_MAP_EXTRACTOR = TextMapExtractor.new TEXT_MAP_INJECTOR = TextMapInjector.new - RACK_EXTRACTOR = TextMapExtractor.new( - traceparent_key: 'HTTP_TRACEPARENT', - tracestate_key: 'HTTP_TRACESTATE' - ) - RACK_INJECTOR = TextMapInjector.new( - traceparent_key: 'HTTP_TRACEPARENT', - tracestate_key: 'HTTP_TRACESTATE' - ) - private_constant :TEXT_MAP_INJECTOR, :TEXT_MAP_EXTRACTOR, - :RACK_INJECTOR, :RACK_EXTRACTOR + private_constant :TRACEPARENT_KEY, :TRACESTATE_KEY, + :TEXT_MAP_INJECTOR, :TEXT_MAP_EXTRACTOR # Returns an extractor that extracts context using the W3C Trace Context # format def text_map_extractor TEXT_MAP_EXTRACTOR @@ -38,21 +31,9 @@ # Returns an injector that injects context using the W3C Trace Context # format def text_map_injector TEXT_MAP_INJECTOR - end - - # Returns an extractor that extracts context using the W3C Trace Context - # with Rack normalized keys (upcased and prefixed with HTTP_) - def rack_extractor - RACK_EXTRACTOR - end - - # Returns an injector that injects context using the W3C Trace Context - # format with Rack normalized keys (upcased and prefixed with HTTP_) - def rack_injector - RACK_INJECTOR end end end end end