summaryrefslogtreecommitdiffhomepage
path: root/control/controlknobs/controlknobs.go
diff options
context:
space:
mode:
authorMarwan Sulaiman <marwan@tailscale.com>2023-11-28 18:37:21 -0500
committerMarwan Sulaiman <marwan.sameer@gmail.com>2023-11-30 15:00:29 -0500
commitb819f66eb1efab85dcf5550d4f0da92fb7ab2551 (patch)
tree32a9e920362f840e1dd18f2286e095e7e88dea32 /control/controlknobs/controlknobs.go
parentc27aa9e7ff6d906cacfa5e1f5a583e4dabf4eb1e (diff)
downloadtailscale-b819f66eb1efab85dcf5550d4f0da92fb7ab2551.tar.xz
tailscale-b819f66eb1efab85dcf5550d4f0da92fb7ab2551.zip
tsweb: propagate RequestID via context and entire request
The recent addition of RequestID was only populated if the HTTP Request had returned an error. This meant that the underlying handler has no access to this request id and any logs it may have emitted were impossible to correlate to that request id. Therefore, this PR adds a middleware to generate request ids and pass them through the request context. The tsweb.StdHandler automatically populates this request id if the middleware is being used. Finally, inner handlers can use the context to retrieve that same request id and use it so that all logs and events can be correlated. Updates #2549 Signed-off-by: Marwan Sulaiman <marwan@tailscale.com>
Diffstat (limited to 'control/controlknobs/controlknobs.go')
0 files changed, 0 insertions, 0 deletions