mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Add X-Amz-Request-Id to internode calls (#16146)
This commit is contained in:
@@ -34,6 +34,7 @@ import (
|
||||
|
||||
xhttp "github.com/minio/minio/internal/http"
|
||||
"github.com/minio/minio/internal/logger"
|
||||
"github.com/minio/minio/internal/mcontext"
|
||||
xnet "github.com/minio/pkg/net"
|
||||
)
|
||||
|
||||
@@ -194,6 +195,10 @@ func (c *Client) newRequest(ctx context.Context, u *url.URL, body io.Reader) (*h
|
||||
req.Header.Set("Expect", "100-continue")
|
||||
}
|
||||
|
||||
if tc, ok := ctx.Value(mcontext.ContextTraceKey).(*mcontext.TraceCtxt); ok {
|
||||
req.Header.Set(xhttp.AmzRequestID, tc.AmzReqID)
|
||||
}
|
||||
|
||||
return req, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user