Class: Labkit::Tracing::GRPC::ServerInterceptor

Inherits:
GRPC::ServerInterceptor
  • Object
show all
Includes:
Correlation::GRPC::GRPCCommon
Defined in:
lib/labkit/tracing/grpc/server_interceptor.rb

Overview

GRPCServerInterceptor is a server-side GRPC interceptor for instrumenting GRPC calls with distributed tracing in a GRPC Ruby server

Constant Summary

Constants included from Correlation::GRPC::GRPCCommon

Correlation::GRPC::GRPCCommon::CORRELATION_METADATA_KEY

Instance Method Summary collapse

Methods included from Correlation::GRPC::GRPCCommon

#rpc_split

Instance Method Details

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



36
37
38
39
40
# File 'lib/labkit/tracing/grpc/server_interceptor.rb', line 36

def bidi_streamer(requests: nil, call: nil, method: nil)
  wrap_with_tracing(call, method, "bidi_stream") do
    yield
  end
end

#client_streamer(call: nil, method: nil) ⇒ Object



24
25
26
27
28
# File 'lib/labkit/tracing/grpc/server_interceptor.rb', line 24

def client_streamer(call: nil, method: nil)
  wrap_with_tracing(call, method, "client_stream") do
    yield
  end
end

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



18
19
20
21
22
# File 'lib/labkit/tracing/grpc/server_interceptor.rb', line 18

def request_response(request: nil, call: nil, method: nil)
  wrap_with_tracing(call, method, "unary") do
    yield
  end
end

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



30
31
32
33
34
# File 'lib/labkit/tracing/grpc/server_interceptor.rb', line 30

def server_streamer(request: nil, call: nil, method: nil)
  wrap_with_tracing(call, method, "server_stream") do
    yield
  end
end