xiaozuo2020 commented on issue #6900:
URL: https://github.com/apache/skywalking/issues/6900#issuecomment-1001848175


   > 
   
   
   
   > > 
   > 
   > Object entrySpanInstance = exchange.getAttributes().get("SKYWALING_SPAN");
   > 
   > Class<?> entrySpanClazz = 
entrySpanInstance.getClass().getSuperclass().getSuperclass();
   > 
   > Field field = entrySpanClazz.getDeclaredField("owner");
   > 
   > field.setAccessible(true);
   > 
   > Object ownerInstance = field.get(entrySpanInstance);
   > 
   > Class<?> ownerClazz = ownerInstance.getClass();
   > 
   > Method getTraceId = ownerClazz.getMethod("getReadablePrimaryTraceId");
   > 
   > String traceId = (String) getTraceId.invoke(ownerInstance);
   > 
   > 您需要在过滤器方法中编写此代码。
   > 
   > 希望对你有帮助。
   
   3q,so much!!!
   that day, I found another way 
   modify the 2.1x gateway plugin,this plugin  includ webflux plugin code
   
![1122](https://user-images.githubusercontent.com/52436771/147524244-afcf41d6-fe9e-4002-8454-0780e0944256.png)
   
   then  i can get traceID in attributes
   
   
![445](https://user-images.githubusercontent.com/52436771/147524441-aa79abad-ca7c-4038-a553-6fe2327fdae2.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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to