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

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

Overview

:nodoc:

Direct Known Subclasses

Client, Server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



14
15
16
# File 'lib/ddtrace/contrib/grpc/datadog_interceptor.rb', line 14

def initialize(options = {})
  add_datadog_pin! { |c| yield(c) if block_given? }
end

Instance Attribute Details

#datadog_pinObject

Returns the value of attribute datadog_pin.



12
13
14
# File 'lib/ddtrace/contrib/grpc/datadog_interceptor.rb', line 12

def datadog_pin
  @datadog_pin
end

Instance Method Details

#bidi_streamer(**keywords) ⇒ Object



30
31
32
# File 'lib/ddtrace/contrib/grpc/datadog_interceptor.rb', line 30

def bidi_streamer(**keywords)
  trace(keywords) { yield }
end

#client_streamer(**keywords) ⇒ Object



22
23
24
# File 'lib/ddtrace/contrib/grpc/datadog_interceptor.rb', line 22

def client_streamer(**keywords)
  trace(keywords) { yield }
end

#request_response(**keywords) ⇒ Object



18
19
20
# File 'lib/ddtrace/contrib/grpc/datadog_interceptor.rb', line 18

def request_response(**keywords)
  trace(keywords) { yield }
end

#server_streamer(**keywords) ⇒ Object



26
27
28
# File 'lib/ddtrace/contrib/grpc/datadog_interceptor.rb', line 26

def server_streamer(**keywords)
  trace(keywords) { yield }
end