Skip to content

Commit

Permalink
chore: Change the callsite of the version collector.
Browse files Browse the repository at this point in the history
Prometheus upstream has made another breaking change and rearranged the client
code (without a deprecation notice :D

This will fix the merge of prometheus/[email protected] in #818.
  • Loading branch information
jaqx0r committed Mar 10, 2024
1 parent c2ec311 commit 96fddde
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/mtail/mtail.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 96fddde

Please sign in to comment.