Skip to content

Commit

Permalink
Use full name for subsystem_request_histogram metric field
Browse files Browse the repository at this point in the history
  • Loading branch information
krisleipus committed Oct 31, 2023
1 parent cbbc05e commit 0dd1b19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct Inner {
#[derive(Debug)]
pub struct ExporterMetrics {
/// Subsystem request histogram
subsystem_req_histogram: HistogramVec,
subsystem_request_histogram: HistogramVec,
/// Cluster health status
cluster_health_status: IntGaugeVec,
}
Expand Down Expand Up @@ -167,7 +167,7 @@ impl Exporter {
let _ = const_labels.insert("cluster".into(), cluster_name.clone());

let metrics = ExporterMetrics {
subsystem_req_histogram: HistogramVec::new(
subsystem_request_histogram: HistogramVec::new(
HistogramOpts::new(
"subsystem_request_duration_seconds",
"The Elasticsearch subsystem request latencies in seconds.",
Expand All @@ -189,7 +189,7 @@ impl Exporter {
};

default_registry().register(Box::new(metrics.cluster_health_status.clone()))?;
default_registry().register(Box::new(metrics.subsystem_req_histogram.clone()))?;
default_registry().register(Box::new(metrics.subsystem_request_histogram.clone()))?;

Ok(Self(Arc::new(Inner {
cluster_name,
Expand Down
2 changes: 1 addition & 1 deletion src/metadata/node_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub(crate) async fn poll(exporter: Exporter) {

let timer: prometheus::HistogramTimer = exporter
.metrics()
.subsystem_req_histogram
.subsystem_request_histogram
.with_label_values(&["/_nodes/os", exporter.cluster_name()])
.start_timer();

Expand Down

0 comments on commit 0dd1b19

Please sign in to comment.