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/01/27 15:45:53 UTC

[GitHub] [skywalking-nodejs] tom-pytel commented on a change in pull request #28: Added http protocol to plugins

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



##########
File path: src/plugins/ExpressPlugin.ts
##########
@@ -95,6 +94,8 @@ class ExpressPlugin implements SwPlugin {
       } catch (e) {
         stopIfNotStopped(e);
         throw e;
+      } finally {  // req.protocol is only possibly available after call to _handle()
+        span.tag(Tag.httpURL(((req as any).protocol ? (req as any).protocol + '://' : '') + (req.headers.host || '') + req.url));

Review comment:
       Yes, because that field `req.protocol` is not available until after the call to `_handle()`.




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

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