mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-22 15:30:59 +00:00
Scale summaries from milliseconds to seconds.
Fixes #177 Updating exporter tests for new summary unit scaling behavior Signed-off-by: Spencer Malone <malone.spencer@gmail.com>
This commit is contained in:
parent
2d35b097ae
commit
c73a7b2c9a
2 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -216,7 +216,7 @@ mappings:
|
|||
// event with ttl = 2s from a mapping
|
||||
&TimerEvent{
|
||||
metricName: "bazqux.main",
|
||||
value: 42,
|
||||
value: 42000,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue