Skip to content

add client_addr to metric pg_stat_activity_max_tx_duration#986

Open
betanummeric wants to merge 1 commit intoprometheus-community:masterfrom
betanummeric:master
Open

add client_addr to metric pg_stat_activity_max_tx_duration#986
betanummeric wants to merge 1 commit intoprometheus-community:masterfrom
betanummeric:master

Conversation

@betanummeric
Copy link
Copy Markdown

implements #985

Copy link
Copy Markdown
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Hmm, this could impact cardinality very badly as things scale up. I'm not sure this would be acceptable for most users.

@betanummeric
Copy link
Copy Markdown
Author

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

@SuperQ
Copy link
Copy Markdown
Contributor

SuperQ commented Dec 11, 2023

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.

@sysadmind
Copy link
Copy Markdown
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants