Skip to content

Commit

Permalink
Merge pull request #474 from hateeyan/build_info
Browse files Browse the repository at this point in the history
fix: incorrect build_info metric introduced in 9df9db8
  • Loading branch information
danielqsj authored Feb 13, 2025
2 parents 12dc679 + 6bc6c41 commit 5ccad07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kafka_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"github.com/krallistic/kazoo-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/client_golang/prometheus/promhttp"
plog "github.com/prometheus/common/promlog"
plogflag "github.com/prometheus/common/promlog/flag"

versionCollector "github.com/prometheus/client_golang/prometheus/collectors/version"
"github.com/prometheus/common/version"
"github.com/rcrowley/go-metrics"
"k8s.io/klog/v2"
Expand Down Expand Up @@ -707,7 +707,7 @@ func (e *Exporter) collect(ch chan<- prometheus.Metric) {

func init() {
metrics.UseNilMetrics = true
prometheus.MustRegister(collectors.NewBuildInfoCollector())
prometheus.MustRegister(versionCollector.NewCollector("kafka_exporter"))
}

//func toFlag(name string, help string) *kingpin.FlagClause {
Expand Down

0 comments on commit 5ccad07

Please # to comment.