aboutsummaryrefslogtreecommitdiff
path: root/weed/util/http
diff options
context:
space:
mode:
authorAleksey Kosov <rusyak777@list.ru>2025-06-20 16:23:53 +0300
committerGitHub <noreply@github.com>2025-06-20 06:23:53 -0700
commit90c128e7a66389477943bbca080ce68a70196310 (patch)
treee14ba16a2775b41fb2fc653188c16f462da23a46 /weed/util/http
parenta72c442945af575cc2a94d1aa9867a4710ded02e (diff)
downloadseaweedfs-90c128e7a66389477943bbca080ce68a70196310.tar.xz
seaweedfs-90c128e7a66389477943bbca080ce68a70196310.zip
Context-based logging with request ID (#6899)
Diffstat (limited to 'weed/util/http')
-rw-r--r--weed/util/http/http_global_client_util.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/util/http/http_global_client_util.go b/weed/util/http/http_global_client_util.go
index 3cc819a47..5cfd93a2c 100644
--- a/weed/util/http/http_global_client_util.go
+++ b/weed/util/http/http_global_client_util.go
@@ -6,8 +6,11 @@ import (
"encoding/json"
"errors"
"fmt"
+
"github.com/seaweedfs/seaweedfs/weed/util"
"github.com/seaweedfs/seaweedfs/weed/util/mem"
+ "github.com/seaweedfs/seaweedfs/weed/util/request_id"
+
"io"
"net/http"
"net/url"
@@ -307,7 +310,7 @@ func ReadUrlAsStreamAuthenticated(ctx context.Context, fileUrl, jwt string, ciph
} else {
req.Header.Add("Range", fmt.Sprintf("bytes=%d-%d", offset, offset+int64(size)-1))
}
- util.ReqWithRequestId(req, ctx)
+ request_id.InjectToRequest(ctx, req)
r, err := GetGlobalHttpClient().Do(req)
if err != nil {