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 2020/11/03 14:00:35 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #5767: Polish the context and optimize the tag analyze

wu-sheng commented on a change in pull request #5767:
URL: https://github.com/apache/skywalking/pull/5767#discussion_r515757528



##########
File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextCarrier.java
##########
@@ -90,18 +89,21 @@ public ExtensionInjector extensionInjector() {
     }
 
     /**
-     * Extract the extension context to the given span
+     * Extract the extension context to tracing context
      */
-    void extractExtensionTo(AbstractSpan span) {
-        this.extensionContext.handle(span);
-
+    void extractExtensionTo(TracingContext tracingContext) {
+        tracingContext.getExtensionContext().extract(this);
+        // The extension context could have field not to propagate further, so, must use the this.* to process.
+        this.extensionContext.handle(tracingContext.activeSpan());

Review comment:
       > Seems to break the plugin tests
   
   @kezhenxu94 Yes, the current status of context is complex. `this` and `tracingContext.getExtensionContext()` are not the same thing.
   
   Right now, it should be good.




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