forked from mirrors/statsd_exporter
Fix TTL bug
lastRegistredAt element was only set at creation of a time series. Now it is updated every time a new event is seen for that time series. Signed-off-by: Cedric Den Haese <cedric.den.haese@gmail.com>
This commit is contained in:
parent
d56b864f83
commit
ccd86002cf
1 changed files with 2 additions and 0 deletions
|
@ -169,6 +169,8 @@ func (r *registry) get(metricName string, hash labelHash, metricType metricType)
|
|||
|
||||
rm, ok := metric.metrics[hash.values]
|
||||
if ok {
|
||||
now := clock.Now()
|
||||
rm.lastRegisteredAt = now
|
||||
return metric.vectors[hash.names].holder, rm.metric
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue