-
Notifications
You must be signed in to change notification settings - Fork 28
Add micrometer.prometheus-proxy.connected-metrics-metadata property #68
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?
Add micrometer.prometheus-proxy.connected-metrics-metadata property #68
Conversation
@Mateo00 Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@Mateo00 Thank you for signing the Contributor License Agreement! |
Hi @shakuzen, |
I think I've understood the problem. Losing the HELP lines seems somewhat alright, but losing the TYPE lines seems potentially more problematic. Where are you eventually storing the metrics after Telegraf scrapes them, and is there no issue for you losing all type info? |
After Telegraf scrapes, the metrics are stored in a VictoriaMetrics database. A Grafana connected to this database allows us to visualize the collected metrics. In the Prometheus documentation it's mentioned that HELP and TYPE lines are optional. |
* Whether to enable publishing of Prometheus metadata (lines "# HELP ..." and lines "# TYPE ...") in the payload returned by the /metrics/connected endpoint. | ||
* Disabling metadata publishing reduces the amount of data sent sent on each scrape. | ||
*/ | ||
private boolean connectedMetricsMetadata = true; |
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 would rename the property to publishConnectedMetricsMetadata
rather than connectedMetricsMetadata
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.
Thanks for your feedback.
I renamed the property to publishConnectedMetricsMetadata
and also resynchronized the forked repo with the original.
3457186
to
627c2aa
Compare
Signed-off-by: Mateo00 <[email protected]>
cf1ba90
to
c761726
Compare
Add micrometer.prometheus-proxy.connected-metrics-metadata property to enable or disable publishing Prometheus metrics metadata (lines "# HELP ..." and lines "# TYPE ...") in the payload returned by the /metrics/connected endpoint. The default value is True.
Disabling metrics metadata reduces the amount of data sent on each scrape.
In addition, some clients such as Telegarf expect the "# HELP ..." lines to be unique.
Currently, collecting metrics reported by the /metrics/connected endpoint fails with a Telegarf agent:
parsing metrics failed: reading text format failed: text format parsing error in line XX: second HELP line for metric name "XXXXX"
Disabling metrics metadata allows to work around this problem and scrapping the /metrics/connected endpoint with a Telegraf agent works well.