Repository navigation
Conversation
PR risk: highFor commit Main concerns: public contract, reach, data sent to Sentry. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
| httpRequest.getHeaders(CookieUtils.COOKIE_HEADER_NAME), | ||
| options.getDataCollectionResolver().getCookies(), | ||
| Collections.emptyList()); | ||
| sentryRequest.setCookies(cookies == null ? null : String.join(",", cookies)); |
There was a problem hiding this comment.
Servlet cookies skip the configured session cookie name
Medium Severity
The servlet processors now attach Cookie values by default, but they pass Collections.emptyList() as the extra sensitive cookie names. The container's configured session cookie name (from SessionCookieConfig) is never masked. A custom session cookie like MYAPPSESS doesn't match the built-in security list or the sensitive terms, so its session token goes to Sentry in plain text.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b6c577c. Configure here.
Remove the deprecated option and use Data Collection defaults across SDK integrations. Document how to configure restrictive collection behavior when migrating to version 9. Fixes GH-6160
New JDK trust stores reject the compromised eMudhra certificate during the TLS handshake before the SDK-specific check runs. Assert the shared IOException contract so the transport test remains valid across JDK trust store versions.
b6c577c to
c642802
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c642802. Configure here.
| httpRequest.getHeaders(CookieUtils.COOKIE_HEADER_NAME), | ||
| options.getDataCollectionResolver().getCookies(), | ||
| Collections.emptyList()); | ||
| sentryRequest.setCookies(cookies == null ? null : String.join(",", cookies)); |
There was a problem hiding this comment.
Servlet requests without cookies report an empty string
Low Severity
HttpServletRequest.getHeaders("Cookie") returns an empty enumeration when the request has no cookies, not null. filterCookiesFromHeader then returns an empty list, and String.join turns it into "". So every event from a request without cookies now gets request.cookies = "" instead of leaving the field unset.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c642802. Configure here.
| if (scopes.getOptions().getDataCollectionResolver().isDataCollectionConfigured()) { | ||
| urlDetails.applyToSpan(span); | ||
| } | ||
| urlDetails.applyToSpan(span); |
There was a problem hiding this comment.
This now attaches the raw URL fragment to the span by default. For example, #access_token=example is sent unchanged, even when urlQueryParams is off. Can we apply the policy in UrlUtils.parse so both Spring variants get the fix? That's how it's mentioned in the spec as well: https://develop.sentry.dev/sdk/foundations/client/data-collection/#urls
| } | ||
| }); | ||
| return headers; | ||
| return HttpUtils.filterHeaders( |
There was a problem hiding this comment.
Seems like this now will always capture cookies that are explicitly allowed in OTel (like OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERS=cookie) as [Filtered] -- is this intentional?
romtsn
left a comment
There was a problem hiding this comment.
I'd check the bugbot finding and also the couple of comments I've left, let me know when it needs another look!


PR Stack (Remove sendDefaultPii)
📜 Description
Remove the deprecated
sendDefaultPiioption from the Java, Android, Spring, external configuration, and generated API surfaces. Data Collection is now the only SDK-level control for automatically collected data.When Data Collection is not explicitly configured, the documented defaults now apply directly: user information, database query data, file paths, GraphQL content, and HTTP bodies are enabled, while cookies, URL query parameters, and HTTP headers use their default deny lists. Explicit Data Collection settings continue to take precedence.
This also removes the compatibility-only
DataCollection.forceDataCollection()API, makes Logback rely only onincludeUnencodedMessage, and applies the request-header Data Collection policy to OpenTelemetry-derived headers.💡 Motivation and Context
sendDefaultPiiwas deprecated in 8.x after Data Collection shipped. Version 9 removes the legacy configuration surfaces and fallback behavior so integrations use one consistent policy model.Migration guidance documents the new defaults and how to configure restrictive collection behavior explicitly.
sendDefaultPiiin v9 #6160💚 How did you test it?
make format api.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
sentry-docs.sendDefaultPii.