internal/requestlog: prototype request log middleware
- Request/response body sizes are collected on a streaming basis
- Header sizes are approximate and only based on what the underlying
handler sends or receives. net/http may add extra headers, so headers
will likely be undercounted. I don't see a reliable way to address
- Includes a fluentd logger to send the forward input plugin that is
open by default in google-fluentd. I've integration tested this
middleware locally. Unit tests verify that the format is correct.
- Hijack/Websocket support is missing. This is fine for gddo.
Reviewed-by: Herbie Ong <email@example.com>
4 files changed