Skip to content

Commit 768ca8e

Browse files
runningcodeadinauerclaudesentry-release-bot[bot]sentry-junior[bot]
authored
Update v9 branch (#6183)
* docs: Warn about sendDefaultPii removal (#6156) Make the upcoming removal visible in the data collection changelog entry so customers know to migrate before the next major SDK version. Co-authored-by: Claude <noreply@anthropic.com> * release: 8.58.0 * docs(changelog): Remove warning indentation (#6157) Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Alexander Dinauer <alexander.dinauer@sentry.io> * feat(core): Deprecate sendDefaultPii (#6158) * feat(core): Deprecate sendDefaultPii Mark the SentryOptions accessors as deprecated and scheduled for removal in 9.0. Direct users to dataCollection while retaining legacy fallback behavior throughout 8.x. Co-Authored-By: Claude <noreply@anthropic.com> * changelog --------- Co-authored-by: Claude <noreply@anthropic.com> * feat(android): Make tombstone merge time threshold configurable (#6154) * feat(android): Make tombstone merge time threshold configurable * changelog * ref(android): Drop duplicate no-match log and document the merge threshold default * docs(android): Expand tombstone merge threshold javadoc * chore(deps): bump the github-actions group across 1 directory with 6 updates (#6169) Bumps the github-actions group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.38.0` | `4.38.2` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.38.0` | `4.38.2` | | [getsentry/github-workflows/danger](https://github.com/getsentry/github-workflows) | `3.4.0` | `3.4.1` | | [getsentry/craft](https://github.com/getsentry/craft) | `2.31.0` | `2.31.2` | | [getsentry/github-workflows/updater](https://github.com/getsentry/github-workflows) | `3.4.0` | `3.4.1` | | [getsentry/github-workflows/validate-pr](https://github.com/getsentry/github-workflows) | `3.4.0` | `3.4.1` | Updates `github/codeql-action/init` from 4.38.0 to 4.38.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@b96794f...2892aa5) Updates `github/codeql-action/analyze` from 4.38.0 to 4.38.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@b96794f...2892aa5) Updates `getsentry/github-workflows/danger` from 3.4.0 to 3.4.1 - [Release notes](https://github.com/getsentry/github-workflows/releases) - [Changelog](https://github.com/getsentry/github-workflows/blob/main/CHANGELOG.md) - [Commits](getsentry/github-workflows@607fed7...959162c) Updates `getsentry/craft` from 2.31.0 to 2.31.2 - [Release notes](https://github.com/getsentry/craft/releases) - [Changelog](https://github.com/getsentry/craft/blob/master/CHANGELOG.md) - [Commits](getsentry/craft@55694f8...25028d0) Updates `getsentry/github-workflows/updater` from 3.4.0 to 3.4.1 - [Release notes](https://github.com/getsentry/github-workflows/releases) - [Changelog](https://github.com/getsentry/github-workflows/blob/main/CHANGELOG.md) - [Commits](getsentry/github-workflows@607fed7...959162c) Updates `getsentry/github-workflows/validate-pr` from 3.4.0 to 3.4.1 - [Release notes](https://github.com/getsentry/github-workflows/releases) - [Changelog](https://github.com/getsentry/github-workflows/blob/main/CHANGELOG.md) - [Commits](getsentry/github-workflows@607fed7...959162c) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.38.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/analyze dependency-version: 4.38.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: getsentry/github-workflows/danger dependency-version: 3.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: getsentry/craft dependency-version: 2.31.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: getsentry/github-workflows/updater dependency-version: 3.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: getsentry/github-workflows/validate-pr dependency-version: 3.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(detekt): Ignore FunctionNaming for Composable functions (#6176) Compose functions that emit UI are PascalCase by convention, which detekt's default FunctionNaming pattern flags. Follow detekt's Compose guide and skip the rule for @composable functions. Fixes JAVA-748 Fixes #6175 Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(android): Compile Android modules against Android SDK 37.2 (#6172) Updates our compile SDK version from 37.0 to 37.2 for all Sentry Android modules, which lays the groundwork for accommodating new MemoryLimiter flags introduced in 37.2. Introduces a mechanism that lets us support compilation against minor SDK versions for any future release. * ref(android): Match MemoryLimiter app exit reason introduced in Android 37.2 (JAVA-687) (#6174) Android 37.2 introduced a new ApplicationExitInfo.REASON_MEMORY_LIMITER flag. This commit updates our MemoryLimiterIntegration code to match against it (while preserving ouro previous matching logic). No new Android API guard is needed for the new flag because: - we already check MemoryLimiterIntegration registration against API 37; and - REASON_MEMORY_LIMITER is a static integer constant and will be inlined as an integer by the Java compiler (meaning we don't need extra protection for devices on 37.0 or 37.1). * build(detekt): Apply remaining Compose guide settings (#6179) Add the rest of detekt's Compose guide on top of the FunctionNaming change from #6176. Keep accepting SCREAMING_CASE top-level constants, because the guide's PascalCase-only pattern would flag every existing TRACE_ORIGIN-style constant. Refs JAVA-748 Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs: Link Data Collection changelog to guides (#6180) Replace duplicated configuration details in the 8.58.0 changelog with links to the Android, Java, and Spring Boot documentation while retaining the sendDefaultPii removal warning. Co-authored-by: Claude <noreply@anthropic.com> * fix(core): Clear the persisted replay id when resetting the scope cache (#6033) * fix(core): Clear the persisted replay id when resetting the scope cache resetCache() clears every other persisted scope value on init but leaves replay.json in place, so a replay id written by a previous process can still be attached to events from the current one. The reset already runs after the integrations that consume those values, so deleting it here is safe. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * changelog * Remove comment Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io> * build(detekt): Lint all Kotlin modules (#6178) * build(detekt): Apply Compose guide and lint all Kotlin modules Add the remaining settings from detekt's Compose guide. Keep accepting SCREAMING_CASE top-level constants, because the guide's PascalCase-only pattern would flag every existing TRACE_ORIGIN-style constant. sentry-compose had the detekt plugin applied but the task was always NO-SOURCE, because the default source set is src/main and a multiplatform module keeps its code in src/androidMain. Point it at the Android source sets. Also enable detekt in sentry-android-replay, where it was commented out, and in the Kotlin modules that never applied it. The newly linted modules have 298 existing findings. Record them in per-module baselines so check passes and only new issues fail. They can be fixed in follow-ups. Refs JAVA-748 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * build(detekt): Move Compose guide settings to a separate PR Regenerate the baselines against main's config so this PR doesn't depend on the config change. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: adinauer <2542832+adinauer@users.noreply.github.com> Co-authored-by: sentry-release-bot[bot] <180476844+sentry-release-bot[bot]@users.noreply.github.com> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Alexander Dinauer <alexander.dinauer@sentry.io> Co-authored-by: Markus Hintersteiner <markus.hintersteiner@sentry.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Adam Brown <adam.brown@sentry.io>
1 parent 908fa26 commit 768ca8e

68 files changed

Lines changed: 624 additions & 163 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # pin@v2
39+
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # pin@v2
4040
with:
4141
languages: 'java'
4242

@@ -45,4 +45,4 @@ jobs:
4545
./gradlew buildForCodeQL --no-build-cache
4646
4747
- name: Perform CodeQL Analysis
48-
uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # pin@v2
48+
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # pin@v2

‎.github/workflows/danger.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ jobs:
88
danger:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: getsentry/github-workflows/danger@607fed74f812e69201531a5185b6c3c57caa4e89 # v3
11+
- uses: getsentry/github-workflows/danger@959162c159b866489d3fabe93327f48f9b8cb7ee # v3

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
fetch-depth: 0
3535
submodules: 'recursive'
3636
- name: Prepare release
37-
uses: getsentry/craft@55694f8bf3a0fd051e21a877f57b4c0dd8e946bb # v2
37+
uses: getsentry/craft@25028d0646040cc0a669ae3314cbf884f4c4347a # v2
3838
env:
3939
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
4040
with:

‎.github/workflows/update-deps.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
native:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: getsentry/github-workflows/updater@607fed74f812e69201531a5185b6c3c57caa4e89 # v3
21+
- uses: getsentry/github-workflows/updater@959162c159b866489d3fabe93327f48f9b8cb7ee # v3
2222
with:
2323
path: scripts/update-sentry-native-ndk.sh
2424
name: Native SDK

‎.github/workflows/validate-pr.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
permissions:
1111
pull-requests: write
1212
steps:
13-
- uses: getsentry/github-workflows/validate-pr@607fed74f812e69201531a5185b6c3c57caa4e89 # v3
13+
- uses: getsentry/github-workflows/validate-pr@959162c159b866489d3fabe93327f48f9b8cb7ee # v3
1414
with:
1515
app-id: ${{ vars.SDK_MAINTAINER_BOT_APP_ID }}
1616
private-key: ${{ secrets.SDK_MAINTAINER_BOT_PRIVATE_KEY }}

‎CHANGELOG.md‎

Lines changed: 11 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -4,121 +4,22 @@
44

55
### Features
66

7-
- Add `LocalSentrySpan` to `sentry-compose` so apps can provide a parent `ISpan` to a composable subtree and have nested `SentryTraced` spans attach to it ([#6112]https://github.com/getsentry/sentry-java/pull/6112)
8-
- Add `dataCollection`, a fine-grained replacement for `sendDefaultPii`, for controlling data collected automatically by SDK integrations ([#5759](https://github.com/getsentry/sentry-java/pull/5759))
9-
- `sendDefaultPii` remains supported for backwards compatibility. When `dataCollection` is not configured, the SDK preserves the existing `sendDefaultPii` behavior.
10-
- Configuring any `dataCollection` option makes it the source of truth. `sendDefaultPii` is then ignored, and omitted `dataCollection` options use the defaults below.
11-
- The Logback appender is a compatibility exception. When an encoder is configured, `sendDefaultPii=true` continues to include the original message template and parameters. To opt in independently of `sendDefaultPii`, set `<includeUnencodedMessage>true</includeUnencodedMessage>` on the Sentry appender in `logback.xml` or `logback-spring.xml`.
12-
- Data explicitly supplied through APIs such as `Sentry.setUser`, scopes, event processors, or `beforeSend` is not affected.
13-
14-
To opt in to the documented `dataCollection` defaults without configuring an individual option:
15-
16-
```java
17-
Sentry.init(options -> options.getDataCollection().forceDataCollection());
18-
```
19-
20-
| Option | Default | Behavior |
21-
| --- | --- | --- |
22-
| `userInfo` | `true` | Allows integrations to populate user identity and IP address information automatically. |
23-
| `cookies` | `{ mode: DENY_LIST, terms: [] }` | Collects cookies while filtering sensitive values. |
24-
| `httpHeaders.request` | `{ mode: DENY_LIST, terms: [] }` | Collects request headers while filtering sensitive values. |
25-
| `httpHeaders.response` | `{ mode: DENY_LIST, terms: [] }` | Collects response headers while filtering sensitive values. |
26-
| `httpBodies` | All supported body types | Collects supported incoming and outgoing request and response bodies. An empty set disables body collection. |
27-
| `urlQueryParams` | `{ mode: DENY_LIST, terms: [] }` | Collects URL query parameters while filtering sensitive values. |
28-
| `graphql.document` | `true` | Collects GraphQL documents. |
29-
| `graphql.variables` | `true` | Collects GraphQL variables. |
30-
| `databaseQueryData` | `true` | Allows collection of associated query data, such as bound parameters, write payloads, and results, where supported. Sanitized query statements and structural database metadata remain available. |
31-
| `filePaths` | `true` | Allows file-system instrumentation to collect file and directory paths. File extensions and byte counts remain available when disabled. |
7+
- Deprecate `sendDefaultPii` in favor of `dataCollection` ahead of its removal in 9.0 ([#6158](https://github.com/getsentry/sentry-java/pull/6158))
8+
- Make the tombstone merge time threshold configurable via `SentryAndroidOptions.setTombstoneMergeTimeThresholdMillis` and the `io.sentry.tombstone.merge-time-threshold-millis` manifest option ([#6154](https://github.com/getsentry/sentry-java/pull/6154))
329

33-
Cookies, HTTP headers, and URL query parameters support three modes:
34-
35-
- `OFF`: Do not collect the category.
36-
- `DENY_LIST`: Collect values except those matching the built-in sensitive deny-list or additional configured terms.
37-
- `ALLOW_LIST`: Only send plaintext values for matching terms. The built-in sensitive deny-list still applies.
38-
39-
Matching is case-insensitive and partial. The built-in sensitive deny-list contains `auth`, `token`, `secret`, `password`, `passwd`, `pwd`, `key`, `jwt`, `bearer`, `sso`, `saml`, `csrf`, `xsrf`, `credentials`, `session`, `sid`, and `identity`. Filtered values are replaced with `"[Filtered]"`. Custom deny-list terms extend rather than replace this list.
40-
41-
Configure all HTTP body types, a custom cookie deny-list, a request-header allow-list, and disable URL query parameter and file path collection in an options callback:
42-
43-
```java
44-
Sentry.init(
45-
options -> {
46-
options
47-
.getDataCollection()
48-
.setHttpBodies(
49-
EnumSet.of(
50-
HttpBodyType.INCOMING_REQUEST,
51-
HttpBodyType.OUTGOING_REQUEST,
52-
HttpBodyType.INCOMING_RESPONSE,
53-
HttpBodyType.OUTGOING_RESPONSE));
54-
options
55-
.getDataCollection()
56-
.setCookies(
57-
KeyValueCollectionBehavior.denyList(
58-
"forwarded", "-ip", "remote-", "via", "-user"));
59-
options
60-
.getDataCollection()
61-
.getHttpHeaders()
62-
.setRequest(
63-
KeyValueCollectionBehavior.allowList("content-type", "x-request-id"));
64-
options
65-
.getDataCollection()
66-
.setUrlQueryParams(KeyValueCollectionBehavior.off());
67-
options.getDataCollection().setFilePaths(false);
68-
});
69-
```
70-
71-
Configure the same options in `sentry.properties`:
72-
73-
```properties
74-
data-collection.http-bodies=incoming_request,outgoing_request,incoming_response,outgoing_response
75-
data-collection.cookies.mode=deny_list
76-
data-collection.cookies.terms=forwarded,-ip,remote-,via,-user
77-
data-collection.http-headers.request.mode=allow_list
78-
data-collection.http-headers.request.terms=content-type,x-request-id
79-
data-collection.url-query-params.mode=off
80-
data-collection.file-paths=false
81-
```
10+
### Improvements
8211

83-
Configure them with Spring Boot properties:
12+
- Recover Android 17 `MemoryLimiter` app exits recorded as `ApplicationExitInfo.REASON_MEMORY_LIMITER` ([#6174](https://github.com/getsentry/sentry-java/pull/6174))
8413

85-
```properties
86-
sentry.data-collection.http-bodies=incoming-request,outgoing-request,incoming-response,outgoing-response
87-
sentry.data-collection.cookies.mode=deny-list
88-
sentry.data-collection.cookies.terms=forwarded,-ip,remote-,via,-user
89-
sentry.data-collection.http-headers.request.mode=allow-list
90-
sentry.data-collection.http-headers.request.terms=content-type,x-request-id
91-
sentry.data-collection.url-query-params.mode=off
92-
sentry.data-collection.file-paths=false
93-
```
14+
## 8.58.0
9415

95-
Configure them in `AndroidManifest.xml`:
16+
### Features
9617

97-
```xml
98-
<meta-data
99-
android:name="io.sentry.data-collection.http-bodies"
100-
android:value="incoming_request,outgoing_request,incoming_response,outgoing_response" />
101-
<meta-data
102-
android:name="io.sentry.data-collection.cookies.mode"
103-
android:value="deny_list" />
104-
<meta-data
105-
android:name="io.sentry.data-collection.cookies.terms"
106-
android:value="forwarded,-ip,remote-,via,-user" />
107-
<meta-data
108-
android:name="io.sentry.data-collection.http-headers.request.mode"
109-
android:value="allow_list" />
110-
<meta-data
111-
android:name="io.sentry.data-collection.http-headers.request.terms"
112-
android:value="content-type,x-request-id" />
113-
<meta-data
114-
android:name="io.sentry.data-collection.url-query-params.mode"
115-
android:value="off" />
116-
<meta-data
117-
android:name="io.sentry.data-collection.file-paths"
118-
android:value="false" />
119-
```
18+
- Add `LocalSentrySpan` to `sentry-compose` so apps can provide a parent `ISpan` to a composable subtree and have nested `SentryTraced` spans attach to it ([#6112]https://github.com/getsentry/sentry-java/pull/6112)
19+
- Add `dataCollection`, a fine-grained replacement for `sendDefaultPii`, for controlling data collected automatically by SDK integrations. See the Data Collection documentation for [Android](https://docs.sentry.io/platforms/android/configuration/options/#dataCollection), [Java](https://docs.sentry.io/platforms/java/configuration/options/#dataCollection), and [Spring Boot](https://docs.sentry.io/platforms/java/guides/spring-boot/configuration/options/#dataCollection) ([#5759](https://github.com/getsentry/sentry-java/pull/5759))
12020

121-
See the [Data Collection documentation](https://docs.sentry.io/platforms/java/configuration/options/#dataCollection) for all configuration keys, supported integrations, and migration guidance.
21+
> [!WARNING]
22+
> `sendDefaultPii` will be removed in the next major SDK version. Migrate to `dataCollection` before upgrading.
12223

12324
### Fixes
12425

@@ -214,6 +115,7 @@
214115
### Fixes
215116

216117
- Keep dropped tombstone and ANR events dropped, instead of reporting the same app exit again at every app start ([#6002](https://github.com/getsentry/sentry-java/pull/6002))
118+
- Clear the persisted replay id on SDK init, so a replay id from a previous process is no longer attached to ANR events from the current one ([#6033](https://github.com/getsentry/sentry-java/pull/6033))
217119
- Apply `Sentry.withScope` and `Sentry.withIsolationScope` data to events captured inside the callback when `globalHubMode` is enabled ([#6004](https://github.com/getsentry/sentry-java/pull/6004))
218120
- `globalHubMode` is enabled by default on Android, where tags, extras, contexts and level set inside the callback were silently dropped
219121
- Scopes that are explicitly made current, e.g. via `Sentry.setCurrentScopes` or the `SentryContext` coroutine integration, are now also honoured when `globalHubMode` is enabled

‎build.gradle.kts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ subprojects {
117117
buildUponDefaultConfig = true
118118
allRules = true
119119
config.setFrom("${rootProject.rootDir}/detekt.yml")
120+
baseline = file("detekt-baseline.xml")
120121
}
121122
}
122123

‎detekt.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
style:
22
ReturnCount:
33
max: 3
4+
MagicNumber:
5+
ignorePropertyDeclaration: true
6+
UnusedPrivateMember:
7+
ignoreAnnotated: ['Preview']
8+
naming:
9+
FunctionNaming:
10+
ignoreAnnotated: ['Composable']
11+
TopLevelPropertyNaming:
12+
# Accept both SCREAMING_CASE and Compose's PascalCase constants.
13+
constantPattern: '[A-Z][_A-Za-z0-9]*'
14+
complexity:
15+
TooManyFunctions:
16+
ignoreAnnotatedFunctions: ['Preview']

‎gradle.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ android.newDsl=false
1616
android.experimental.lint.version=9.4.0
1717

1818
# Release information
19-
versionName=8.57.0
19+
versionName=8.58.0
2020

2121
# Override the SDK name on native crashes on Android
2222
sentryAndroidSdkName=sentry.native.android

‎gradle/libs.versions.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ sqldelight = "2.3.2"
4949
# Android
5050
targetSdk = "37"
5151
compileSdk = "37"
52+
compileSdkMinor = "2"
5253
minSdk = "21"
5354

5455
[plugins]

0 commit comments

Comments
 (0)