postgres_exporter icon indicating copy to clipboard operation
postgres_exporter copied to clipboard

add client_addr to metric pg_stat_activity_max_tx_duration

Open betanummeric opened this issue 2 years ago • 3 comments

implements #985

betanummeric avatar Dec 11 '23 10:12 betanummeric

@SuperQ I don't think most users have so much more client hosts than postgres-users to make the client_addr-label problematic. But sure, this introduces another factor to the amount of monitoring data. Would it be ok for you to make this change opt-in using a CLI flag?

betanummeric avatar Dec 11 '23 12:12 betanummeric

An opt-in flag would be fine. The only issue is that this collector setup hasn't been moved to our new collector package, so it's possibly slightly difficult to implement here.

SuperQ avatar Dec 11 '23 13:12 SuperQ

I don't know that we have had a good example of customizing a collector that has been ported to the collector package either. I remember another request noting that the constructors for collectors don't have an obvious pattern for customization. @SuperQ Do we have a good example from another exporter for customizing collectors?

sysadmind avatar Dec 11 '23 20:12 sysadmind