v0.27.76
Changes
feature: add optional response status condition to logBody filter (#4201)
logBody can only log unconditionally today, so getting the request body
of failing requests means logging every successful one too.
This adds an optional third argument, the response status code from
which on to log:
* -> logBody("request", 1024, 500) -> "https://www.example.org";
For a response body the status is already known when the filter runs, so
it is only a check. For a request body it is not known while it streams,
so up to limit bytes are buffered and logged once the response arrives.
The body itself is not held back and not truncated. Without the third
argument nothing changes.
Ran locally: make fmt, make lint and go test -race ./filters/diag/
are green. In make shortcheck the only failures are the redis/valkey
tests that need Docker, and they fail the same way on a clean master
here.
One thing I am not sure about: buffering on the request side moves
logBody away from "close to no overhead". I kept it in logBody because
the limit already caps the buffer, but I am happy to split it into a
separate filter if you prefer.
fixes #4047
Multiarch Docker image
Multiarch Docker image is available in GitHub's docker registry:
docker run -it ghcr.io/zalando/skipper:v0.27.76 skipper --help