Merge pull request #15541 from machine424/wellwellwell

fix(remote): rename some remote read related metrics for better clarity and consistency
This commit is contained in:
Bartlomiej Plotka 2025-01-16 15:25:45 +01:00 committed by GitHub
commit a3c7f72ad0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -81,8 +81,8 @@ var (
remoteReadQueriesTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "read_queries_total",
Subsystem: "remote_read_client",
Name: "queries_total",
Help: "The total number of remote read queries.",
},
[]string{remoteName, endpoint, "response_type", "code"},
@ -90,8 +90,8 @@ var (
remoteReadQueries = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "remote_read_queries",
Subsystem: "remote_read_client",
Name: "queries",
Help: "The number of in-flight remote read queries.",
},
[]string{remoteName, endpoint},
@ -99,8 +99,8 @@ var (
remoteReadQueryDuration = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: namespace,
Subsystem: subsystem,
Name: "read_request_duration_seconds",
Subsystem: "remote_read_client",
Name: "request_duration_seconds",
Help: "Histogram of the latency for remote read requests. Note that for streamed responses this is only the duration of the initial call and does not include the processing of the stream.",
Buckets: append(prometheus.DefBuckets, 25, 60),
NativeHistogramBucketFactor: 1.1,

View File

@ -56,10 +56,10 @@ func NewReadHandler(logger *slog.Logger, r prometheus.Registerer, queryable stor
marshalPool: &sync.Pool{},
queries: prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: "prometheus",
Subsystem: "api", // TODO: changes to storage in Prometheus 3.0.
Name: "remote_read_queries",
Help: "The current number of remote read queries being executed or waiting.",
Namespace: namespace,
Subsystem: "remote_read_handler",
Name: "queries",
Help: "The current number of remote read queries that are either in execution or queued on the handler.",
}),
}
if r != nil {