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/10/19 06:59:52 UTC

[GitHub] [skywalking] EvanLjp commented on a change in pull request #5685: Apply tags from Correlation Context key/values to Spans

EvanLjp commented on a change in pull request #5685:
URL: https://github.com/apache/skywalking/pull/5685#discussion_r507514444



##########
File path: apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/tag/AbstractTag.java
##########
@@ -60,4 +61,21 @@ public int getId() {
     public boolean isCanOverwrite() {
         return canOverwrite;
     }
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o)
+            return true;
+        if (!(o instanceof AbstractTag))
+            return false;
+        final AbstractTag<?> that = (AbstractTag<?>) o;
+        return getId() == that.getId() &&
+            isCanOverwrite() == that.isCanOverwrite() &&
+            key.equals(that.key);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getId(), isCanOverwrite(), key);
+    }

Review comment:
       For stringTag equals:
   ![image](https://user-images.githubusercontent.com/31562192/96411822-af560800-121b-11eb-8bbc-5386ac448fa8.png)
   




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