You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/01/12 11:36:22 UTC
[skywalking-java] branch main updated: Compatible with the versions after dubbo-2.7.14 (#88)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git
The following commit(s) were added to refs/heads/main by this push:
new dfda1aa Compatible with the versions after dubbo-2.7.14 (#88)
dfda1aa is described below
commit dfda1aafca69b193e26333e653dd2dbad8bb1edb
Author: wuwen <wu...@aliyun.com>
AuthorDate: Wed Jan 12 19:36:15 2022 +0800
Compatible with the versions after dubbo-2.7.14 (#88)
The ```rpcContext.getAttachments()``` method returns is a copy Map
---
CHANGES.md | 1 +
.../org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java | 2 +-
test/plugin/scenarios/dubbo-2.7.x-scenario/support-version.list | 3 ++-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 79e593c..94a86e8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -18,6 +18,7 @@ Release Notes.
* Fix TracePathMatcher should match pattern "**" with paths end by "/"
* Add support `returnedObj` expression for apm-customize-enhance-plugin
* Fix the bug that httpasyncclient-4.x-plugin puts the dirty tracing context in the connection context
+* Compatible with the versions after dubbo-2.7.14
#### Documentation
diff --git a/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java b/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java
index 3ccffbe..4aff0bf 100644
--- a/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/DubboInterceptor.java
@@ -79,7 +79,7 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor {
CarrierItem next = contextCarrier.items();
while (next.hasNext()) {
next = next.next();
- rpcContext.getAttachments().put(next.getHeadKey(), next.getHeadValue());
+ rpcContext.setAttachment(next.getHeadKey(), next.getHeadValue());
if (invocation.getAttachments().containsKey(next.getHeadKey())) {
invocation.getAttachments().remove(next.getHeadKey());
}
diff --git a/test/plugin/scenarios/dubbo-2.7.x-scenario/support-version.list b/test/plugin/scenarios/dubbo-2.7.x-scenario/support-version.list
index 0d2032f..cc8ec38 100644
--- a/test/plugin/scenarios/dubbo-2.7.x-scenario/support-version.list
+++ b/test/plugin/scenarios/dubbo-2.7.x-scenario/support-version.list
@@ -14,4 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-2.7.3
\ No newline at end of file
+2.7.3
+2.7.14
\ No newline at end of file