From bcb229ddba7d4f0209f7d38fcbfc690bdc4d9a55 Mon Sep 17 00:00:00 2001 From: Liam Mac Gillavry Date: Thu, 9 Jan 2025 15:36:38 +0100 Subject: [PATCH] change some metrics to be gauges, not counters fixes #12047 --- bolt/metrics.go | 18 +++++++++--------- influxql/query/internal/internal.pb.go | 2 +- pkg/tracing/wire/binary.pb.go | 2 +- storage/reads/datatypes/predicate.pb.go | 2 +- storage/reads/datatypes/storage_common.pb.go | 2 +- tsdb/internal/fieldsindex.pb.go | 2 +- v1/services/meta/internal/meta.pb.go | 2 +- v1/services/storage/source.pb.go | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/bolt/metrics.go b/bolt/metrics.go index d47314cdd78..e844eb58e42 100644 --- a/bolt/metrics.go +++ b/bolt/metrics.go @@ -239,55 +239,55 @@ func (c *Client) Collect(ch chan<- prometheus.Metric) { ch <- prometheus.MustNewConstMetric( orgsDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(orgs), ) ch <- prometheus.MustNewConstMetric( bucketsDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(buckets), ) ch <- prometheus.MustNewConstMetric( usersDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(users), ) ch <- prometheus.MustNewConstMetric( tokensDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(tokens), ) ch <- prometheus.MustNewConstMetric( dashboardsDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(dashboards), ) ch <- prometheus.MustNewConstMetric( scrapersDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(scrapers), ) ch <- prometheus.MustNewConstMetric( telegrafsDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(telegrafs), ) ch <- prometheus.MustNewConstMetric( remoteDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(remotes), ) ch <- prometheus.MustNewConstMetric( replicationDesc, - prometheus.CounterValue, + prometheus.GaugeValue, float64(replications), ) diff --git a/influxql/query/internal/internal.pb.go b/influxql/query/internal/internal.pb.go index 9aa15a29c21..0c6e8f4e6e6 100644 --- a/influxql/query/internal/internal.pb.go +++ b/influxql/query/internal/internal.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v5.26.1 +// protoc v3.21.12 // source: internal/internal.proto package query diff --git a/pkg/tracing/wire/binary.pb.go b/pkg/tracing/wire/binary.pb.go index a862f347ddd..9dd6d4d6549 100644 --- a/pkg/tracing/wire/binary.pb.go +++ b/pkg/tracing/wire/binary.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v5.26.1 +// protoc v3.21.12 // source: binary.proto package wire diff --git a/storage/reads/datatypes/predicate.pb.go b/storage/reads/datatypes/predicate.pb.go index 387ddb76535..97f6a8f2d29 100644 --- a/storage/reads/datatypes/predicate.pb.go +++ b/storage/reads/datatypes/predicate.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v5.26.1 +// protoc v3.21.12 // source: predicate.proto package datatypes diff --git a/storage/reads/datatypes/storage_common.pb.go b/storage/reads/datatypes/storage_common.pb.go index bd307bd043f..c379a9c9b89 100644 --- a/storage/reads/datatypes/storage_common.pb.go +++ b/storage/reads/datatypes/storage_common.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v5.26.1 +// protoc v3.21.12 // source: storage_common.proto package datatypes diff --git a/tsdb/internal/fieldsindex.pb.go b/tsdb/internal/fieldsindex.pb.go index 5ff6cd2e770..8bfbf5709ab 100644 --- a/tsdb/internal/fieldsindex.pb.go +++ b/tsdb/internal/fieldsindex.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v5.26.1 +// protoc v3.21.12 // source: internal/fieldsindex.proto package tsdb diff --git a/v1/services/meta/internal/meta.pb.go b/v1/services/meta/internal/meta.pb.go index 68bddf264a1..94adf32672c 100644 --- a/v1/services/meta/internal/meta.pb.go +++ b/v1/services/meta/internal/meta.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v5.26.1 +// protoc v3.21.12 // source: internal/meta.proto package meta diff --git a/v1/services/storage/source.pb.go b/v1/services/storage/source.pb.go index 7248372ad1e..b99d838af9d 100644 --- a/v1/services/storage/source.pb.go +++ b/v1/services/storage/source.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v5.26.1 +// protoc v3.21.12 // source: source.proto package storage