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 an option to detect Vec metric without specifying labels #5

Open
yeya24 opened this issue Jul 22, 2020 · 0 comments
Open

Add an option to detect Vec metric without specifying labels #5

yeya24 opened this issue Jul 22, 2020 · 0 comments

Comments

@yeya24
Copy link
Owner

yeya24 commented Jul 22, 2020

If we want to use NewXXXVec to create metrics Vec, we need to specify labels. So if labels are not specified, then we can detect it and that's better to use just plain metric type.

However, this might be not easy to implement. We can use any type of identifiers for the label slice, even using objs from other packages, so it is tricky.

s := []string{"test"}

prometheus.NewCounterVec(prometheus.CounterOpts{}, s)
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

1 participant