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

Update prometheus_metrics_prefix documentation #8236

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

FlorianVeaux
Copy link
Member

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#L122

This PR makes this behavior a bit more clear.

@@ -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>_
Copy link
Contributor

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>?

Copy link
Member Author

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?

Copy link
Contributor

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.

Copy link
Contributor

@ruthnaebeck ruthnaebeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for docs

@FlorianVeaux FlorianVeaux merged commit 0cf145b into master Dec 28, 2020
@FlorianVeaux FlorianVeaux deleted the florian/update_prometheus_metrics_prefix_desc branch December 28, 2020 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment