mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
reset counter after collecting metric (#6798)
Signed-off-by: HelenXu <helenxu@Helens-MacBook-Pro.local>
This commit is contained in:
parent
ff0003e072
commit
7df4fe3faa
|
@ -825,8 +825,8 @@ func (s *shards) runShard(ctx context.Context, shardID int, queue chan sample) {
|
|||
if nPending > 0 {
|
||||
level.Debug(s.qm.logger).Log("msg", "runShard timer ticked, sending samples", "samples", nPending, "shard", shardNum)
|
||||
s.sendSamples(ctx, pendingSamples[:nPending], &buf)
|
||||
nPending = 0
|
||||
s.qm.pendingSamplesMetric.Sub(float64(nPending))
|
||||
nPending = 0
|
||||
}
|
||||
timer.Reset(time.Duration(s.qm.cfg.BatchSendDeadline))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue