Skip to content

Commit 49eee34

Browse files
authored
feat(RELEASE-1210): add bigger buckets for metrics (konflux-ci#949)
this PR modify the buckets for the release metrics, adding bigger ones as the current are set to one hour max, not giving the proper values of the release processing durations. Signed-off-by: Leandro Mendes <lmendes@redhat.com>
1 parent f0e60af commit 49eee34

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

metrics/release.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ import (
2323
)
2424

2525
var (
26+
hourlyBuckets = []float64{5, 10, 30, 60, 90, 180, 300, 450, 900, 1800, 3600}
27+
dailyBuckets = []float64{3600, 7200, 14400, 21600, 28800, 36000, 43200, 57600, 72000, 86400}
28+
2629
ReleaseConcurrentTotal = prometheus.NewGaugeVec(
2730
prometheus.GaugeOpts{
2831
Name: "release_concurrent_total",
@@ -51,7 +54,7 @@ var (
5154
releasePreProcessingDurationSecondsOpts = prometheus.HistogramOpts{
5255
Name: "release_pre_processing_duration_seconds",
5356
Help: "How long in seconds a Release takes to start processing",
54-
Buckets: []float64{5, 10, 15, 30, 45, 60, 90, 120, 180, 240, 300},
57+
Buckets: hourlyBuckets,
5558
}
5659

5760
ReleaseValidationDurationSeconds = prometheus.NewHistogramVec(
@@ -65,7 +68,7 @@ var (
6568
releaseValidationDurationSecondsOpts = prometheus.HistogramOpts{
6669
Name: "release_validation_duration_seconds",
6770
Help: "How long in seconds a Release takes to validate",
68-
Buckets: []float64{5, 10, 15, 30, 45, 60, 90, 120, 180, 240, 300},
71+
Buckets: hourlyBuckets,
6972
}
7073

7174
ReleaseDurationSeconds = prometheus.NewHistogramVec(
@@ -86,7 +89,7 @@ var (
8689
releaseDurationSecondsOpts = prometheus.HistogramOpts{
8790
Name: "release_duration_seconds",
8891
Help: "How long in seconds a Release takes to complete",
89-
Buckets: []float64{60, 150, 300, 450, 600, 750, 900, 1050, 1200, 1800, 3600},
92+
Buckets: dailyBuckets,
9093
}
9194

9295
ReleaseProcessingDurationSeconds = prometheus.NewHistogramVec(
@@ -101,7 +104,7 @@ var (
101104
releaseProcessingDurationSecondsOpts = prometheus.HistogramOpts{
102105
Name: "release_processing_duration_seconds",
103106
Help: "How long in seconds a Release processing takes to complete",
104-
Buckets: []float64{60, 150, 300, 450, 600, 750, 900, 1050, 1200, 1800, 3600},
107+
Buckets: dailyBuckets,
105108
}
106109

107110
ReleaseTotal = prometheus.NewCounterVec(

0 commit comments

Comments
 (0)