The Prometheus logging approach presently used in Test Kitchen UI logs the path component logs for all URLs, logged-in states, and success/error dispositions. This leads to some noise and can in principle lead to slower query execution for this service in Prometheus or the central aggregation point Thanos.
An approach to reduce this noise could do something like the following:
- When logging to Prometheus for URLs that don't actually exist, log the path with some synthetic path (e.g., /invalid_path_for_request). [1]
- When logging to Prometheus for static asset URLs that do exist, log the path with some synthetic path (e.g., /static_asset). In practice, this relates to JavaScript and CSS 200 responses.
[1] In practice, this relates to things that are being answered with both 400 series 200 series responses. Also, the UA for a user who has been signed out may make a request that ultimately triggers 404s for legitimate paths (e.g., the /user path), and so there's a little wrinkle to work out here - it's useful to know that the user was accessing in a non-logged in context when the path is a legitimate one (imagine the case of a CAS-SSO misconfiguration affecting this application or even the case of some route accidentally being put into the requires-authentication routing case when really it's supposed to be an anonymous route), but it's also noise.