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/02/21 11:18:59 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #6416: Fix the segment tag is not synchronized when updating the correlation value.

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



##########
File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/CorrelationContext.java
##########
@@ -78,6 +78,11 @@ public CorrelationContext() {
         // already contain key
         if (data.containsKey(key)) {
             final String previousValue = data.put(key, value);
+
+            // update tag if need
+            if (AUTO_TAG_KEYS.contains(key) && ContextManager.isActive()) {
+                ContextManager.activeSpan().tag(new StringTag(-1, key, true), value);

Review comment:
       Why -1 as key?




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