fix(remote): rename some remote read related metrics for better clarity.

From the remote read handler side:

prometheus_api_remote_read_queries -> prometheus_remote_read_handler_queries

From the remote read client side:

prometheus_remote_storage_read_queries_total -> prometheus_remote_read_client_queries_total
prometheus_remote_storage_remote_read_queries -> prometheus_remote_read_client_queries
prometheus_remote_storage_read_request_duration_seconds -> prometheus_remote_read_client_request_duration_seconds

Signed-off-by: machine424 <ayoubmrini424@gmail.com>
This commit is contained in:
machine424 2024-12-05 13:28:15 +01:00
parent af2a1cb10c
commit 7aa1f4571b
No known key found for this signature in database
GPG key ID: A4B001A4FDEE017D
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 {