mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Trace all http requests (#15064)
Add a generic handler that adds a new tracing context to the request if tracing is enabled. Other handlers are free to modify the tracing context to update information on the fly, such as, func name, enable body logging etc.. With this commit, requests like this ``` curl -H "Host: ::1:3000" http://localhost:9000/ ``` will be traced as well.
This commit is contained in:
@@ -40,6 +40,9 @@ func registerDistErasureRouters(router *mux.Router, endpointServerPools Endpoint
|
||||
|
||||
// List of some generic handlers which are applied for all incoming requests.
|
||||
var globalHandlers = []mux.MiddlewareFunc{
|
||||
// The generic tracer needs to be the first handler
|
||||
// to catch all requests returned early by any other handler
|
||||
httpTracer,
|
||||
// Auth handler verifies incoming authorization headers and
|
||||
// routes them accordingly. Client receives a HTTP error for
|
||||
// invalid/unsupported signatures.
|
||||
|
||||
Reference in New Issue
Block a user