Skip to content

Commit

Permalink
Rename received_messages metric to be more conventional
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexbakker authored and Christian Schneider committed Feb 5, 2024
1 parent dbd47d3 commit 6d695bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/metrics/instrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
),
}
Expand Down

0 comments on commit 6d695bd

Please sign in to comment.