diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index 9e31784b12f..0d1a067eb2a 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -327,7 +327,6 @@ func New(cfg Config, clientConfig ingester_client.Config, limits *validation.Ove Help: "Number of labels per sample.", Buckets: []float64{5, 10, 15, 20, 25}, }), - // TODO switch to native histogram eventually and add "type" label sampleDelayHistogram: promauto.With(reg).NewHistogram(prometheus.HistogramOpts{ Namespace: "cortex", Name: "distributor_sample_delay_seconds", diff --git a/pkg/ingester/ingester.go b/pkg/ingester/ingester.go index 3b7b4110d6c..8be11b66077 100644 --- a/pkg/ingester/ingester.go +++ b/pkg/ingester/ingester.go @@ -1617,13 +1617,9 @@ func (i *Ingester) queryStreamSamples(ctx context.Context, db *userTSDB, from, t t, v := it.At() ts.Samples = append(ts.Samples, mimirpb.Sample{Value: v, TimestampMs: t}) case chunkenc.ValHistogram: - // TODO when read path for native histograms is ready, return Histogram samples - // t, v := it.AtHistogram() - // ts.Histograms = append(ts.Histograms, mimirpb.FromHistogramToHistogramProto(t, v)) + // ignore case chunkenc.ValFloatHistogram: - // TODO when read path for native histograms is ready, return Histogram samples - // t, v := it.AtFloatHistogram() - // ts.Histograms = append(ts.Histograms, mimirpb.FromFloatHistogramToHistogramProto(t, v)) + // ignore default: return 0, 0, 0, fmt.Errorf("unsupported value type: %v", valType) } @@ -1727,11 +1723,9 @@ func (i *Ingester) queryStreamChunks(ctx context.Context, db *userTSDB, from, th case chunkenc.EncXOR: ch.Encoding = int32(chunk.PrometheusXorChunk) case chunkenc.EncHistogram: - // ch.Encoding = int32(chunk.PrometheusHistogramChunk) - continue // TODO when read path for native histograms is ready, return Histogram chunks + continue // ignore case chunkenc.EncFloatHistogram: - // ch.Encoding = int32(chunk.PrometheusFloatHistogramChunk) - continue // TODO when read path for native histograms is ready, return FloatHistogram chunks + continue // ignore default: return 0, 0, errors.Errorf("unknown chunk encoding from TSDB chunk querier: %v", meta.Chunk.Encoding()) } diff --git a/pkg/ingester/ingester_test.go b/pkg/ingester/ingester_test.go index c4e0ab66e90..463612f8dca 100644 --- a/pkg/ingester/ingester_test.go +++ b/pkg/ingester/ingester_test.go @@ -7441,11 +7441,6 @@ func testIngesterCanEnableIngestAndQueryNativeHistograms(t *testing.T, sampleHis Timestamp: 0, Value: 1, }}, - // TODO when read path for native histograms is ready, uncomment this - // Histograms: []model.SampleHistogramPair{{ - // Timestamp: 2, - // Histogram: expectHistogram, - // }}, }} testResult(expectedMatrix, "Result should contain the histogram when accepting histograms") diff --git a/pkg/ingester/metrics.go b/pkg/ingester/metrics.go index 2355e62f552..8c30d6f534b 100644 --- a/pkg/ingester/metrics.go +++ b/pkg/ingester/metrics.go @@ -141,7 +141,6 @@ func newIngesterMetrics( Name: "cortex_ingester_queries_total", Help: "The total number of queries the ingester has handled.", }), - // TODO use native histograms and add "type" label queriedSamples: promauto.With(r).NewHistogram(prometheus.HistogramOpts{ Name: "cortex_ingester_queried_samples", Help: "The total number of samples returned from queries.", @@ -164,7 +163,6 @@ func newIngesterMetrics( Name: "cortex_ingester_queries_ephemeral_total", Help: "The total number of queries the ingester has handled for ephemeral storage.", }), - // TODO use native histograms and add "type" label ephemeralQueriedSamples: promauto.With(r).NewHistogram(prometheus.HistogramOpts{ Name: "cortex_ingester_queried_ephemeral_samples", Help: "The total number of samples from ephemeral storage returned per query.",