Class: Sentry::Gruf::ClientInterceptor
- Inherits:
-
Gruf::Interceptors::ClientInterceptor
- Object
- Gruf::Interceptors::ClientInterceptor
- Sentry::Gruf::ClientInterceptor
- Defined in:
- lib/sentry/gruf/client_interceptor.rb
Overview
Interceptor for the Gruf client. Please note that the interceptor itself does not send errors to Sentry. It simply tags some information about the last request made through the client. Just add this interceptor to the array of used interceptors as the first element.
Instance Method Summary collapse
Instance Method Details
#call(request_context:) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/sentry/gruf/client_interceptor.rb', line 18 def call(request_context:) ::Sentry.configure_scope do |scope| scope.( grpc_method_name: request_context.method_name, grpc_route_key: request_context.route_key, grpc_call_type: request_context.type, ) end yield end |