// Intercept is the grpc.UnaryServerInterceptor function for tracing GRPC requests using New Relic.
Intercept is the grpc.UnaryServerInterceptor function for tracing GRPC requests using New Relic.
// Intercept is the grpc . UnaryServerInterceptor function for tracing GRPC requests using New Relic .
func (i *interceptor) Intercept(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
	txn := i.newRelicApp.StartTransaction(info.FullMethod, nil, nil)
	defer txn.End()
	ctx = context.WithValue(ctx, monitoringctx.NewRelicKey, txn)
	res, err := handler(ctx, req)
	if err != nil {
		txn.NoticeError(err)
	}
	return res, err
}
func ( i * interceptor ) Intercept ( ctx context . Context , req interface { } , info * grpc . UnaryServerInfo , handler grpc . UnaryHandler ) ( interface { } , error ) { txn := i . newRelicApp . StartTransaction ( info . FullMethod , nil , nil ) defer txn . End ( ) ctx = context . WithValue ( ctx , monitoringctx . NewRelicKey , txn ) res , err := handler ( ctx , req ) if err != nil { txn . NoticeError ( err ) } return res , err }
Intercept is the grpc.UnaryServerInterceptor function for tracing GRPC requests using New Relic.
Intercept is the grpc . UnaryServerInterceptor function for tracing GRPC requests using New Relic .