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