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

Add Undertow 2.1.7.final+ worker thread pool metrics. #744

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

weixiang1862
Copy link
Member

Fix Undertow 2.1.7.final+ worker thread pool metrics.

  • Add a unit test to verify that the fix works.
  • Explain briefly why the bug exists and how to fix it.
  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

I found undertow worker thread pool monitoring is not supported in skywalking-showcase songs service which use spring-boot-starter-undertow:2.5.6.
However spring-boot-starter-undertow:2.5.6 is in our java-agent test matrix.

After research, I located the problem of undertow undertow-worker-thread-pool-scenario, it just change test version of spring-boot-starter-undertow,
but forgot to upgrade the version of spring-boot-dependencies, which actualy control the version of xnio(the impl of undertow worker threadpool).

So currently, undertow only tested and supported in xnio version 3.3.8.final. In showcase songs service, we use xnio 3.8.x.final, this explains why no threadpool metrics reported.

In this PR, I add 3.8.x as supported version and fix undertow undertow-worker-thread-pool-scenario to make sure it fully tested.

springboot undertow xnio
2.1.9.RELEASE 2.0.26.final 3.3.8.final
2.2.13.RELEASE 2.0.33.final 3.3.8.final
2.3.12.RELEASE 2.1.7.final 3.8.0.final
2.4.13 2.2.12.final 3.8.4.final
2.5.9 2.2.14.final 3.8.4.final
2.6.3 2.2.14.final 3.8.4.final

@weixiang1862
Copy link
Member Author

TaskPool is a inner class in org.xnio package, I try add a new class with same package name to access TaskPool but failed, so I change back to reflect way.

java.lang.IllegalAccessError: tried to access class org.xnio.XnioWorker$TaskPool from class org.xnio.XnioWorkerTaskPoolAccessor

singleValue: ge 1
singleValue: ge -1
Copy link
Member Author

Choose a reason for hiding this comment

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

In new xnio implemention(3.8.0+), it return -1 if pool not ready or queue size is unlimited, so I change expectedData here.

@wu-sheng wu-sheng added enhancement New feature or request plugin labels Dec 30, 2024
@wu-sheng wu-sheng added this to the 9.4.0 milestone Dec 30, 2024
@wu-sheng wu-sheng merged commit b358267 into apache:main Dec 30, 2024
193 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants