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/01/07 02:14:23 UTC
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4187:
make a suggestion about DUBBO plugin
wu-sheng commented on a change in pull request #4187: make a suggestion about DUBBO plugin
URL: https://github.com/apache/skywalking/pull/4187#discussion_r363566166
##########
File path: apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/DubboInterceptor.java
##########
@@ -56,6 +57,9 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable {
Invoker invoker = (Invoker)allArguments[0];
Invocation invocation = (Invocation)allArguments[1];
+ if (invocation.getAttachments().containsKey(SW3CarrierItem.HEADER_NAME)) {
+ invocation.getAttachments().remove(SW3CarrierItem.HEADER_NAME);
+ }
Review comment:
Remove should be something similar than this
```
CarrierItem next = contextCarrier.items();
while (next.hasNext()) {
next = next.next();
rpcContext.getAttachments().put(next.getHeadKey(), next.getHeadValue());
}
```
Key is defined in there.
----------------------------------------------------------------
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
With regards,
Apache Git Services