-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Guidance wrt Labelling to Naming and Rules Best Practices #2691
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
e57a291
a40367a
ccf009a
0e87e09
a79aa9b
a0ebfa9
7694523
6b6ceb0
938a3a8
e42cd96
1cb09cd
62bf3d7
675d41f
092cc89
0a7611f
4da0a33
9b7793c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -80,7 +80,18 @@ the underlying metric type and unit you work with. | |||
| * **Metric collisions**: With growing adoption and metric changes over time, there are cases where lack | ||||
| of unit and type information in the metric name will cause certain series to collide (e.g. `process_cpu` for seconds and milliseconds). | ||||
|
|
||||
| ## Labels | ||||
| ### Labels | ||||
|
|
||||
| * `job` | ||||
|
conallob marked this conversation as resolved.
Outdated
|
||||
| * The `job` label is a primary key to differentiate metrics from each other. | ||||
| * If not specified in PromQL expressions, they will match unrelated metrics with the same name. This is especially true in a multi system or multi tenant installation | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure this is really a useful note here, as this applies to all label matching.
Suggested change
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It applies to all labels. But
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but it's not related to job, but related to "target labels" and discovery. That is a different thing and related to querying, not creating labels. |
||||
|
|
||||
| WARNING: When using `without`, be careful not to strip out the `job` label accidentally. | ||||
|
|
||||
|
conallob marked this conversation as resolved.
Outdated
|
||||
| * `instance` | ||||
| * The `instance` label will include the `ip:port` what was scraped, providing a crucial breadcrumb for debugging scrape time issues | ||||
|
conallob marked this conversation as resolved.
Outdated
|
||||
|
|
||||
| ### General Labelling Advice | ||||
|
|
||||
| Use labels to differentiate the characteristics of the thing that is being measured: | ||||
|
|
||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.