Sha256: 6afd78e1eff8d454edc080e5b1bc4f0462e6cf6ffeca1aef8cff857da3e86770

Contents?: true

Size: 768 Bytes

Versions: 7

Compression:

Stored size: 768 Bytes

Contents

# frozen_string_literal: true

# Copyright The 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

7 entries across 7 versions & 1 rubygems

Version Path
opentelemetry-api-0.16.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.15.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.14.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.13.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.12.1 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.12.0 lib/opentelemetry/context/propagation/noop_injector.rb
opentelemetry-api-0.11.0 lib/opentelemetry/context/propagation/noop_injector.rb