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

Expand promlint rules #5453

Open
csmarchbanks opened this Issue Apr 10, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@csmarchbanks
Copy link
Contributor

csmarchbanks commented Apr 10, 2019

Proposal

Use case. Why is this important?

Right now there are prometheus naming best practices documented in both the docs and blog posts such as Robust Perception. I propose that as many of these conventions as possible should be codified in the promtool check metrics tool.

Currently the promlint code includes rules for:

  • Help text
  • Using base units
  • Using misleading/inappropriate suffixes

I propose that in addition there should be rules for:

  • Don't put the metric type in the name, such as request_duration_seconds_histogram
  • Don't use colons in metric names (reserved for recording rules)
  • Use snake_case not camelCase
  • Detection on _s_ instead of seconds, _b_ or _kb_ instead of _bytes_

I would love to hear other people's opinion on rules that should be added and am happy to change the list around.

If people think some or all of these new rules are a good idea I plan to do the implementation.

Thanks for thinking about this proposal!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.