grpc_telemetry v1.0.0-rc.2 GRPCTelemetry View Source
An interceptor for instrumenting gRPC requests with :telemetry events.
GRPCTelemetry takes one option, the event prefix:
intercept(GRPCTelemetry, event_prefix: [:my, :endpoint])
It will emit two events:
* `[:my, :endpoint, :start]` is emitted the interceptor
is called, it contains the monotonic time in native units
when the event was emitted, called `time`.
* `[:my, :endpoint, :stop]` is emitted after the rest
of the interceptor chain has executed, and will contains
`duration`, the monotonic time difference between the stop
and start event, in native units.
GRPCTelemetry should be added as the first interceptor, so that it instruments the whole request.
Link to this section Summary
Link to this section Functions
Link to this function
call(req, stream, next, event_prefix)
View Sourcecall( GRPC.Server.rpc_req(), GRPC.Server.Stream.t(), GRPC.ServerInterceptor.next(), any() ) :: GRPC.ServerInterceptor.rpc_return()