ETag cached requests are not logged in production_json.log
While testing https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25400, I found that requests handled by the ETag middleware are not logged in production_json.log
. We should at least see a 304 request to know that it was handled.
I think this happens because the middleware short-circuits Lograge, but we should find a way to log this.
Proposal
Detect 304 responses in the middleware and pass them to Lograge so they are logged.
For inspiration: See the instrumentation concept below and the Lograge2 concept.
Edited by Dan Jensen