Open teoincontatto opened 4 years ago
Makes sense.
Connection info probably may be extracted from connection
object which filter has access to.
database
is passed in the first Postgres message when connection is opened.
As per implementation, it will add a dynamic aspect to stats. I am not sure if internally it is easy/possible to return global stats for /stats
and stats with labels for /stats/prometheus
.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
Title: Expose postgres filter metrics with labels for prometheus format
Description:
Currently postgres filter metrics are exposed without any label when queried with prometheus format:
Stats are absolutely global for all database and instances of postgres connected through the filter and all listener addresses that have the filter attached. Labels to be added are to be discussed but here is list of minimal labels that could be added (if possible):
For example:
This will involve that stats memory will increase dynamically but IMO it is worth to have such data included. Possibly there could be some configuration to work out in order to disable stats and only allow or deny some databases (maybe allowing regexp or some wildcard system to ease thing a bit in the configuration) so that users can get rid or reduce the impact of the feature in case it is not worth for them.