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

Question: Prefixing metrics #26

Closed
jharting opened this issue Jan 11, 2019 · 3 comments
Closed

Question: Prefixing metrics #26

jharting opened this issue Jan 11, 2019 · 3 comments

Comments

@jharting
Copy link

Is it possible to prefix the collected metrics (e.g. with application name) similarly to how default metrics can be prefixed in prom-client?

@jharting
Copy link
Author

Oh nevermind the metric name is overridable via opts.httpDurationMetricName

@disjunction
Copy link
Collaborator

Glad you found it. FYI it's intentionally not in the docs after prometheus guys convinced me prefixing was a bad thing to do. The right way is to use labels, which you can attach in prometheus itself using relabeling rules. It's not the concern of the service, but rather how you want to aggregate/present them.

@jharting
Copy link
Author

@disjunction good to know. Thanks!

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