This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-client-js.git


The following commit(s) were added to refs/heads/master by this push:
     new a86bb56  fix(trace): append http method to tags error when using the 
Header object in queries (#131)
a86bb56 is described below

commit a86bb56fe02eebd748119a7e374a738b0b966210
Author: Chén Wénháo <[email protected]>
AuthorDate: Wed Jul 17 11:31:54 2024 +0800

    fix(trace): append http method to tags error when using the Header object 
in queries (#131)
---
 src/trace/interceptors/fetch.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/trace/interceptors/fetch.ts b/src/trace/interceptors/fetch.ts
index b6746e0..9c8f8da 100644
--- a/src/trace/interceptors/fetch.ts
+++ b/src/trace/interceptors/fetch.ts
@@ -117,7 +117,7 @@ export default function windowFetch(options: 
CustomOptionsType, segments: Segmen
         const tags = [
           {
             key: 'http.method',
-            value: args[1].method || 'GET',
+            value: args[0] instanceof Request ? args[0].method : 
args[1]?.method || 'GET',
           },
           {
             key: 'url',

Reply via email to