Sha256: a6ad9e233dd469346582f862654d36c76a2d24960781c4e181f8e86f0eab3817

Contents?: true

Size: 769 Bytes

Versions: 9

Compression:

Stored size: 769 Bytes

Contents

# frozen_string_literal: true

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

module OpenTelemetry
  class Context
    module Propagation
      # A no-op injector implementation
      class NoopInjector
        # Inject the given context into the specified carrier
        #
        # @param [Object] carrier The carrier to inject the provided context
        #   into
        # @param [Context] context The context to be injected
        # @param [optional Callable] setter An optional callable that takes a carrier and a key and
        #   a value and assigns the key-value pair in the carrier
        # @return [Object] carrier
        def inject(carrier, context, &setter)
          carrier
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
opentelemetry-api-0.10.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.9.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.8.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.7.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.6.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.5.1 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.5.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.4.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.3.0 lib/opentelemetry/context/propagation/noop_injector.rb