Add micrometer.prometheus-proxy.connected-metrics-metadata property#68
Add micrometer.prometheus-proxy.connected-metrics-metadata property#68Mateo00 wants to merge 3 commits into
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.
I would rename the property to publishConnectedMetricsMetadata rather than connectedMetricsMetadata
There was a problem hiding this comment.
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 <mateo00@developer.org>
cf1ba90 to
c761726
Compare
Signed-off-by: Mateo00 <mateo00@developer.org>
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.