|
|
@ -35,6 +35,11 @@ const (
|
|
|
|
workqueueMetricsNamespace = KubernetesMetricsNamespace + "_workqueue"
|
|
|
|
workqueueMetricsNamespace = KubernetesMetricsNamespace + "_workqueue"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
|
|
|
|
clientGoRequestMetrics = &clientGoRequestMetricAdapter{}
|
|
|
|
|
|
|
|
clientGoWorkloadMetrics = &clientGoWorkqueueMetricsProvider{}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
// Metrics for client-go's HTTP requests.
|
|
|
|
// Metrics for client-go's HTTP requests.
|
|
|
|
clientGoRequestResultMetricVec = prometheus.NewCounterVec(
|
|
|
|
clientGoRequestResultMetricVec = prometheus.NewCounterVec(
|
|
|
@ -135,6 +140,9 @@ func clientGoMetrics() []prometheus.Collector {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func RegisterK8sClientMetricsWithPrometheus(registerer prometheus.Registerer) error {
|
|
|
|
func RegisterK8sClientMetricsWithPrometheus(registerer prometheus.Registerer) error {
|
|
|
|
|
|
|
|
clientGoRequestMetrics.RegisterWithK8sGoClient()
|
|
|
|
|
|
|
|
clientGoWorkloadMetrics.RegisterWithK8sGoClient()
|
|
|
|
|
|
|
|
|
|
|
|
for _, collector := range clientGoMetrics() {
|
|
|
|
for _, collector := range clientGoMetrics() {
|
|
|
|
err := registerer.Register(collector)
|
|
|
|
err := registerer.Register(collector)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|