Skip to content

Commit

Permalink
pkg/ipam: Update histogram buckets for trigger metrics
Browse files Browse the repository at this point in the history
Currently, trigger related histogram metrics in pgk/ipam use the default
prometheus histogram buckets. Resync operation in cloud providers like
Azure tend to take a long time and the current buckets are inadequate to
track changes in behavior. This commit extends the buckets to allow for
measuring longer durations.

Signed-off-by: Hemanth Malla <hemanth.malla@datadoghq.com>
  • Loading branch information
hemanthmalla committed Jun 5, 2023
1 parent 6d4b2f7 commit 3410629
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/ipam/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,16 @@ func NewTriggerMetrics(namespace, name string) *triggerMetrics {
Subsystem: ipamSubsystem,
Name: name + "_duration_seconds",
Help: "Duration of trigger runs",
Buckets: []float64{0.005, 0.025, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0, 1.25, 1.5, 2, 3,
4, 5, 6, 8, 10, 15, 20, 30, 45, 60},
}),
latency: prometheus.NewHistogram(prometheus.HistogramOpts{
Namespace: namespace,
Subsystem: ipamSubsystem,
Name: name + "_latency_seconds",
Help: "Latency between queue and trigger run",
Buckets: []float64{0.005, 0.025, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0, 1.25, 1.5, 2, 3,
4, 5, 6, 8, 10, 15, 20, 30, 45, 60},
}),
}
}
Expand Down

0 comments on commit 3410629

Please sign in to comment.