Skip to content
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

Spring webflux: add user spans as children of the controller span #9572

Merged
merged 4 commits into from
Sep 28, 2023

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Sep 28, 2023

Resolves #9495
Currently spans that should be child spans of the controller appear as child spans of the server span.

@laurit laurit requested a review from a team September 28, 2023 12:24
@@ -52,7 +52,6 @@ public final class HttpServerTestOptions {
Predicate<ServerEndpoint> hasHandlerSpan = unused -> false;
Predicate<ServerEndpoint> hasResponseSpan = unused -> false;
Predicate<ServerEndpoint> hasErrorPageSpans = unused -> false;
Predicate<ServerEndpoint> hasHandlerAsControllerParentSpan = unused -> true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Comment on lines 77 to 81
options.setHasHandlerAsControllerParentSpan(unused -> false);
// TODO (trask) it seems like in this case ideally the controller span (which ends when the
// Mono that the controller returns completes) should end before the server span (which needs
// the result of the Mono)
options.setVerifyServerSpanEndTime(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to restore disabling end time verification because latest dep tests didn't pass

@laurit laurit merged commit 553eaa5 into open-telemetry:main Sep 28, 2023
47 checks passed
@laurit laurit deleted the webflux-controller-parent branch September 28, 2023 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong parent span while using Spring Cloud Gateway
2 participants