You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/11/15 01:02:17 UTC

[GitHub] [skywalking-nodejs] nd-lqj commented on a change in pull request #64: The AxiosPlugin ignores SW8 if it is already in headers

nd-lqj commented on a change in pull request #64:
URL: https://github.com/apache/skywalking-nodejs/pull/64#discussion_r748945365



##########
File path: src/plugins/AxiosPlugin.ts
##########
@@ -45,11 +46,14 @@ class AxiosPlugin implements SwPlugin {
       else
         config = url ? {...url} : {};
 
+      const carrier = ContextCarrier.from(config.headers || {});
       const {origin, host, pathname: operation} = new URL(config.url, config.baseURL);  // TODO: this may throw invalid URL
       const method = (config.method || 'GET').toUpperCase();
       const span = ignoreHttpMethodCheck(method)
         ? DummySpan.create()
-        : ContextManager.current.newExitSpan(operation, Component.AXIOS, Component.HTTP);
+        : carrier
+          ? ContextManager.current.newEntrySpan(operation, carrier)

Review comment:
       The AxiosPlugin also runs in the Node layer. So I think there's a distinction to be made here, that I'm not being captured in the right way, but the problem is there.  




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org