Merge pull request #8935 from lengrongfu/feat/add-metrics-for-dropped-events
add metrics for discarding events
This commit is contained in:
commit
de066a37dc
@ -457,6 +457,7 @@ func (c *criService) generateAndSendContainerEvent(ctx context.Context, containe
|
||||
select {
|
||||
case c.containerEventsChan <- event:
|
||||
default:
|
||||
containerEventsDroppedCount.Inc()
|
||||
log.G(ctx).Debugf("containerEventsChan is full, discarding event %+v", event)
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ var (
|
||||
containerCreateTimer metrics.LabeledTimer
|
||||
containerStopTimer metrics.LabeledTimer
|
||||
containerStartTimer metrics.LabeledTimer
|
||||
containerEventsDroppedCount metrics.Counter
|
||||
|
||||
networkPluginOperations metrics.LabeledCounter
|
||||
networkPluginOperationsErrors metrics.LabeledCounter
|
||||
@ -57,6 +58,7 @@ func init() {
|
||||
containerCreateTimer = ns.NewLabeledTimer("container_create", "time to create a container", "runtime")
|
||||
containerStopTimer = ns.NewLabeledTimer("container_stop", "time to stop a container", "runtime")
|
||||
containerStartTimer = ns.NewLabeledTimer("container_start", "time to start a container", "runtime")
|
||||
containerEventsDroppedCount = ns.NewCounter("container_events_dropped", "count container discarding event total from server start")
|
||||
|
||||
networkPluginOperations = ns.NewLabeledCounter("network_plugin_operations_total", "cumulative number of network plugin operations by operation type", "operation_type")
|
||||
networkPluginOperationsErrors = ns.NewLabeledCounter("network_plugin_operations_errors_total", "cumulative number of network plugin operations by operation type", "operation_type")
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ var (
|
||||
containerCreateTimer metrics.LabeledTimer
|
||||
containerStopTimer metrics.LabeledTimer
|
||||
containerStartTimer metrics.LabeledTimer
|
||||
containerEventsDroppedCount metrics.Counter
|
||||
|
||||
networkPluginOperations metrics.LabeledCounter
|
||||
networkPluginOperationsErrors metrics.LabeledCounter
|
||||
@ -68,6 +69,7 @@ func init() {
|
||||
containerCreateTimer = ns.NewLabeledTimer("container_create", "time to create a container", "runtime")
|
||||
containerStopTimer = ns.NewLabeledTimer("container_stop", "time to stop a container", "runtime")
|
||||
containerStartTimer = ns.NewLabeledTimer("container_start", "time to start a container", "runtime")
|
||||
containerEventsDroppedCount = ns.NewCounter("container_events_dropped", "count container discarding event total from server start")
|
||||
|
||||
networkPluginOperations = ns.NewLabeledCounter("network_plugin_operations_total", "cumulative number of network plugin operations by operation type", "operation_type")
|
||||
networkPluginOperationsErrors = ns.NewLabeledCounter("network_plugin_operations_errors_total", "cumulative number of network plugin operations by operation type", "operation_type")
|
||||
|
Loading…
Reference in New Issue
Block a user