Skip to content

Add Jetty 12 and Struts 7 (Jakarta) agent plugins#813

Merged
wu-sheng merged 1 commit into
mainfrom
feature/jetty12-struts7-jakarta-plugins
Jul 7, 2026
Merged

Add Jetty 12 and Struts 7 (Jakarta) agent plugins#813
wu-sheng merged 1 commit into
mainfrom
feature/jetty12-struts7-jakarta-plugins

Conversation

@wu-sheng

@wu-sheng wu-sheng commented Jul 7, 2026

Copy link
Copy Markdown
Member

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 concrete HttpChannel (whose handle() the merged jetty-server plugin enhances) and moved request handling to the async, namespace-neutral core API org.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 wrapped Callback completes (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 relocated DefaultActionInvocation from com.opensymphony.xwork2 to org.apache.struts2 and switched to jakarta.servlet, so the struts2-2.x plugin is inert on it. The new plugin enhances the relocated class, in a distinct package (...plugin.struts2.v7) to avoid an FQN collision with struts2-2.x.

  • Add a test case for the new plugin: jetty-12.x-scenario (embedded Jetty 12, versions 12.0.36 / 12.1.10) and struts2.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 CHANGES log.

@wu-sheng wu-sheng added this to the 9.7.0 milestone Jul 7, 2026
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.
@wu-sheng wu-sheng force-pushed the feature/jetty12-struts7-jakarta-plugins branch from 7aad545 to 4bad721 Compare July 7, 2026 02:17
@wu-sheng wu-sheng merged commit 64035d6 into main Jul 7, 2026
218 checks passed
@wu-sheng wu-sheng deleted the feature/jetty12-struts7-jakarta-plugins branch July 7, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants