Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions pkg/distributor/distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 0 additions & 10 deletions pkg/distributor/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand All @@ -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
}

Expand Down