From 6d695bdbf4e8ddbc02680bcfc38299f6afac9db3 Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Thu, 13 Apr 2023 19:41:42 +0200 Subject: [PATCH] Rename received_messages metric to be more conventional This patch renames the ``received_messages`` metric to ``mqtt2prometheus_received_messages_total``, making it a bit more in line with conventional Prometheus metric naming. I also slightly adjusted the descriptions. --- pkg/metrics/instrumentation.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/metrics/instrumentation.go b/pkg/metrics/instrumentation.go index 5dd75eb..6f64ff8 100644 --- a/pkg/metrics/instrumentation.go +++ b/pkg/metrics/instrumentation.go @@ -13,14 +13,14 @@ const ( var defaultInstrumentation = instrumentation{ messageMetric: prometheus.NewCounterVec( prometheus.CounterOpts{ - Name: "received_messages", - Help: "received messages per topic and status", + Name: "mqtt2prometheus_received_messages_total", + Help: "Total number of messages received per topic and status", }, []string{"status", "topic"}, ), connectedMetric: prometheus.NewGauge( prometheus.GaugeOpts{ Name: "mqtt2prometheus_connected", - Help: "is the mqtt2prometheus exporter connected to the broker", + Help: "Whether the mqtt2prometheus exporter is connected to the broker", }, ), }