UNPKG

@google-cloud/spanner

Version:
14 lines (13 loc) 731 B
import { grpc } from 'google-gax'; /** * Interceptor for recording metrics on gRPC calls. * * This interceptor records attempt metrics at the start and completion of each gRPC call, * and also records Google Front End (GFE), AFE metrics such as latency and connectivity errors * based on the presence and value of the 'server-timing' header in the response metadata. * * @param {object} options - The gRPC call options, including method definition. * @param {function} nextCall - The next function to call in the gRPC request chain. * @returns {grpc.InterceptingCall} - The intercepting call with added metrics recording. */ export declare const MetricInterceptor: (options: any, nextCall: any) => grpc.InterceptingCall;