tomcat jmx ignore negative thread and session limits#16355
Merged
laurit merged 5 commits intoopen-telemetry:mainfrom Mar 10, 2026
Merged
tomcat jmx ignore negative thread and session limits#16355laurit merged 5 commits intoopen-telemetry:mainfrom
laurit merged 5 commits intoopen-telemetry:mainfrom
Conversation
…nstrumentation into jmx-tomcat-ignore-negative
Contributor
Author
|
waiting on #16274 to be merged first to be able to add assertion on the metric values. This would however not have prevented the issue to happen as there was already an explicit limit set in the test application, adding an assertion on the metric value just ensures that there is an explicit limit set in the test application. However, with such assertions on the metric value, removing both |
…nstrumentation into jmx-tomcat-ignore-negative
laurit
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For
tomcat.session.active.limit, when there is no limit configured themaxActiveSessionsreturns-1, thus we should ignore it.For
tomcat.thread.limit, the limit can't be configured at runtime, but there are cases where-1is returned as indicated in tomcat documentation of themaxThreadsMBean attribute.The test webapp already sets the
maxActiveSessionsinMETA-INF/context.xmlwhich means for Tomcat there was already an explicit upper limit and thetomcat.session.active.limitdoes not contain any negative value.Also add full metric names in tomcat metrics definitions for consistency with other yaml files and making them easy to grep.