[volumeScheduling/metrics] Fix buckets initialization

This metrics is measured in seconds so it makes no sense starting from
1000 as init value. This breaks also the scheduler e2e metric thus make
users unable to compute, for example, their SLO for the scheduler.
Even if this metric is deprecated, it should behave correctly until it is
completely removed to avoid user confusion.

For example, for each volume created, the minimum value exposed
as a metric is 16.6min (1000sec/60) which is obviously wrong as logic.

In this commit, we migrate bucket creation to start from reasonable
numbers, copying the incrementation from the conventions that the
scheduler follows itself.

Signed-off-by: dntosas <ntosas@gmail.com>
This commit is contained in:
dntosas 2021-03-31 20:23:24 +03:00
parent 027fe2554f
commit 7cbac6bde0

View File

@ -41,7 +41,7 @@ var (
Subsystem: VolumeSchedulerSubsystem,
Name: "scheduling_duration_seconds",
Help: "Volume scheduling stage latency (Deprecated since 1.19.0)",
Buckets: metrics.ExponentialBuckets(1000, 2, 15),
Buckets: metrics.ExponentialBuckets(0.001, 2, 15),
StabilityLevel: metrics.ALPHA,
DeprecatedVersion: "1.19.0",
},