From 96fdddeb1e64b9f8edb37b6ed85402efa77d3080 Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Sun, 10 Mar 2024 17:58:19 +1100 Subject: [PATCH] chore: Change the callsite of the version collector. Prometheus upstream has made another breaking change and rearranged the client code (without a deprecation notice :D This will fix the merge of prometheus/common@0.50.0 in #818. --- internal/mtail/mtail.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/mtail/mtail.go b/internal/mtail/mtail.go index fa274bb3d..6054f841c 100644 --- a/internal/mtail/mtail.go +++ b/internal/mtail/mtail.go @@ -22,7 +22,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/prometheus/common/version" + vc "github.com/prometheus/client_golang/prometheus/collectors/version" + "github.com/prometheus/common/version" "go.opencensus.io/zpages" ) @@ -77,7 +78,7 @@ func (m *Server) initExporter() (err error) { version.Version = m.buildInfo.Version version.Revision = m.buildInfo.Revision }) - m.reg.MustRegister(version.NewCollector("mtail")) + m.reg.MustRegister(vc.NewCollector("mtail")) return nil }