Skip to content

Commit

Permalink
Merge pull request #164 from dieend/histogram-metrics
Browse files Browse the repository at this point in the history
Change the metric bucket into a more useful range.
  • Loading branch information
stefanprodan authored Mar 21, 2023
2 parents 9011841 + d19ab65 commit 5da79e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions runtime/metrics/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ func NewRecorder() *Recorder {
),
durationHistogram: prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Name: "gotk_reconcile_duration_seconds",
Help: "The duration in seconds of a GitOps Toolkit resource reconciliation.",
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
Name: "gotk_reconcile_duration_seconds",
Help: "The duration in seconds of a GitOps Toolkit resource reconciliation.",
// Use a histogram with 10 count buckets between 1ms - 1hour
Buckets: prometheus.ExponentialBucketsRange(10e-3, 1800, 10),
},
[]string{"kind", "name", "namespace"},
),
Expand Down

0 comments on commit 5da79e1

Please sign in to comment.