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

then i can get traceID in attributes

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