Class: Labkit::Tracing::GRPC::ClientInterceptor

Inherits:
GRPC::ClientInterceptor
  • Object
show all
Includes:
Singleton
Defined in:
lib/labkit/tracing/grpc/client_interceptor.rb

Overview

GRPCClientInterceptor is a client-side GRPC interceptor for instrumenting GRPC calls with distributed tracing

Instance Method Summary collapse

Instance Method Details

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



29
30
31
# File 'lib/labkit/tracing/grpc/client_interceptor.rb', line 29

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

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



21
22
23
# File 'lib/labkit/tracing/grpc/client_interceptor.rb', line 21

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

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



17
18
19
# File 'lib/labkit/tracing/grpc/client_interceptor.rb', line 17

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

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



25
26
27
# File 'lib/labkit/tracing/grpc/client_interceptor.rb', line 25

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