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 multiple labels in sub_registry_with_label method #144

Open
popadi opened this issue May 26, 2023 · 2 comments
Open

Allow multiple labels in sub_registry_with_label method #144

popadi opened this issue May 26, 2023 · 2 comments

Comments

@popadi
Copy link
Contributor

popadi commented May 26, 2023

Hey

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 labels to be able to query them in my dashboards.

Is there a reason sub_registry_with_label accepts a single label? What if I want to add 2-3 labels to a bunch of metrics (globally)?

@mxinden
Copy link
Member

mxinden commented May 28, 2023

Thanks for writing this out. Never thought there would be the need for more than one label. Happy to accept a contribution @popadi. Off the top of my head, what do you think of adding Registry::sub_registry_with_labels taking an I: Iterator<Item = (Cow<'static, str>, Cow<'static, str>)>?

@popadi
Copy link
Contributor Author

popadi commented May 28, 2023

Thanks for the quick response. I will implement this & add tests in the coming days.

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