Class: Labkit::Tracing::GRPCInterceptor

Inherits:
GRPC::ClientInterceptor
  • Object
show all
Includes:
Common, Singleton
Defined in:
lib/labkit/tracing/grpc_interceptor.rb

Instance Method Summary collapse

Methods included from Common

#in_tracing_span, #kv_tags_for_exception, #log_exception_on_span, #postnotify_span, #tracer

Instance Method Details

#bidi_streamer(requests:, call:, method:, metadata:) ⇒ Object



24
25
26
# File 'lib/labkit/tracing/grpc_interceptor.rb', line 24

def bidi_streamer(requests:, call:, method:, metadata:)
  wrap_with_tracing(method, 'bidi_stream', ) { yield }
end

#client_streamer(requests:, call:, method:, metadata:) ⇒ Object



16
17
18
# File 'lib/labkit/tracing/grpc_interceptor.rb', line 16

def client_streamer(requests:, call:, method:, metadata:)
  wrap_with_tracing(method, 'client_stream', ) { yield }
end

#request_response(request:, call:, method:, metadata:) ⇒ Object



12
13
14
# File 'lib/labkit/tracing/grpc_interceptor.rb', line 12

def request_response(request:, call:, method:, metadata:)
  wrap_with_tracing(method, 'unary', ) { yield }
end

#server_streamer(request:, call:, method:, metadata:) ⇒ Object



20
21
22
# File 'lib/labkit/tracing/grpc_interceptor.rb', line 20

def server_streamer(request:, call:, method:, metadata:)
  wrap_with_tracing(method, 'server_stream', ) { yield }
end