Class: Datadog::Tracing::Contrib::GRPC::DatadogInterceptor::Base

Inherits:
GRPC::Interceptor
  • Object
show all
Defined in:
lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb

Overview

:nodoc:

Direct Known Subclasses

Client, Server

Defined Under Namespace

Classes: PinAdapter

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) {|pin_adapter| ... } ⇒ Base

Returns a new instance of Base.

Yields:

  • (pin_adapter)


15
16
17
18
19
20
21
22
23
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 15

def initialize(options = {})
  super
  return unless block_given?

  # Set custom configuration on the interceptor if block is given
  pin_adapter = PinAdapter.new
  yield(pin_adapter)
  Datadog.configure_onto(self, **pin_adapter.options)
end

Instance Method Details

#bidi_streamer(**keywords, &block) ⇒ Object



37
38
39
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 37

def bidi_streamer(**keywords, &block)
  trace(keywords, &block)
end

#client_streamer(**keywords, &block) ⇒ Object



29
30
31
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 29

def client_streamer(**keywords, &block)
  trace(keywords, &block)
end

#request_response(**keywords, &block) ⇒ Object



25
26
27
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 25

def request_response(**keywords, &block)
  trace(keywords, &block)
end

#server_streamer(**keywords, &block) ⇒ Object



33
34
35
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 33

def server_streamer(**keywords, &block)
  trace(keywords, &block)
end