mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
cloud monitor is returning floats and we are trying to parse as strings (#65407)
This commit is contained in:
parent
c8252f9987
commit
f0ddf900c0
@ -548,7 +548,7 @@ func calcBucketBound(bucketOptions cloudMonitoringBucketOptions, n int) string {
|
||||
|
||||
switch {
|
||||
case bucketOptions.LinearBuckets != nil:
|
||||
bucketBound = strconv.FormatInt(bucketOptions.LinearBuckets.Offset+(bucketOptions.LinearBuckets.Width*int64(n-1)), 10)
|
||||
bucketBound = strconv.FormatFloat(bucketOptions.LinearBuckets.Offset+(bucketOptions.LinearBuckets.Width*float64(n-1)), 'f', 2, 64)
|
||||
case bucketOptions.ExponentialBuckets != nil:
|
||||
bucketBound = strconv.FormatInt(int64(bucketOptions.ExponentialBuckets.Scale*math.Pow(bucketOptions.ExponentialBuckets.GrowthFactor, float64(n-1))), 10)
|
||||
case bucketOptions.ExplicitBuckets != nil:
|
||||
|
@ -107,9 +107,9 @@ type (
|
||||
|
||||
cloudMonitoringBucketOptions struct {
|
||||
LinearBuckets *struct {
|
||||
NumFiniteBuckets int64 `json:"numFiniteBuckets"`
|
||||
Width int64 `json:"width"`
|
||||
Offset int64 `json:"offset"`
|
||||
NumFiniteBuckets int64 `json:"numFiniteBuckets"`
|
||||
Width float64 `json:"width"`
|
||||
Offset float64 `json:"offset"`
|
||||
} `json:"linearBuckets"`
|
||||
ExponentialBuckets *struct {
|
||||
NumFiniteBuckets int64 `json:"numFiniteBuckets"`
|
||||
|
Loading…
Reference in New Issue
Block a user