collector: publish base units and _total counter names (#2743)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-16 10:48:26 +02:00
committed by GitHub
parent dc8092f46d
commit 3fb18521f6
131 changed files with 1674 additions and 1459 deletions
-13
View File
@@ -53,7 +53,6 @@ type Collector struct {
copyReadsTotal *prometheus.Desc
dataFlushesTotal *prometheus.Desc
dataFlushPagesTotal *prometheus.Desc
dataMapHitsPercent *prometheus.Desc
dataMapHitsTotal *prometheus.Desc
dataMapPinsTotal *prometheus.Desc
dataMapsTotal *prometheus.Desc
@@ -164,12 +163,6 @@ func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
"Number of data-map requests that hit the cache.",
nil, nil,
)
c.dataMapHitsPercent = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "data_map_hits_percent"),
"Deprecated: raw data-map hit count, not a percentage. Use windows_cache_data_map_hits_total.",
nil,
nil,
)
c.dataMapPinsTotal = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "data_map_pins_total"),
"(DataMapPinsTotal)",
@@ -364,12 +357,6 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric, _ time.Duration) error
c.perfDataObject[0].DataMapHitsTotal,
)
ch <- prometheus.MustNewConstMetric(
c.dataMapHitsPercent,
prometheus.GaugeValue,
c.perfDataObject[0].DataMapHitsTotal,
)
ch <- prometheus.MustNewConstMetric(
c.dataMapPinsTotal,
prometheus.CounterValue,