Class: Gruf::Prometheus::Server::Interceptor
- Inherits:
-
Interceptors::ServerInterceptor
- Object
- Interceptors::ServerInterceptor
- Gruf::Prometheus::Server::Interceptor
- Defined in:
- lib/gruf/prometheus/server/interceptor.rb
Overview
Server interceptor for measuring counter/timers for gRPC inbound requests
Instance Method Summary collapse
-
#call ⇒ Object
Intercept the call and send metrics.
Instance Method Details
#call ⇒ Object
Intercept the call and send metrics
28 29 30 31 32 33 34 35 36 |
# File 'lib/gruf/prometheus/server/interceptor.rb', line 28 def call(&) result = ::Gruf::Interceptors::Timer.time(&) send_metrics(result) raise result. unless result.successful? result. end |