From 3120b9d455e0a690b6bcf1a86622a30b67576abc Mon Sep 17 00:00:00 2001 From: gi8 Date: Thu, 13 Jun 2024 17:00:05 +0200 Subject: [PATCH] improve metrics --- pkg/metrics/metrics.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index 2aa34e0..0bf1b8b 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -45,8 +45,8 @@ func init() { // NewMetrics creates and initializes a new Metrics instance with all relevant metrics registered. func NewMetrics() *Metrics { reg := prometheus.NewRegistry() - _ = reg.Register(HeartbeatStatus) // Register the global metric - _ = reg.Register(TotalHeartbeats) // Register the new metric + reg.MustRegister(HeartbeatStatus) + reg.MustRegister(TotalHeartbeats) return &Metrics{ Registry: reg,