Capability to disabled default go metrics for statsd exporter

34 views
Skip to first unread message

Amir Hadadi

unread,
Oct 21, 2024, 6:38:02 AM10/21/24
to Prometheus Developers
As also introduced for node_exporter, and asked for in process exporter, I believe there's benefit for an option to disable all the collection of go runtime metrics (e.g. "go_gc_duration_second" and any other go_* metric) in the statsd exporter.
Those metrics are included by default when using the default go prometheus client's default registrerer.

I made a PR which introduces a flag called "collector.disable-go-runtime-metrics" that controls the collection of those metrics.
Not adding the flag will keep collection as always been.




Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

Bjoern Rabenstein

unread,
Oct 22, 2024, 8:29:22 AM10/22/24
to Amir Hadadi, Prometheus Developers
On 21.10.24 03:27, 'Amir Hadadi' via Prometheus Developers wrote:
> As also introduced for node_exporter
> <https://github.com/prometheus/node_exporter/pull/1148>, and asked for in
> process exporter <https://github.com/ncabatoff/process-exporter/issues/248>,
> I believe there's benefit for an option to disable all the collection of go
> runtime metrics (e.g. "go_gc_duration_second" and any other go_* metric) in
> the statsd exporter.
> Those metrics are included by default when using the default go prometheus
> client's default registrerer.
>
> I made a PR <https://github.com/prometheus/statsd_exporter/pull/587> which
> introduces a flag called "collector.disable-go-runtime-metrics" that
> controls the collection of those metrics.
> Not adding the flag will keep collection as always been.

My first thought is that we should do this in a unified
way, i.e. both the flag name and the exact behavior should be the same
for all
exporters. https://github.com/prometheus/node_exporter/pull/1148
introduces the flag in this way (from the docs):

--[no-]web.disable-exporter-metrics
Exclude metrics about the exporter itself (promhttp_*,
process_*, go_*).

In that PR, it was also discussed why we want the "full removal". If
this conclusion still stands, let's do the same for all exporters, and
not slightly different solutions everywhere. Maybe this can go into
https://github.com/prometheus/exporter-toolkit ?

--
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] bjo...@rabenste.in
Reply all
Reply to author
Forward
0 new messages