Duplex Filters

Duplex filters are filters that are invoked for both requests from database clients and responses from database servers. They are useful when you need a complete picture of everything that is happening, for instance when gathering metrics.

Duplex filters for Postgres

Metrics filter : collects and outputs metrics on SQL operations, bytes in and out, and response sizes, and prints them at intervals to a file or a logger.

Metrics code filter : same as Metrics filter, but passes the metrics to user code

JavaScript filter : general-use filter, can be called on any request or response packets