Skip to content

Conversation

@SylvainJuge
Copy link
Member

What does this PR do?

Fixes flaky transaction name when Webflux is used with Servlet transaction.

The underlying issue is that the transaction name is set in Webflux thread just after the transaction ends, which makes the Servlet instrumentation end the transaction and sometimes use a default name.

In order to fix this, I've just moved the part that sets the transaction name just before the transaction is being ended, which allows to make sure that the Servlet transaction won't be ended until the nested onError or onComplete method is called.

When the transaction is created and ended by Webflux without servlets, this does not change anything.

Checklist

  • This is a bugfix
    • I have updated CHANGELOG.asciidoc
    • I have added tests that would fail without this fix: they used to fail a lot, now they run without error.
Copy link
Contributor

@eyalkoren eyalkoren left a comment

Choose a reason for hiding this comment

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

👍

@SylvainJuge SylvainJuge marked this pull request as ready for review July 5, 2022 13:29
@github-actions
Copy link

github-actions bot commented Jul 5, 2022

/test

@SylvainJuge SylvainJuge enabled auto-merge (squash) July 5, 2022 13:31
@ghost
Copy link

ghost commented Jul 5, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-07-05T13:30:00.102+0000

  • Duration: 49 min 22 sec

Test stats 🧪

Test Results
Failed 0
Passed 3053
Skipped 36
Total 3089

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark tests.

  • run jdk compatibility tests : Run the JDK Compatibility tests.

  • run integration tests : Run the Agent Integration tests.

  • run end-to-end tests : Run the APM-ITs.

  • run windows tests : Build & tests on windows.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@SylvainJuge SylvainJuge merged commit cc55c45 into elastic:main Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants