From 315618f8cacca5fb0ee73cab52f503c19b3fe16e Mon Sep 17 00:00:00 2001 From: Damien Grisonnet Date: Tue, 15 Oct 2024 13:28:51 +0200 Subject: [PATCH] discovery: check number of goroutines Signed-off-by: Damien Grisonnet --- internal/discovery/discovery.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/discovery/discovery.go b/internal/discovery/discovery.go index 7e1f16290..677c5bae0 100644 --- a/internal/discovery/discovery.go +++ b/internal/discovery/discovery.go @@ -17,6 +17,7 @@ package discovery import ( "context" "fmt" + "runtime" "time" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -252,8 +253,9 @@ func (r *CRDiscoverer) PollForCacheUpdates( shouldGenerateMetrics = r.WasUpdated }) if shouldGenerateMetrics { + klog.InfoS("should generate metrics", "goroutine", runtime.NumGoroutine()) generateMetrics() - klog.InfoS("discovery finished, cache updated") + klog.InfoS("discovery finished, cache updated", "goroutine", runtime.NumGoroutine()) } } }