Sha256: f79fada125a373fbf600f699700b9b87bc07277139511971224c88595b88d834
Contents?: true
Size: 858 Bytes
Versions: 3
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true # typed: 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
3 entries across 3 versions & 1 rubygems