mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2025-06-06 11:38:47 +00:00
Merge pull request #178 from SpencerMalone/patch-1
Scale summaries from milliseconds to seconds.
This commit is contained in:
commit
a566da3f87
2 changed files with 2 additions and 2 deletions
|
@ -420,7 +420,7 @@ func (b *Exporter) handleEvent(event Event) {
|
||||||
mapping,
|
mapping,
|
||||||
)
|
)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
summary.Observe(event.Value())
|
summary.Observe(event.Value() / 1000) // prometheus presumes seconds, statsd millisecond
|
||||||
b.saveLabelValues(metricName, prometheusLabels, mapping.Ttl)
|
b.saveLabelValues(metricName, prometheusLabels, mapping.Ttl)
|
||||||
eventStats.WithLabelValues("timer").Inc()
|
eventStats.WithLabelValues("timer").Inc()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -216,7 +216,7 @@ mappings:
|
||||||
// event with ttl = 2s from a mapping
|
// event with ttl = 2s from a mapping
|
||||||
&TimerEvent{
|
&TimerEvent{
|
||||||
metricName: "bazqux.main",
|
metricName: "bazqux.main",
|
||||||
value: 42,
|
value: 42000,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue