mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
Resurrect and rename invalid preload requests count metric.
It is now also used in label matching, so the name of the metric changed from `prometheus_local_storage_invalid_preload_requests_total` to `non_existent_series_matches_total'.
This commit is contained in:
parent
2e4e2459a9
commit
199f309a39
|
@ -164,7 +164,7 @@ type memorySeriesStorage struct {
|
||||||
seriesOps *prometheus.CounterVec
|
seriesOps *prometheus.CounterVec
|
||||||
ingestedSamplesCount prometheus.Counter
|
ingestedSamplesCount prometheus.Counter
|
||||||
outOfOrderSamplesCount prometheus.Counter
|
outOfOrderSamplesCount prometheus.Counter
|
||||||
invalidPreloadRequestsCount prometheus.Counter
|
nonExistentSeriesMatchesCount prometheus.Counter
|
||||||
maintainSeriesDuration *prometheus.SummaryVec
|
maintainSeriesDuration *prometheus.SummaryVec
|
||||||
persistenceUrgencyScore prometheus.Gauge
|
persistenceUrgencyScore prometheus.Gauge
|
||||||
rushedMode prometheus.Gauge
|
rushedMode prometheus.Gauge
|
||||||
|
@ -248,11 +248,11 @@ func NewMemorySeriesStorage(o *MemorySeriesStorageOptions) Storage {
|
||||||
Name: "out_of_order_samples_total",
|
Name: "out_of_order_samples_total",
|
||||||
Help: "The total number of samples that were discarded because their timestamps were at or before the last received sample for a series.",
|
Help: "The total number of samples that were discarded because their timestamps were at or before the last received sample for a series.",
|
||||||
}),
|
}),
|
||||||
invalidPreloadRequestsCount: prometheus.NewCounter(prometheus.CounterOpts{
|
nonExistentSeriesMatchesCount: prometheus.NewCounter(prometheus.CounterOpts{
|
||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
Subsystem: subsystem,
|
Subsystem: subsystem,
|
||||||
Name: "invalid_preload_requests_total",
|
Name: "non_existent_series_matches_total",
|
||||||
Help: "The total number of preload requests referring to a non-existent series. This is an indication of outdated label indexes.",
|
Help: "How often a non-existent series was referred to during label matching or chunk preloading. This is an indication of outdated label indexes.",
|
||||||
}),
|
}),
|
||||||
maintainSeriesDuration: prometheus.NewSummaryVec(
|
maintainSeriesDuration: prometheus.NewSummaryVec(
|
||||||
prometheus.SummaryOpts{
|
prometheus.SummaryOpts{
|
||||||
|
@ -545,7 +545,11 @@ func (s *memorySeriesStorage) metricForRange(
|
||||||
// The range lookup is relatively cheap, so let's do it first if
|
// The range lookup is relatively cheap, so let's do it first if
|
||||||
// we have a chance the archived metric is not in the range.
|
// we have a chance the archived metric is not in the range.
|
||||||
has, first, last := s.persistence.hasArchivedMetric(fp)
|
has, first, last := s.persistence.hasArchivedMetric(fp)
|
||||||
if !has || first.After(through) || last.Before(from) {
|
if !has {
|
||||||
|
s.nonExistentSeriesMatchesCount.Inc()
|
||||||
|
return nil, nil, false
|
||||||
|
}
|
||||||
|
if first.After(through) || last.Before(from) {
|
||||||
return nil, nil, false
|
return nil, nil, false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1496,7 @@ func (s *memorySeriesStorage) Describe(ch chan<- *prometheus.Desc) {
|
||||||
s.seriesOps.Describe(ch)
|
s.seriesOps.Describe(ch)
|
||||||
ch <- s.ingestedSamplesCount.Desc()
|
ch <- s.ingestedSamplesCount.Desc()
|
||||||
ch <- s.outOfOrderSamplesCount.Desc()
|
ch <- s.outOfOrderSamplesCount.Desc()
|
||||||
ch <- s.invalidPreloadRequestsCount.Desc()
|
ch <- s.nonExistentSeriesMatchesCount.Desc()
|
||||||
ch <- numMemChunksDesc
|
ch <- numMemChunksDesc
|
||||||
s.maintainSeriesDuration.Describe(ch)
|
s.maintainSeriesDuration.Describe(ch)
|
||||||
ch <- s.persistenceUrgencyScore.Desc()
|
ch <- s.persistenceUrgencyScore.Desc()
|
||||||
|
@ -1519,7 +1523,7 @@ func (s *memorySeriesStorage) Collect(ch chan<- prometheus.Metric) {
|
||||||
s.seriesOps.Collect(ch)
|
s.seriesOps.Collect(ch)
|
||||||
ch <- s.ingestedSamplesCount
|
ch <- s.ingestedSamplesCount
|
||||||
ch <- s.outOfOrderSamplesCount
|
ch <- s.outOfOrderSamplesCount
|
||||||
ch <- s.invalidPreloadRequestsCount
|
ch <- s.nonExistentSeriesMatchesCount
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
numMemChunksDesc,
|
numMemChunksDesc,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|
Loading…
Reference in a new issue