Add Jetty 12 and Struts 7 (Jakarta) agent plugins#813
Merged
Conversation
Jetty 12 removed the concrete HttpChannel whose handle() the merged jetty-server plugin enhances, and moved request handling to the async, namespace-neutral core API Server#handle(Request, Response, Callback). Add a separate jetty-server-12.x plugin that enhances it and records an async entry span (finished with the response status when the wrapped Callback completes). Struts 7 relocated DefaultActionInvocation from com.opensymphony.xwork2 to org.apache.struts2 and switched to jakarta.servlet. Add a struts2-7.x plugin enhancing the new class (a distinct package from struts2-2.x avoids collision). Both reuse existing components (JettyServer, Struts2). Add plugin test scenarios covering the versions (Jetty 12.0.x/12.1.x; Struts 7.0.x/7.1.x/7.2.x) and update the supported list, plugin list and CHANGES. Each scenario drives the full RPC validation path in one trace - a server entry span, a client exit span, and a second entry span on a nested internal call carrying a cross-process ref - so both the entry and the context-extract sides of the plugin are proven, not just a lone entry span. The struts scenario uses a lightweight httpheader result instead of a JSP view to keep the cold first request under the plugin-test framework's 3s entry-service timeout. Add test/plugin/CLAUDE.md (plugin-test-first approach, the RPC/client validation paths, the one-version-per-minor rule, how the jvm/tomcat containers and GitHub Actions lanes pin their JDK/Tomcat base image, and the cold-start timeout gotcha) and document the supported jvm/tomcat containers in Plugin-test.md.
7aad545 to
4bad721
Compare
wankai123
approved these changes
Jul 7, 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.
Add agent plugins for Jetty 12 and Struts 7 (Jakarta)
Two new plugins for Jakarta-era frameworks that the existing plugins cannot instrument:
Jetty 12 (
jetty-server-12.x) — Jetty 12 removed the concreteHttpChannel(whosehandle()the mergedjetty-serverplugin enhances) and moved request handling to the async, namespace-neutral core APIorg.eclipse.jetty.server.Server#handle(Request, Response, Callback). The plugin enhances it and records an async entry span, finished with the response status when the wrappedCallbackcompletes (with 404 / 500 fallbacks for the not-handled and exception paths). Covers Jetty 12.0.x and 12.1.x.Struts 7 (
struts2-7.x) — Struts 7 relocatedDefaultActionInvocationfromcom.opensymphony.xwork2toorg.apache.struts2and switched tojakarta.servlet, so thestruts2-2.xplugin is inert on it. The new plugin enhances the relocated class, in a distinct package (...plugin.struts2.v7) to avoid an FQN collision withstruts2-2.x.Add a test case for the new plugin:
jetty-12.x-scenario(embedded Jetty 12, versions 12.0.36 / 12.1.10) andstruts2.7-scenario(Jakarta WAR on Tomcat 10.1, versions 7.0.3 / 7.1.1 / 7.2.1), each wired into the JDK-17 CI group.Add a component id in
component-libraries.yml: not needed — both reuse existing components (JettyServer / Struts2).Add a logo in the UI repo: not needed — reuse existing framework logos.
Update the
CHANGESlog.