Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metric label to identify namespace resources impacted #3073

Open
sebglon opened this issue Jan 15, 2025 · 3 comments
Open

Add metric label to identify namespace resources impacted #3073

sebglon opened this issue Jan 15, 2025 · 3 comments

Comments

@sebglon
Copy link

sebglon commented Jan 15, 2025

Hi,
We have a unique CAPI that manage multiple clusters isolated by namespace.
We need a way a way to split alert by namespaces at least for the CAPI controller.

Can we add the resource_namespace or target_namespace label to each metrics?
I am aware to create a PR but i prefer to validate the label name to use before.

@sbueringer
Copy link
Member

Which metrics are you referring to?

What do you mean with CAPI, ClusterAPI?

@sebglon
Copy link
Author

sebglon commented Jan 16, 2025

Hi,
We need this to monitor reconciliation error, and reconcileTotal, ReconcilePanic on all resources managed by cluster-api-controller (CAPI) and all of our providers.
We use the AWS, Outscale and in e few months GCP; and all use the controller-runtime lib.

@sbueringer
Copy link
Member

sbueringer commented Mar 22, 2025

I think adding the request namespace to this metric would lead to a pretty high cardinality metric if you have a lot of namespaces.

I think we should not do this in controller-runtime, as it will affect everyone using controller-runtime.

That being said, for the same reason I wouldn't want to make the same change by adding an additional metric in Cluster API.

We have a unique CAPI that manage multiple clusters isolated by namespace.

If that means you have separate CAPI controllers reconciling specific namespaces you should be able to add a namespace label when you scrape the metrics from your controllers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants