diff --git a/CHANGELOG.md b/CHANGELOG.md index 12d4fac2208..18cd2427d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,9 @@ * `cortex_member_ring_tokens_to_own` * `cortex_ring_tokens_owned` * `cortex_ring_member_ownership_percent` +* [CHANGE] Querier / Ruler: removed the following metrics tracking number of query requests send to each ingester. You can use `cortex_request_duration_seconds_count{route=~"/cortex.Ingester/(QueryStream|QueryExemplars)"}` instead. #1797 + * `cortex_distributor_ingester_queries_total` + * `cortex_distributor_ingester_query_failures_total` * [FEATURE] Querier: Added support for [streaming remote read](https://prometheus.io/blog/2019/10/10/remote-read-meets-streaming/). Should be noted that benefits of chunking the response are partial here, since in a typical `query-frontend` setup responses will be buffered until they've been completed. #1735 * [FEATURE] Ruler: Allow setting `evaluation_delay` for each rule group via rules group configuration file. #1474 * [FEATURE] Ruler: Added support for expression remote evaluation. #1536 diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index f5f28e30904..de0e22d3a94 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -115,8 +115,6 @@ type Distributor struct { sampleDelayHistogram prometheus.Histogram ingesterAppends *prometheus.CounterVec ingesterAppendFailures *prometheus.CounterVec - ingesterQueries *prometheus.CounterVec - ingesterQueryFailures *prometheus.CounterVec replicationFactor prometheus.Gauge latestSeenSampleTimestampPerUser *prometheus.GaugeVec } @@ -322,16 +320,6 @@ func New(cfg Config, clientConfig ingester_client.Config, limits *validation.Ove Name: "distributor_ingester_append_failures_total", Help: "The total number of failed batch appends sent to ingesters.", }, []string{"ingester", "type"}), - ingesterQueries: promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ - Namespace: "cortex", - Name: "distributor_ingester_queries_total", - Help: "The total number of queries sent to ingesters.", - }, []string{"ingester"}), - ingesterQueryFailures: promauto.With(reg).NewCounterVec(prometheus.CounterOpts{ - Namespace: "cortex", - Name: "distributor_ingester_query_failures_total", - Help: "The total number of failed queries sent to ingesters.", - }, []string{"ingester"}), replicationFactor: promauto.With(reg).NewGauge(prometheus.GaugeOpts{ Namespace: "cortex", Name: "distributor_replication_factor", diff --git a/pkg/distributor/query.go b/pkg/distributor/query.go index 3ca5b3a5d71..cbe1c96c0e5 100644 --- a/pkg/distributor/query.go +++ b/pkg/distributor/query.go @@ -11,7 +11,6 @@ import ( "sort" "time" - "github.com/grafana/dskit/grpcutil" "github.com/grafana/dskit/ring" "github.com/opentracing/opentracing-go" "github.com/prometheus/common/model" @@ -157,9 +156,7 @@ func (d *Distributor) queryIngestersExemplars(ctx context.Context, replicationSe } resp, err := client.(ingester_client.IngesterClient).QueryExemplars(ctx, req) - d.ingesterQueries.WithLabelValues(ing.Addr).Inc() if err != nil { - d.ingesterQueryFailures.WithLabelValues(ing.Addr).Inc() return nil, err } @@ -256,11 +253,9 @@ func (d *Distributor) queryIngesterStream(ctx context.Context, replicationSet ri if err != nil { return nil, err } - d.ingesterQueries.WithLabelValues(ing.Addr).Inc() stream, err := client.(ingester_client.IngesterClient).QueryStream(ctx, req) if err != nil { - d.ingesterQueryFailures.WithLabelValues(ing.Addr).Inc() return nil, err } defer stream.CloseSend() //nolint:errcheck @@ -270,11 +265,6 @@ func (d *Distributor) queryIngesterStream(ctx context.Context, replicationSet ri if err == io.EOF { break } else if err != nil { - // Do not track a failure if the context was canceled. - if !grpcutil.IsGRPCContextCanceled(err) { - d.ingesterQueryFailures.WithLabelValues(ing.Addr).Inc() - } - return nil, err }