add metrics for discarding events

Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
This commit is contained in:
rongfu.leng
2023-08-08 22:40:27 +08:00
parent 165f8e414e
commit 54baf766e5
4 changed files with 16 additions and 10 deletions

View File

@@ -534,6 +534,7 @@ func (c *criService) generateAndSendContainerEvent(ctx context.Context, containe
select {
case c.containerEventsChan <- event:
default:
containerEventsDroppedCount.Inc()
logrus.Debugf("containerEventsChan is full, discarding event %+v", event)
}
}