Skip to content

Commit b557874

Browse files
authored
Remove deprecated ingester metrics (#5472)
Signed-off-by: Xiaochao Dong (@damnever) <[email protected]>
1 parent f8a4d9e commit b557874

File tree

1 file changed

+0
-94
lines changed

1 file changed

+0
-94
lines changed

pkg/ingester/metrics.go

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const (
1818
)
1919

2020
type ingesterMetrics struct {
21-
flushQueueLength prometheus.Gauge
2221
ingestedSamples prometheus.Counter
2322
ingestedExemplars prometheus.Counter
2423
ingestedMetadata prometheus.Counter
@@ -37,25 +36,6 @@ type ingesterMetrics struct {
3736
memMetadataCreatedTotal *prometheus.CounterVec
3837
memSeriesRemovedTotal *prometheus.CounterVec
3938
memMetadataRemovedTotal *prometheus.CounterVec
40-
createdChunks prometheus.Counter
41-
walReplayDuration prometheus.Gauge
42-
walCorruptionsTotal prometheus.Counter
43-
44-
// Chunks transfer.
45-
sentChunks prometheus.Counter
46-
receivedChunks prometheus.Counter
47-
48-
// Chunks flushing.
49-
flushSeriesInProgress prometheus.Gauge
50-
chunkUtilization prometheus.Histogram
51-
chunkLength prometheus.Histogram
52-
chunkSize prometheus.Histogram
53-
chunkAge prometheus.Histogram
54-
memoryChunks prometheus.Gauge
55-
seriesEnqueuedForFlush *prometheus.CounterVec
56-
seriesDequeuedOutcome *prometheus.CounterVec
57-
droppedChunks prometheus.Counter
58-
oldestUnflushedChunkTimestamp prometheus.Gauge
5939

6040
activeSeriesPerUser *prometheus.GaugeVec
6141

@@ -76,10 +56,6 @@ func newIngesterMetrics(r prometheus.Registerer, createMetricsConflictingWithTSD
7656
)
7757

7858
m := &ingesterMetrics{
79-
flushQueueLength: promauto.With(r).NewGauge(prometheus.GaugeOpts{
80-
Name: "cortex_ingester_flush_queue_length",
81-
Help: "The total number of series pending in the flush queue.",
82-
}),
8359
ingestedSamples: promauto.With(r).NewCounter(prometheus.CounterOpts{
8460
Name: "cortex_ingester_ingested_samples_total",
8561
Help: "The total number of samples ingested.",
@@ -144,18 +120,6 @@ func newIngesterMetrics(r prometheus.Registerer, createMetricsConflictingWithTSD
144120
Name: "cortex_ingester_memory_users",
145121
Help: "The current number of users in memory.",
146122
}),
147-
createdChunks: promauto.With(r).NewCounter(prometheus.CounterOpts{
148-
Name: "cortex_ingester_chunks_created_total",
149-
Help: "The total number of chunks the ingester has created.",
150-
}),
151-
walReplayDuration: promauto.With(r).NewGauge(prometheus.GaugeOpts{
152-
Name: "cortex_ingester_wal_replay_duration_seconds",
153-
Help: "Time taken to replay the checkpoint and the WAL.",
154-
}),
155-
walCorruptionsTotal: promauto.With(r).NewCounter(prometheus.CounterOpts{
156-
Name: "cortex_ingester_wal_corruptions_total",
157-
Help: "Total number of WAL corruptions encountered.",
158-
}),
159123
memMetadataCreatedTotal: promauto.With(r).NewCounterVec(prometheus.CounterOpts{
160124
Name: "cortex_ingester_memory_metadata_created_total",
161125
Help: "The total number of metadata that were created per user",
@@ -165,64 +129,6 @@ func newIngesterMetrics(r prometheus.Registerer, createMetricsConflictingWithTSD
165129
Help: "The total number of metadata that were removed per user.",
166130
}, []string{"user"}),
167131

168-
// Chunks / blocks transfer.
169-
sentChunks: promauto.With(r).NewCounter(prometheus.CounterOpts{
170-
Name: "cortex_ingester_sent_chunks",
171-
Help: "The total number of chunks sent by this ingester whilst leaving.",
172-
}),
173-
receivedChunks: promauto.With(r).NewCounter(prometheus.CounterOpts{
174-
Name: "cortex_ingester_received_chunks",
175-
Help: "The total number of chunks received by this ingester whilst joining",
176-
}),
177-
178-
// Chunks flushing.
179-
flushSeriesInProgress: promauto.With(r).NewGauge(prometheus.GaugeOpts{
180-
Name: "cortex_ingester_flush_series_in_progress",
181-
Help: "Number of flush series operations in progress.",
182-
}),
183-
chunkUtilization: promauto.With(r).NewHistogram(prometheus.HistogramOpts{
184-
Name: "cortex_ingester_chunk_utilization",
185-
Help: "Distribution of stored chunk utilization (when stored).",
186-
Buckets: prometheus.LinearBuckets(0, 0.2, 6),
187-
}),
188-
chunkLength: promauto.With(r).NewHistogram(prometheus.HistogramOpts{
189-
Name: "cortex_ingester_chunk_length",
190-
Help: "Distribution of stored chunk lengths (when stored).",
191-
Buckets: prometheus.ExponentialBuckets(5, 2, 11), // biggest bucket is 5*2^(11-1) = 5120
192-
}),
193-
chunkSize: promauto.With(r).NewHistogram(prometheus.HistogramOpts{
194-
Name: "cortex_ingester_chunk_size_bytes",
195-
Help: "Distribution of stored chunk sizes (when stored).",
196-
Buckets: prometheus.ExponentialBuckets(500, 2, 7), // biggest bucket is 500*2^(7-1) = 32000
197-
}),
198-
chunkAge: promauto.With(r).NewHistogram(prometheus.HistogramOpts{
199-
Name: "cortex_ingester_chunk_age_seconds",
200-
Help: "Distribution of chunk ages (when stored).",
201-
// with default settings chunks should flush between 5 min and 12 hours
202-
// so buckets at 1min, 5min, 10min, 30min, 1hr, 2hr, 4hr, 10hr, 12hr, 16hr
203-
Buckets: []float64{60, 300, 600, 1800, 3600, 7200, 14400, 36000, 43200, 57600},
204-
}),
205-
memoryChunks: promauto.With(r).NewGauge(prometheus.GaugeOpts{
206-
Name: "cortex_ingester_memory_chunks",
207-
Help: "The total number of chunks in memory.",
208-
}),
209-
seriesEnqueuedForFlush: promauto.With(r).NewCounterVec(prometheus.CounterOpts{
210-
Name: "cortex_ingester_flushing_enqueued_series_total",
211-
Help: "Total number of series enqueued for flushing, with reasons.",
212-
}, []string{"reason"}),
213-
seriesDequeuedOutcome: promauto.With(r).NewCounterVec(prometheus.CounterOpts{
214-
Name: "cortex_ingester_flushing_dequeued_series_total",
215-
Help: "Total number of series dequeued for flushing, with outcome (superset of enqueue reasons)",
216-
}, []string{"outcome"}),
217-
droppedChunks: promauto.With(r).NewCounter(prometheus.CounterOpts{
218-
Name: "cortex_ingester_dropped_chunks_total",
219-
Help: "Total number of chunks dropped from flushing because they have too few samples.",
220-
}),
221-
oldestUnflushedChunkTimestamp: promauto.With(r).NewGauge(prometheus.GaugeOpts{
222-
Name: "cortex_oldest_unflushed_chunk_timestamp_seconds",
223-
Help: "Unix timestamp of the oldest unflushed chunk in the memory",
224-
}),
225-
226132
maxUsersGauge: promauto.With(r).NewGaugeFunc(prometheus.GaugeOpts{
227133
Name: instanceLimits,
228134
Help: instanceLimitsHelp,

0 commit comments

Comments
 (0)