Skip to content

Commit

Permalink
metrics: improve feature discovery duration metric
Browse files Browse the repository at this point in the history
Rename the "NodeName" prometheus label to  "node", aligning  with
common prometheus/kubernetes conventions. Also reconfigure the
prometheus histogram buckets (now 10ms to 1s) to better match the
expected sample range.
  • Loading branch information
marquiz committed Jul 31, 2023
1 parent 47f621d commit 5091fef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/nfd-worker/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ var (

featureDiscoveryDuration = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Name: featureDiscoveryDurationQuery,
Help: "Time taken to discover features",
Name: featureDiscoveryDurationQuery,
Help: "Time taken to discover features",
Buckets: []float64{0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1},
},
[]string{"NodeName"},
[]string{"node"},
)
buildInfo = prometheus.NewGauge(prometheus.GaugeOpts{
Name: buildInfoQuery,
Expand Down

0 comments on commit 5091fef

Please sign in to comment.