Context-based logging with request ID (#6899)

This commit is contained in:
Aleksey Kosov
2025-06-20 16:23:53 +03:00
committed by GitHub
parent a72c442945
commit 90c128e7a6
8 changed files with 302 additions and 48 deletions

View File

@@ -5,7 +5,6 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/valyala/bytebufferpool"
"io"
"mime"
"mime/multipart"
@@ -16,6 +15,9 @@ import (
"sync"
"time"
"github.com/seaweedfs/seaweedfs/weed/util/request_id"
"github.com/valyala/bytebufferpool"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
"github.com/seaweedfs/seaweedfs/weed/security"
@@ -359,7 +361,7 @@ func (uploader *Uploader) upload_content(ctx context.Context, fillBufferFunction
req.Header.Set("Authorization", "BEARER "+string(option.Jwt))
}
util.ReqWithRequestId(req, ctx)
request_id.InjectToRequest(ctx, req)
// print("+")
resp, post_err := uploader.httpClient.Do(req)