Sha256: e14f7858a31f63a47201093d20e4ed70740a03ffb886e22ca8eff5a388175b58
Contents?: true
Size: 1.7 KB
Versions: 2
Compression:
Stored size: 1.7 KB
Contents
# frozen_string_literal: true # Copyright 2019 OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 require 'opentelemetry/correlation_context/propagation/context_keys' require 'opentelemetry/correlation_context/propagation/text_injector' require 'opentelemetry/correlation_context/propagation/text_extractor' module OpenTelemetry module CorrelationContext # The Correlation::Propagation module contains injectors and # extractors for sending and receiving correlation context over the wire module Propagation extend self TEXT_EXTRACTOR = TextExtractor.new TEXT_INJECTOR = TextInjector.new RACK_EXTRACTOR = TextExtractor.new( correlation_context_key: 'HTTP_OTCORRELATIONS' ) RACK_INJECTOR = TextInjector.new( correlation_context_key: 'HTTP_OTCORRELATIONS' ) private_constant :TEXT_INJECTOR, :TEXT_EXTRACTOR, :RACK_INJECTOR, :RACK_EXTRACTOR # Returns an extractor that extracts context using the W3C Correlation # Context format def text_injector TEXT_INJECTOR end # Returns an injector that injects context using the W3C Correlation # Context format def text_extractor TEXT_EXTRACTOR end # Returns an extractor that extracts context using the W3C Correlation # Context format with Rack normalized keys (upcased and prefixed with # HTTP_) def rack_injector RACK_INJECTOR end # Returns an injector that injects context using the W3C Correlation # Context format with Rack normalized keys (upcased and prefixed with # HTTP_) def rack_extractor RACK_EXTRACTOR end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
opentelemetry-api-0.5.1 | lib/opentelemetry/correlation_context/propagation.rb |
opentelemetry-api-0.5.0 | lib/opentelemetry/correlation_context/propagation.rb |