Issue #3618260: Count this module's requests instead of the site's

The subscriber ran for every request the site served and, with the load counter on, read and wrote state on each one: a module installed for its API sat in the critical path of every page and wrote to the database from there. It now asks the route whether the request is this module's - the subscriber runs after the router - and reads no configuration until it knows the answer. Sub-requests are not counted alongside the request that made them.

The figure stays approximate and the settings form says so: an exact counter needs a table and a write with an expression, and the statistics are read as a rate per minute, where a request lost to two workers writing at once changes nothing worth that cost.

The timing attribute is gone: the moment a request started is already in its server bag, so nothing needs recording earlier in the request. The statistics table drops the total-for-the-whole-site column, which now held the same number as the API one, and an update hook clears the stored periods rather than showing site traffic as API traffic.

Closes #3618260

Merge request reports

Loading
Loading