mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #86167 from yiyang5055/change-CounterVec-to-Counter
change CounterVec to use Counter in the Kubelet's Pod Lifecycle Event…
This commit is contained in:
commit
03e90b80ce
@ -165,17 +165,16 @@ var (
|
|||||||
StabilityLevel: metrics.ALPHA,
|
StabilityLevel: metrics.ALPHA,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
// PLEGDiscardEvents is a Histogram that tracks the duration (in seconds) it takes for discarding events in the Kubelet's
|
// PLEGDiscardEvents is a Counter that tracks the number of discarding events in the Kubelet's Pod Lifecycle Event Generator (PLEG).
|
||||||
// Pod Lifecycle Event Generator (PLEG).
|
PLEGDiscardEvents = metrics.NewCounter(
|
||||||
PLEGDiscardEvents = metrics.NewCounterVec(
|
|
||||||
&metrics.CounterOpts{
|
&metrics.CounterOpts{
|
||||||
Subsystem: KubeletSubsystem,
|
Subsystem: KubeletSubsystem,
|
||||||
Name: PLEGDiscardEventsKey,
|
Name: PLEGDiscardEventsKey,
|
||||||
Help: "The number of discard events in PLEG.",
|
Help: "The number of discard events in PLEG.",
|
||||||
StabilityLevel: metrics.ALPHA,
|
StabilityLevel: metrics.ALPHA,
|
||||||
},
|
},
|
||||||
[]string{},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// PLEGRelistInterval is a Histogram that tracks the intervals (in seconds) between relisting in the Kubelet's
|
// PLEGRelistInterval is a Histogram that tracks the intervals (in seconds) between relisting in the Kubelet's
|
||||||
// Pod Lifecycle Event Generator (PLEG).
|
// Pod Lifecycle Event Generator (PLEG).
|
||||||
PLEGRelistInterval = metrics.NewHistogram(
|
PLEGRelistInterval = metrics.NewHistogram(
|
||||||
|
@ -272,7 +272,7 @@ func (g *GenericPLEG) relist() {
|
|||||||
select {
|
select {
|
||||||
case g.eventChannel <- events[i]:
|
case g.eventChannel <- events[i]:
|
||||||
default:
|
default:
|
||||||
metrics.PLEGDiscardEvents.WithLabelValues().Inc()
|
metrics.PLEGDiscardEvents.Inc()
|
||||||
klog.Error("event channel is full, discard this relist() cycle event")
|
klog.Error("event channel is full, discard this relist() cycle event")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user