You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "WillemJiang (via GitHub)" <gi...@apache.org> on 2023/02/23 00:14:06 UTC

[GitHub] [skywalking-java] WillemJiang commented on a diff in pull request #460: Fix servicecomb plugin trace break

WillemJiang commented on code in PR #460:
URL: https://github.com/apache/skywalking-java/pull/460#discussion_r1115127337


##########
apm-sniffer/apm-sdk-plugin/servicecomb-plugin/servicecomb-java-chassis-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/servicecomb/v2/ProducerOperationHandlerInterceptor.java:
##########
@@ -42,7 +42,12 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
         CarrierItem next = contextCarrier.items();
         while (next.hasNext()) {
             next = next.next();
-            next.setHeadValue(invocation.getContext().get(next.getHeadKey()));
+            String headKey = next.getHeadKey();
+            if (invocation.getContext().containsKey(headKey)) {
+                next.setHeadValue(invocation.getContext().get(headKey));
+            } else {
+                next.setHeadValue(invocation.getRequestEx().getHeader(headKey));

Review Comment:
   Please add a comment for this fallback solution.



##########
CHANGES.md:
##########
@@ -16,6 +16,7 @@ Release Notes.
 * Refactor kotlin coroutine plugin with CoroutineContext.
 * Fix OracleURLParser ignoring actual port when :SID is absent.
 * Change gRPC instrumentation point to fix plugin not working for server side.
+* Fix servicecomb plugin trace break.

Review Comment:
   Please add the GitHub issue link in this CHANGES



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

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org