add metrics for discarding events
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
This commit is contained in:
parent
165f8e414e
commit
54baf766e5
@ -457,6 +457,7 @@ func (c *criService) generateAndSendContainerEvent(ctx context.Context, containe
|
|||||||
select {
|
select {
|
||||||
case c.containerEventsChan <- event:
|
case c.containerEventsChan <- event:
|
||||||
default:
|
default:
|
||||||
|
containerEventsDroppedCount.Inc()
|
||||||
log.G(ctx).Debugf("containerEventsChan is full, discarding event %+v", event)
|
log.G(ctx).Debugf("containerEventsChan is full, discarding event %+v", event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,11 +29,12 @@ var (
|
|||||||
sandboxRuntimeStopTimer metrics.LabeledTimer
|
sandboxRuntimeStopTimer metrics.LabeledTimer
|
||||||
sandboxRemoveTimer metrics.LabeledTimer
|
sandboxRemoveTimer metrics.LabeledTimer
|
||||||
|
|
||||||
containerListTimer metrics.Timer
|
containerListTimer metrics.Timer
|
||||||
containerRemoveTimer metrics.LabeledTimer
|
containerRemoveTimer metrics.LabeledTimer
|
||||||
containerCreateTimer metrics.LabeledTimer
|
containerCreateTimer metrics.LabeledTimer
|
||||||
containerStopTimer metrics.LabeledTimer
|
containerStopTimer metrics.LabeledTimer
|
||||||
containerStartTimer metrics.LabeledTimer
|
containerStartTimer metrics.LabeledTimer
|
||||||
|
containerEventsDroppedCount metrics.Counter
|
||||||
|
|
||||||
networkPluginOperations metrics.LabeledCounter
|
networkPluginOperations metrics.LabeledCounter
|
||||||
networkPluginOperationsErrors metrics.LabeledCounter
|
networkPluginOperationsErrors metrics.LabeledCounter
|
||||||
@ -57,6 +58,7 @@ func init() {
|
|||||||
containerCreateTimer = ns.NewLabeledTimer("container_create", "time to create a container", "runtime")
|
containerCreateTimer = ns.NewLabeledTimer("container_create", "time to create a container", "runtime")
|
||||||
containerStopTimer = ns.NewLabeledTimer("container_stop", "time to stop 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")
|
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")
|
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")
|
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 {
|
select {
|
||||||
case c.containerEventsChan <- event:
|
case c.containerEventsChan <- event:
|
||||||
default:
|
default:
|
||||||
|
containerEventsDroppedCount.Inc()
|
||||||
logrus.Debugf("containerEventsChan is full, discarding event %+v", event)
|
logrus.Debugf("containerEventsChan is full, discarding event %+v", event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,11 +30,12 @@ var (
|
|||||||
sandboxRuntimeStopTimer metrics.LabeledTimer
|
sandboxRuntimeStopTimer metrics.LabeledTimer
|
||||||
sandboxRemoveTimer metrics.LabeledTimer
|
sandboxRemoveTimer metrics.LabeledTimer
|
||||||
|
|
||||||
containerListTimer metrics.Timer
|
containerListTimer metrics.Timer
|
||||||
containerRemoveTimer metrics.LabeledTimer
|
containerRemoveTimer metrics.LabeledTimer
|
||||||
containerCreateTimer metrics.LabeledTimer
|
containerCreateTimer metrics.LabeledTimer
|
||||||
containerStopTimer metrics.LabeledTimer
|
containerStopTimer metrics.LabeledTimer
|
||||||
containerStartTimer metrics.LabeledTimer
|
containerStartTimer metrics.LabeledTimer
|
||||||
|
containerEventsDroppedCount metrics.Counter
|
||||||
|
|
||||||
networkPluginOperations metrics.LabeledCounter
|
networkPluginOperations metrics.LabeledCounter
|
||||||
networkPluginOperationsErrors metrics.LabeledCounter
|
networkPluginOperationsErrors metrics.LabeledCounter
|
||||||
@ -68,6 +69,7 @@ func init() {
|
|||||||
containerCreateTimer = ns.NewLabeledTimer("container_create", "time to create a container", "runtime")
|
containerCreateTimer = ns.NewLabeledTimer("container_create", "time to create a container", "runtime")
|
||||||
containerStopTimer = ns.NewLabeledTimer("container_stop", "time to stop 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")
|
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")
|
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")
|
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