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

Allow root registry creation with prefix AND label(s) #146

Open
popadi opened this issue May 28, 2023 · 1 comment
Open

Allow root registry creation with prefix AND label(s) #146

popadi opened this issue May 28, 2023 · 1 comment

Comments

@popadi
Copy link
Contributor

popadi commented May 28, 2023

As the title says, is it okay to add a constructor (with_prefix_and_labels; please suggest a better name eventually) that allows the creation of a base/root registry with a prefix and some default labels? Or maybe a way to allow the mutation of the labels of a registry.

I have a bunch of counters coming from from processes running on different hosts and I'd like to have them labeled with about 2-3 base/identification labels to be able to query them in my dashboards properly. Due to some restrictions I am not able to inject these labels directly via kubernetes on Prometheus scrape. At the same time, I see no reason TO NOT allow the creation of a registry with default labels.

This is a question related a bit to the previously posted issue (#144) for which I submitted a pull request (#145).

@mxinden
Copy link
Member

mxinden commented May 29, 2023

No objections to adding Registry::with_prefix_and_labels. Contribution welcome.

popadi added a commit to popadi/client_rust that referenced this issue May 29, 2023
Signed-off-by: Adrian Pop <popadrian1996@gmail.com>
popadi added a commit to popadi/client_rust that referenced this issue Jun 5, 2023
Signed-off-by: Adrian Pop <popadrian1996@gmail.com>
popadi added a commit to popadi/client_rust that referenced this issue Jul 8, 2023
Signed-off-by: Adrian Pop <popadrian1996@gmail.com>
popadi added a commit to popadi/client_rust that referenced this issue Jul 8, 2023
Signed-off-by: Adrian Pop <popadrian1996@gmail.com>
popadi added a commit to popadi/client_rust that referenced this issue Jul 9, 2023
Signed-off-by: Adrian Pop <popadrian1996@gmail.com>
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