Sha256: 54079d389c4967d5e85ece312a8b12f1dcdde579c94349672039e1b86cd01904

Contents?: true

Size: 844 Bytes

Versions: 37

Compression:

Stored size: 844 Bytes

Contents

# frozen_string_literal: true

require_relative '../../../distributed/fetcher'

module Datadog
  module Tracing
    module Contrib
      module GRPC
        module Distributed
          # Retrieves values from the gRPC metadata.
          # One metadata key can be associated with multiple values.
          #
          # @see https://github.com/grpc/grpc-go/blob/56ac86fa0f3940cb79946ce2c6e56f7ee7ecae84/Documentation/grpc-metadata.md#constructing-metadata
          class Fetcher < Tracing::Distributed::Fetcher
            def [](key)
              # Metadata values are normally integrals but can also be
              # arrays when multiple values are associated with the same key.
              value = super(key)
              value.is_a?(::Array) ? value[0] : value
            end
          end
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
datadog-2.9.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.8.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.7.1 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.7.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.6.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.5.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.4.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.3.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.2.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
ddtrace-1.23.3 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
ddtrace-1.23.2 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.1.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.0.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
ddtrace-1.23.1 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.0.0.beta2 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
ddtrace-1.22.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
datadog-2.0.0.beta1 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
ddtrace-1.21.1 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
ddtrace-1.21.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb
ddtrace-1.20.0 lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb