diff --git a/pkg/blockbuilder/types/grpc_transport.go b/pkg/blockbuilder/types/grpc_transport.go index 4d52bdfc7745e..b53fdeeb4a7d4 100644 --- a/pkg/blockbuilder/types/grpc_transport.go +++ b/pkg/blockbuilder/types/grpc_transport.go @@ -6,6 +6,9 @@ import ( "github.com/grafana/dskit/grpcclient" "github.com/grafana/dskit/instrument" + "github.com/grafana/dskit/middleware" + otgrpc "github.com/opentracing-contrib/go-grpc" + "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" @@ -47,7 +50,16 @@ func NewGRPCTransportFromAddress( cfg grpcclient.Config, reg prometheus.Registerer, ) (*GRPCTransport, error) { - dialOpts, err := cfg.DialOption(grpcclient.Instrument(newGRPCTransportMetrics(reg).requestLatency)) + metrics := newGRPCTransportMetrics(reg) + dialOpts, err := cfg.DialOption( + []grpc.UnaryClientInterceptor{ + otgrpc.OpenTracingClientInterceptor(opentracing.GlobalTracer()), + middleware.UnaryClientInstrumentInterceptor(metrics.requestLatency), + }, []grpc.StreamClientInterceptor{ + otgrpc.OpenTracingStreamClientInterceptor(opentracing.GlobalTracer()), + middleware.StreamClientInstrumentInterceptor(metrics.requestLatency), + }, + ) if err != nil { return nil, err } diff --git a/pkg/loki/loki.go b/pkg/loki/loki.go index 9747a8f231f7e..14963c09940c4 100644 --- a/pkg/loki/loki.go +++ b/pkg/loki/loki.go @@ -430,6 +430,9 @@ func (t *Loki) setupAuthMiddleware() { "/schedulerpb.SchedulerForFrontend/FrontendLoop", "/schedulerpb.SchedulerForQuerier/QuerierLoop", "/schedulerpb.SchedulerForQuerier/NotifyQuerierShutdown", + "/blockbuilder.types.SchedulerService/GetJob", + "/blockbuilder.types.SchedulerService/CompleteJob", + "/blockbuilder.types.SchedulerService/SyncJob", }) }