From 1ab1897d2c532a20512b8cb30545cc88fe3ee608 Mon Sep 17 00:00:00 2001 From: Pradeep Lakshmi Narasimha Date: Mon, 16 Sep 2024 14:27:59 +0530 Subject: [PATCH] fix: Added missing label info in the cleanup metrics (#10321) (#11147) Signed-off-by: Pradeep Lakshmi Narasimha --- pkg/controllers/ttl/controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/controllers/ttl/controller.go b/pkg/controllers/ttl/controller.go index 240ce20ced..f064cb099a 100644 --- a/pkg/controllers/ttl/controller.go +++ b/pkg/controllers/ttl/controller.go @@ -57,6 +57,7 @@ func newController(client metadata.Getter, metainformer informers.GenericInforme informer: metainformer.Informer(), logger: logger, metrics: newTTLMetrics(logger), + gvr: gvr, } enqueue := controllerutils.LogError(logger, controllerutils.Parse(controllerutils.MetaNamespaceKey, controllerutils.Queue(queue))) registration, err := controllerutils.AddEventHandlers( @@ -144,7 +145,7 @@ func (c *controller) reconcile(ctx context.Context, logger logr.Logger, itemKey attribute.String("resource_namespace", metaObj.GetNamespace()), attribute.String("resource_group", c.gvr.Group), attribute.String("resource_version", c.gvr.Version), - attribute.String("resource", c.gvr.Resource), + attribute.String("resource_resource", c.gvr.Resource), } // if the object is being deleted, return early if metaObj.GetDeletionTimestamp() != nil {