Blob Blame History Raw
From deb9b0293a5bb32053c74442d7c933aec6091903 Mon Sep 17 00:00:00 2001
From: George Robinson <george.robinson@grafana.com>
Date: Fri, 12 Apr 2024 14:25:20 +0200
Subject: [PATCH] Bump prometheus/common to v0.52.3

This commit bumps prometheus/common to v0.52.3. It has a breaking
change where the metric alertmanager_build_info has been renamed
to go_build_info as the metric has been moved from prometheus/common
to prometheus/client_golang and the namspace argument has been
removed.

Signed-off-by: George Robinson <george.robinson@grafana.com>
---
 cmd/alertmanager/main.go |  3 ++-
 go.mod                   | 14 +++++++-------
 go.sum                   | 28 ++++++++++++++--------------
 3 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/cmd/alertmanager/main.go b/cmd/alertmanager/main.go
index c3e9d1b239..93780b8edb 100644
--- a/cmd/alertmanager/main.go
+++ b/cmd/alertmanager/main.go
@@ -33,6 +33,7 @@ import (
 	"github.com/go-kit/log"
 	"github.com/go-kit/log/level"
 	"github.com/prometheus/client_golang/prometheus"
+	"github.com/prometheus/client_golang/prometheus/collectors"
 	"github.com/prometheus/client_golang/prometheus/promhttp"
 	"github.com/prometheus/common/model"
 	"github.com/prometheus/common/promlog"
@@ -114,7 +115,7 @@ func init() {
 	prometheus.MustRegister(configuredReceivers)
 	prometheus.MustRegister(configuredIntegrations)
 	prometheus.MustRegister(configuredInhibitionRules)
-	prometheus.MustRegister(version.NewCollector("alertmanager"))
+	prometheus.MustRegister(collectors.NewBuildInfoCollector())
 }
 
 func instrumentHandler(handlerName string, handler http.HandlerFunc) http.HandlerFunc {