-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duration of request is wrong if method returns Mono (spring webflux controller) #4334
Comments
on the downside, this looks like a regression introduced in 1.6.0 on the (small) upside, it only seems to be a problem when pulling in both EDIT: the duplicate EDIT: the regression appears to be from #4078 EDIT: the regression appears to be coming from the tomcat instrumentation (or at least disabling the tomcat instrumentation makes the regression issue go away) |
Just to confirm, @lmolkova : do you want for Mono span to be a child of |
I expect controller span to be a child of Server of In a more complicated example, where I noticed the issue, I have correct nesting, wrong duration and still 2 controller spans |
Describe the bug
When Spring WebFlux controller returns Mono, the span for request ends immediately, but deferred/delayed mono still runs.
Steps to reproduce
Create a simple weblux app, here's controller code, full example:
mono-duration-bug.zip
What did you expect to see?
duration of hello/messages is longer - span ends after deferred mono ends.
What did you see instead?
What version are you using?
opentelemetry-javaagent - version: 1.6.2
Environment
Compiler: AdoptOpenJDK 16.0.1
OS: win10
The text was updated successfully, but these errors were encountered: