Skip to content

Commit

Permalink
Do not register compat metrics in amtool (prometheus#3713)
Browse files Browse the repository at this point in the history
There is no need to register these metrics in amtool, so use
compat.NewMetrics(nil) instead of compat.RegisteredMetrics.

Signed-off-by: George Robinson <george.robinson@grafana.com>
Signed-off-by: Gokhan Sari <gokhan@sari.me>
  • Loading branch information
grobinson-grafana authored and th0th committed Mar 23, 2024
1 parent 4778452 commit 2c939f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func initMatchersCompat(_ *kingpin.ParseContext) error {
if err != nil {
kingpin.Fatalf("error parsing the feature flag list: %v\n", err)
}
compat.InitFromFlags(logger, compat.RegisteredMetrics, featureConfig)
compat.InitFromFlags(logger, compat.NewMetrics(nil), featureConfig)
return nil
}

Expand Down

0 comments on commit 2c939f3

Please sign in to comment.