tailscale/tsweb
Paul Scott 646990a7d0 tsweb: log once per request
StdHandler/retHandler would previously emit one log line for each request.
If there were multiple StdHandler in the chain, there would be one log line
per instance of retHandler.

With this change, only the outermost StdHandler/logHandler actually logs the
request or invokes OnStart or OnCompletion callbacks. The error-rendering part
of retHandler lives on in errorHandler, and errorHandler passes those errors up
the stack to logHandler through a callback that logHandler places in the
request.Context().

Updates tailscale/corp#19999

Signed-off-by: Paul Scott <paul@tailscale.com>
2024-07-16 15:52:23 +01:00
..
promvarz derp/xdp,cmd/xdpderper: initial skeleton (#12390) 2024-06-14 08:45:24 -07:00
varz tsweb/varz: add charset=utf-8 to varz handler 2024-03-27 19:56:22 -07:00
debug_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
debug.go Revert "tsweb: update ServeMux matching to 1.22.0 syntax (#11090)" (#11125) 2024-02-13 10:49:36 -08:00
log.go tsweb: rename AccessLogRecord's When to Time 2024-05-31 12:33:35 -04:00
request_id.go tsweb: switch to fastuuid for request ID generation 2024-04-09 14:05:20 -07:00
tsweb_test.go tsweb: log once per request 2024-07-16 15:52:23 +01:00
tsweb.go tsweb: log once per request 2024-07-16 15:52:23 +01:00