You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] webflux trace is seperated,there are mutilple traces but actual is only one trace #12817
I had searched in the issues and found no similar issues.
Apache SkyWalking Component
OAP server (apache/skywalking)
What happened
when I use skywaling to trace webflux ,I found that if the return type is Mono ,then the trace is broken.
like this:
as the screenShot shows that:
what I need is opeartion from web request to redis,is only one trace.
this is my code: @GetMapping("/getValue")
public Mono getValue() {
return redisTemplate.opsForValue().get("test").doOnSuccess(result -> System.out.println("Data read from Redis: " + result));
}
What you expected to happen
What I expected is that it could be only one trace, not seperate.
only show the webflux request is best (I know I could remove the plugin mvc-annotation in plugins folder).
How to reproduce
every time.
Anything else
No response
Are you willing to submit a pull request to fix on your own?
Yes I am willing to submit a pull request on my own!
by the way, I have removed apm-springmvc-annotation-3.x-plugin-9.3.0
apm-springmvc-annotation-4.x-plugin-9.3.0
apm-springmvc-annotation-5.x-plugin-9.3.0
apm-springmvc-annotation-6.x-plugin-9.3.0
apm-springmvc-annotation-commons-9.3.0
these jars into option-plugins folder ,did this have effect?
Personally, I don't know this as I am not working in Java application for a long time. Also, plugins are complex in Java ecosystem, there are various use cases.
Still, when you find out a plugin issue, you need to debug the codes and find out why. Usually case like this is caused by thread-switch issue. The plugins don't cover all cases.
But we don't have people to debug all plugins, as we are the ones wrote these. They are from world wide. We just verify through provided plugin test cases, nothing more.
Activity
[-][Bug] [/-][+][Bug] webflux trace is seperated,there are mutilple traces but actual is only one trace[/+]wu-sheng commentedon Dec 1, 2024
You may need this.
https://skywalking.apache.org/docs/skywalking-java/latest/en/setup/service-agent/java-agent/application-toolkit-webflux/
wild46cat commentedon Dec 2, 2024
I had readed the document.

but there is still problem.
as the picture shown:
lettuce can't be merged into the the same trace.
here is my code:
@GetMapping("getValue12")
public Mono getValue12() {
return Mono.subscriberContext()
.flatMap(ctx -> WebFluxSkyWalkingOperators.continueTracing(ctx, () -> {
return redisTemplate.opsForValue().get("test");
}));
}
I think maybe I have found a problem about webflux.
wild46cat commentedon Dec 2, 2024
by the way, I have removed
apm-springmvc-annotation-3.x-plugin-9.3.0
apm-springmvc-annotation-4.x-plugin-9.3.0
apm-springmvc-annotation-5.x-plugin-9.3.0
apm-springmvc-annotation-6.x-plugin-9.3.0
apm-springmvc-annotation-commons-9.3.0
these jars into option-plugins folder ,did this have effect?
wu-sheng commentedon Dec 2, 2024
Personally, I don't know this as I am not working in Java application for a long time. Also, plugins are complex in Java ecosystem, there are various use cases.
Still, when you find out a plugin issue, you need to debug the codes and find out why. Usually case like this is caused by thread-switch issue. The plugins don't cover all cases.
But we don't have people to debug all plugins, as we are the ones wrote these. They are from world wide. We just verify through provided plugin test cases, nothing more.
wild46cat commentedon Dec 2, 2024
I really appreciate your honesty. I will carefully debug and try to find the cause of the problem.
wu-sheng commentedon Feb 24, 2026
This has been resolved by @wuwen5 via apache/skywalking-java#788