Skip to content

Commit b6e7a8c

Browse files
authored
Merge pull request #20 from bytheway/bucket-sum
Stackdriver doesn't provide a sum, but it does provide a mean and a count.
2 parents 845e9f4 + c8b30a1 commit b6e7a8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

collectors/monitoring_collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ func (c *MonitoringCollector) reportTimeSeriesMetrics(
302302
ch <- prometheus.MustNewConstHistogram(
303303
metricDesc,
304304
uint64(dist.Count),
305-
0, // Stackdriver does not provide the sum
305+
dist.Mean*float64(dist.Count), // Stackdriver does not provide the sum, but we can fake it
306306
buckets,
307307
labelValues...,
308308
)

0 commit comments

Comments
 (0)