feat(servlet): add jakarta-servlet-6.0 instrumentation module for Servlet API 6.0/6.1#11588
Closed
wconti27 wants to merge 1 commit into
Closed
feat(servlet): add jakarta-servlet-6.0 instrumentation module for Servlet API 6.0/6.1#11588wconti27 wants to merge 1 commit into
wconti27 wants to merge 1 commit into
Conversation
…vlet API 6.0/6.1
Adds a new jakarta-servlet-6.0 instrumentation module covering
jakarta.servlet-api 6.0 and later (muzzle range [6.0,)).
New APIs instrumented beyond the 5.0 module:
- HttpServletRequest.getRequestId() → http.request_id span tag
- HttpServletRequest.getProtocolRequestId() → network.protocol_request_id
- HttpServletRequest.getServletConnection().getConnectionId() → network.connection.id
- HttpServletRequest.getServletConnection().getProtocol() → network.protocol.name
- HttpServletResponse.sendRedirect(String, int, boolean) — IAST unvalidated-redirect sink
- HttpCookie.getAttribute("SameSite") / getAttribute("Partitioned") for cookie security attrs
Includes Servlet60InstrumentationTest (JUnit 5) and Servlet60IastInstrumentationTest
(ByteBuddy advice integration test via AbstractInstrumentationTest).
Updates metadata/supported-configurations.json and settings.gradle.kts.
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
|
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.
Summary
Adds a new
jakarta-servlet-6.0instrumentation module (jakarta.servlet-api ≥ 6.0, muzzle range[6.0,)) that extends the existingjakarta-servlet-5.0instrumentation with new APIs introduced in Servlet 6.0/6.1:HttpServletRequest.getRequestId()→http.request_idspan tagHttpServletRequest.getProtocolRequestId()→network.protocol_request_idHttpServletRequest.getServletConnection().getConnectionId()→network.connection.idHttpServletRequest.getServletConnection().getProtocol()→network.protocol.nameHttpServletResponse.sendRedirect(String, int, boolean)— IASTUnvalidatedRedirectModulesink (Servlet 6.1 abstract)HttpCookie.getAttribute("SameSite")/getAttribute("Partitioned")for cookie security attribute trackingTest plan
./gradlew :dd-java-agent:instrumentation:servlet:jakarta-servlet-6.0:test— all tests passServlet60InstrumentationTest(JUnit 5) covers core span tag assertionsServlet60IastInstrumentationTestusesAbstractInstrumentationTestto exercise theSendRedirect3ArgAdvicethrough real ByteBuddy advice wiringlatestDepTestpicks upjakarta.servlet-api:6.+Part of Spring Boot 4 support
This is one of several PRs adding Spring Boot 4 / Jakarta EE 11 support across the dd-trace-java instrumentation stack.
🤖 Generated with APM Instrumentation Toolkit