Sha256: 1d92bb615f90662d56e3f1661606bad7e751c80cb347bb9922b6f497f0116fbf

Contents?: true

Size: 686 Bytes

Versions: 19

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

module OpenTelemetry
  class Context
    module Propagation
      # The default getter module provides a common methods for reading
      # key from a carrier that implements +[]+ and a +keys+ method
      class TextMapGetter
        # Reads a key from a carrier that implements +[]+. Useful for extract
        # operations.
        def get(carrier, key)
          carrier[key]
        end

        # Reads all keys from a carrier. Useful for iterating over a carrier's
        # keys.
        def keys(carrier)
          carrier.keys
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
opentelemetry-api-1.4.0 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.3.0 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.2.5 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.2.4 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.2.3 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.2.2 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.2.1 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.2.0 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.1.0 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.0.2 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.0.1 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.0.0 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.0.0.rc3 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.0.0.rc2 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-1.0.0.rc1 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-0.17.0 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-0.16.0 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-0.15.0 lib/opentelemetry/context/propagation/text_map_getter.rb
opentelemetry-api-0.14.0 lib/opentelemetry/context/propagation/text_map_getter.rb