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/12 11:37:14 UTC

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

tom-pytel commented on a change in pull request #64:
URL: https://github.com/apache/skywalking-nodejs/pull/64#discussion_r748194027



##########
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:
       Why would a client be creating a server `EntrySpan`?




-- 
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