-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 prometheus_metrics_prefix documentation #8236
Update prometheus_metrics_prefix documentation #8236
Conversation
Codecov Report
|
@@ -25,7 +25,7 @@ | |||
items: | |||
type: string | |||
- name: prometheus_metrics_prefix | |||
description: <PREFIX> for exposed Prometheus metrics. | |||
description: Removes a given <PREFIX> from exposed Prometheus metrics. | |||
value: | |||
type: string | |||
example: <PREFIX>_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of _
after <PREFIX>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess because services adding a prefix usually add an extra _
between the prefix and the rest of the metric name for readability?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, so it would remove the extra _
that is also included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for docs
prometheus_metrics_prefix
is used when the prometheus all have the same prefix and removes that prefix before submitting the metrics. See https://github.com/DataDog/integrations-core/blob/master/datadog_checks_base/datadog_checks/base/checks/openmetrics/mixins.py#L122This PR makes this behavior a bit more clear.