From 43b3c093efa880e549cd6490066e76c8828f7138 Mon Sep 17 00:00:00 2001 From: Aditya Manthramurthy Date: Mon, 10 Jul 2023 15:40:44 -0700 Subject: [PATCH] Fix: set request id in trace context properly (#17622) --- cmd/http-tracer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/http-tracer.go b/cmd/http-tracer.go index a495effbb..490a745a9 100644 --- a/cmd/http-tracer.go +++ b/cmd/http-tracer.go @@ -77,7 +77,7 @@ func httpTracerMiddleware(h http.Handler) http.Handler { // Create tracing data structure and associate it to the request context tc := mcontext.TraceCtxt{ - AmzReqID: r.Header.Get(xhttp.AmzRequestID), + AmzReqID: w.Header().Get(xhttp.AmzRequestID), RequestRecorder: reqRecorder, ResponseRecorder: respRecorder, }