Merge pull request #178 from SpencerMalone/patch-1

Scale summaries from milliseconds to seconds.
This commit is contained in:
Matthias Rampke 2019-01-09 17:54:18 +00:00 committed by GitHub
commit a566da3f87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -420,7 +420,7 @@ func (b *Exporter) handleEvent(event Event) {
mapping,
)
if err == nil {
summary.Observe(event.Value())
summary.Observe(event.Value() / 1000) // prometheus presumes seconds, statsd millisecond
b.saveLabelValues(metricName, prometheusLabels, mapping.Ttl)
eventStats.WithLabelValues("timer").Inc()
} else {

View file

@ -216,7 +216,7 @@ mappings:
// event with ttl = 2s from a mapping
&TimerEvent{
metricName: "bazqux.main",
value: 42,
value: 42000,
},
}