Class: Datadog::Tracing::Contrib::GRPC::Distributed::Propagation

Inherits:
Distributed::Propagation show all
Defined in:
lib/datadog/tracing/contrib/grpc/distributed/propagation.rb

Overview

Extracts and injects propagation through gRPC metadata.

Constant Summary collapse

INSTANCE =

DEV: Singleton kept until a larger refactor is performed. DEV: See Distributed::Propagation#initialize for more information.

Propagation.new

Instance Method Summary collapse

Methods inherited from Distributed::Propagation

#extract, #inject!

Constructor Details

#initializePropagation

Returns a new instance of Propagation.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/datadog/tracing/contrib/grpc/distributed/propagation.rb', line 19

def initialize
  super(
    propagation_styles: {
      Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_MULTI_HEADER =>
        Tracing::Distributed::B3Multi.new(fetcher: Fetcher),
      Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER =>
        Tracing::Distributed::B3Single.new(fetcher: Fetcher),
      Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG =>
        Tracing::Distributed::Datadog.new(fetcher: Fetcher),
      Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_TRACE_CONTEXT =>
        Tracing::Distributed::TraceContext.new(fetcher: Fetcher),
      Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_NONE => Tracing::Distributed::None.new
    })
end