-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Update instrumentation.md #7708
Conversation
Add a snippet about preferring labels to embedding labels in metric names.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: logicalhan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @dashpole |
Note that this takes the opposite stance taken by OpenMetrics on this question: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#metric-names-versus-labels
|
I do still prefer what is proposed here. @rexagod @dgrisonnet are you OK with this convention? |
Yeah I don't buy it. Ratios are easier with a single metric, because you can do |
/assign |
Found where the prometheus docs recommend separate failure and total: https://prometheus.io/docs/practices/instrumentation/#failures |
It does seem easier to do ratios. However, when evaluating an expression such as
OpenMetrics authors don't provide much details or examples, which makes it hard (at least for me) to reason/argue. We could try reaching out to them for more information. What do you think? |
I think Errors, Successes, Totals: Which Metrics Should I Expose to Prometheus? may also be useful for this discussion, in particular Exposing a single metric with a label |
Yeah, TL;DR of that article: If you have just have a binary success/failure situation that you want to track, use two different metrics, one for the failures, one for the total (not the successes). If you have something more complicated like many different HTTP response status codes, use a single metric with a label on it instead. |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Add a snippet about preferring labels to embedding labels in metric names.
Which issue(s) this PR fixes:
Fixes #