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)


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

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



35
36
37
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 35

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

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



27
28
29
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 27

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

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



23
24
25
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 23

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

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



31
32
33
# File 'lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb', line 31

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