mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-23 15:14:32 +00:00
metrics/influxdb: temp solution to present counter meaningfully (#24811)
This commit is contained in:
parent
d77c1e5ea3
commit
7b0a7e4593
1 changed files with 2 additions and 4 deletions
|
|
@ -104,17 +104,15 @@ func (r *reporter) send() error {
|
|||
|
||||
switch metric := i.(type) {
|
||||
case metrics.Counter:
|
||||
v := metric.Count()
|
||||
l := r.cache[name]
|
||||
count := metric.Count()
|
||||
pts = append(pts, client.Point{
|
||||
Measurement: fmt.Sprintf("%s%s.count", namespace, name),
|
||||
Tags: r.tags,
|
||||
Fields: map[string]interface{}{
|
||||
"value": v - l,
|
||||
"value": count,
|
||||
},
|
||||
Time: now,
|
||||
})
|
||||
r.cache[name] = v
|
||||
case metrics.Gauge:
|
||||
ms := metric.Snapshot()
|
||||
pts = append(pts, client.Point{
|
||||
|
|
|
|||
Loading…
Reference in a new issue