feat(servlet): add jakarta-servlet-6.0 instrumentation module#11584
Closed
wconti27 wants to merge 2 commits into
Closed
feat(servlet): add jakarta-servlet-6.0 instrumentation module#11584wconti27 wants to merge 2 commits into
wconti27 wants to merge 2 commits into
Conversation
…vlet 6.0/6.1 support Adds a dedicated instrumentation module for Jakarta Servlet 6.0/6.1 (Spring Boot 4). Key additions over the existing jakarta-servlet-5.0 module: - New hook for sendRedirect(String, int, boolean) — the 3-arg abstract added in Servlet 6.1 - Span enrichment using Servlet 6.0 APIs: getRequestId(), getProtocolRequestId(), getServletConnection() - IAST AddCookieAdvice reads RFC 6265bis SameSite/Partitioned attributes via Cookie.getAttribute() - RumHttpServletResponseWrapper60 overrides the new 3-arg sendRedirect for correct RUM injection - Muzzle range [6.0,), compiled against jakarta.servlet-api:6.1.0 - Renames servlet5 package to servlet6, adds Servlet6RequestBodyInstrumentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
❌ New Groovy Files Detected Please avoid introducing new
Instead, rewrite the new file(s) in Java / JUnit. See the How to Test With JUnit Guide for more details. If this PR needs an exception, add the |
Contributor
|
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
This was referenced Jun 6, 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.
🤖 Generated with APM Instrumentation Toolkit
Summary
jakarta-servlet-6.0instrumentation module covering Jakarta Servlet 6.0/6.1 (required for Spring Boot 4 / Spring Framework 7 support)jakarta-servlet-5.0intodatadog.trace.instrumentation.servlet6, muzzle range[6.0,), compile targetjakarta.servlet-api:6.1.0Key changes vs jakarta-servlet-5.0
1.
sendRedirect(String, int, boolean)IAST hook (critical)In Servlet 6.1, this 3-arg overload became the new abstract; the 1-arg is now a default delegate. Tomcat 11/Jetty 12 implement only the 3-arg form — the existing IAST
UnvalidatedRedirecthook silently misses all redirects on those containers. AddedSendRedirect3ArgAdvice.2. New Servlet 6.0 span tags (reads inside existing advice, no new hooks)
http.request_id←getRequestId()network.protocol_request_id←getProtocolRequestId()(omitted when empty)network.connection.id/network.protocol.name←getServletConnection()3. IAST cookie RFC 6265bis —
AddCookieAdvicereadsgetAttribute("SameSite")/getAttribute("Partitioned")4.
RumHttpServletResponseWrapper60— overridessendRedirect(String, int, boolean)so RUM injection is not bypassedTest plan
jakarta.servlet-api:6.+/spring-boot-starter-web:4.+(CI)Related
Part of Spring Boot 4 instrumentation: https://github.com/DataDog/apm-instrumentation-toolkit/issues/437
🤖 Generated with APM Instrumentation Toolkit