MCPcopy Create free account
hub / github.com/cortexproject/cortex / InstrumentReusableStream

Function InstrumentReusableStream

pkg/util/grpcclient/instrumentation.go:29–42  ·  view source on GitHub ↗
(requestDuration *prometheus.HistogramVec)

Source from the content-addressed store, hash-verified

27}
28
29func InstrumentReusableStream(requestDuration *prometheus.HistogramVec) ([]grpc.UnaryClientInterceptor, []grpc.StreamClientInterceptor) {
30 return []grpc.UnaryClientInterceptor{
31 grpcutil.HTTPHeaderPropagationClientInterceptor,
32 otgrpc.OpenTracingClientInterceptor(opentracing.GlobalTracer()),
33 middleware.ClientUserHeaderInterceptor,
34 cortexmiddleware.PrometheusGRPCUnaryInstrumentation(requestDuration),
35 }, []grpc.StreamClientInterceptor{
36 grpcutil.HTTPHeaderPropagationStreamClientInterceptor,
37 unwrapErrorStreamClientInterceptor(),
38 otgrpc.OpenTracingStreamClientInterceptor(opentracing.GlobalTracer()),
39 middleware.StreamClientUserHeaderInterceptor,
40 cortexmiddleware.PrometheusGRPCReusableStreamInstrumentation(requestDuration),
41 }
42}

Callers 1

MakeIngesterClientFunction · 0.92

Calls 1

Tested by

no test coverage detected