Skip to content

Commit b26b448

Browse files
committed
Merge remote-tracking branch 'origin/main' into rz/feat/screenshot-masking
# Conflicts: # CHANGELOG.md # sentry-samples/sentry-samples-android/src/main/AndroidManifest.xml # sentry/api/sentry.api # sentry/src/main/java/io/sentry/SentryReplayOptions.java
2 parents 83da7df + ad8da22 commit b26b448

File tree

78 files changed

+2982
-269
lines changed

Some content is hidden

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

78 files changed

+2982
-269
lines changed

.craft.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ targets:
4141
maven:io.sentry:sentry-android-fragment:
4242
maven:io.sentry:sentry-bom:
4343
maven:io.sentry:sentry-openfeign:
44-
#maven:io.sentry:sentry-openfeature:
44+
maven:io.sentry:sentry-openfeature:
4545
maven:io.sentry:sentry-opentelemetry-agent:
4646
maven:io.sentry:sentry-opentelemetry-agentcustomization:
4747
maven:io.sentry:sentry-opentelemetry-agentless:
@@ -66,3 +66,4 @@ targets:
6666
maven:io.sentry:sentry-reactor:
6767
maven:io.sentry:sentry-ktor-client:
6868
maven:io.sentry:sentry-async-profiler:
69+
maven:io.sentry:sentry-spotlight:

.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@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # pin@v2
39+
uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # 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@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # pin@v2
48+
uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # pin@v2

.github/workflows/integration-tests-ui-critical.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
BUILD_PATH: "build/outputs/apk/release"
1616
APK_NAME: "sentry-uitest-android-critical-release.apk"
1717
APK_ARTIFACT_NAME: "sentry-uitest-android-critical-release"
18-
MAESTRO_VERSION: "1.39.0"
18+
MAESTRO_VERSION: "2.1.0"
1919

2020
jobs:
2121
build:
@@ -60,23 +60,23 @@ jobs:
6060
matrix:
6161
include:
6262
- api-level: 31 # Android 12
63-
target: aosp_atd
63+
target: google_apis
6464
channel: canary # Necessary for ATDs
6565
arch: x86_64
6666
- api-level: 33 # Android 13
67-
target: aosp_atd
67+
target: google_apis
6868
channel: canary # Necessary for ATDs
6969
arch: x86_64
7070
- api-level: 34 # Android 14
71-
target: aosp_atd
71+
target: google_apis
7272
channel: canary # Necessary for ATDs
7373
arch: x86_64
7474
- api-level: 35 # Android 15
75-
target: aosp_atd
75+
target: google_apis
7676
channel: canary # Necessary for ATDs
7777
arch: x86_64
7878
- api-level: 36 # Android 16
79-
target: aosp_atd
79+
target: google_apis
8080
channel: canary # Necessary for ATDs
8181
arch: x86_64
8282
steps:
@@ -109,7 +109,7 @@ jobs:
109109
force-avd-creation: false
110110
disable-animations: true
111111
disable-spellchecker: true
112-
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
112+
emulator-options: -memory 4096 -no-window -gpu auto -noaudio -no-boot-anim -camera-back none
113113
disk-size: 4096M
114114
script: echo "Generated AVD snapshot for caching."
115115

@@ -133,16 +133,16 @@ jobs:
133133
force-avd-creation: false
134134
disable-animations: true
135135
disable-spellchecker: true
136-
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save
136+
emulator-options: -memory 4096 -no-window -gpu auto -noaudio -no-boot-anim -camera-back none -no-snapshot-save
137137
script: |
138138
adb uninstall io.sentry.uitest.android.critical || echo "Already uninstalled (or not found)"
139139
adb install -r -d "${{env.APK_NAME}}"
140-
maestro test "${{env.BASE_PATH}}/maestro" --debug-output "${{env.BASE_PATH}}/maestro-logs"
140+
mkdir "${{env.BASE_PATH}}/maestro-logs/" || true; adb emu screenrecord start --time-limit 360 "${{env.BASE_PATH}}/maestro-logs/recording.webm" || true; maestro test "${{env.BASE_PATH}}/maestro" --test-output-dir="${{env.BASE_PATH}}/maestro-logs/test-output" || MAESTRO_EXIT_CODE=$?; adb emu screenrecord stop || true; adb logcat -d > "${{env.BASE_PATH}}/maestro-logs/logcat.txt" || true; exit ${MAESTRO_EXIT_CODE:-0}
141141
142142
- name: Upload Maestro test results
143-
if: failure()
143+
if: ${{ always() }}
144144
uses: actions/upload-artifact@v6
145145
with:
146-
name: maestro-logs
146+
name: maestro-logs-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}
147147
path: "${{env.BASE_PATH}}/maestro-logs"
148148
retention-days: 1

.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@beea4aba589c66381258cbd131c5551ae8245b82 # v2
37+
uses: getsentry/craft@63d1636bead951f6e034ed62c2a3610965fef010 # v2
3838
env:
3939
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
4040
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
2+
.java-version
23
.idea/
34
.gradle/
45
.run/

CHANGELOG.md

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,33 @@
55
### Features
66

77
- Add screenshot masking support using view hierarchy ([#5077](https://github.com/getsentry/sentry-java/pull/5077))
8-
- Masks sensitive content (text, images) in error screenshots before sending to Sentry
9-
- Reuses Session Replay's masking logic; **requires `sentry-android-replay` module at runtime**
10-
- To enable masking programmatically:
11-
```kotlin
12-
SentryAndroid.init(context) { options ->
13-
options.isAttachScreenshot = true
14-
options.screenshotOptions.setMaskAllText(true)
15-
options.screenshotOptions.setMaskAllImages(true)
16-
}
17-
```
18-
- Or via AndroidManifest.xml:
19-
```xml
20-
<meta-data android:name="io.sentry.attach-screenshot" android:value="true" />
21-
<meta-data android:name="io.sentry.screenshot.mask-all-text" android:value="true" />
22-
<meta-data android:name="io.sentry.screenshot.mask-all-images" android:value="true" />
23-
```
24-
- Add `installGroupsOverride` parameter and `installGroups` property to Build Distribution SDK ([#5062](https://github.com/getsentry/sentry-java/pull/5062))
8+
- Add `installGroupsOverride` parameter to Build Distribution SDK for programmatic filtering, with support for configuration via properties file using `io.sentry.distribution.install-groups-override` ([#5066](https://github.com/getsentry/sentry-java/pull/5066))
9+
10+
### Fixes
11+
12+
- When merging tombstones with Native SDK, use the tombstone message if the Native SDK didn't explicitly provide one. ([#5095](https://github.com/getsentry/sentry-java/pull/5095))
13+
- Fix thread leak caused by eager creation of `SentryExecutorService` in `SentryOptions` ([#5093](https://github.com/getsentry/sentry-java/pull/5093))
14+
- There were cases where we created options that ended up unused but we failed to clean those up.
15+
- Attach user attributes to logs and metrics regardless of `sendDefaultPii` ([#5099](https://github.com/getsentry/sentry-java/pull/5099))
16+
- No longer log a warning if a logging integration cannot initialize Sentry due to missing DSN ([#5075](https://github.com/getsentry/sentry-java/pull/5075))
17+
- While this may have been useful to some, it caused lots of confusion.
18+
- Session Replay: Add `androidx.camera.view.PreviewView` to default `maskedViewClasses` to mask camera previews by default. ([#5097](https://github.com/getsentry/sentry-java/pull/5097))
19+
20+
### Dependencies
21+
22+
- Bump Native SDK from v0.12.4 to v0.12.7 ([#5071](https://github.com/getsentry/sentry-java/pull/5071), [#5098](https://github.com/getsentry/sentry-java/pull/5098))
23+
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0127)
24+
- [diff](https://github.com/getsentry/sentry-native/compare/0.12.4...0.12.7)
25+
26+
### Internal
27+
28+
- Add integration to track session replay custom masking ([#5070](https://github.com/getsentry/sentry-java/pull/5070))
29+
30+
## 8.32.0
31+
32+
### Features
33+
34+
- Add `installGroups` property to Build Distribution SDK ([#5062](https://github.com/getsentry/sentry-java/pull/5062))
2535
- Update Android targetSdk to API 36 (Android 16) ([#5016](https://github.com/getsentry/sentry-java/pull/5016))
2636
- Add AndroidManifest support for Spotlight configuration via `io.sentry.spotlight.enable` and `io.sentry.spotlight.url` ([#5064](https://github.com/getsentry/sentry-java/pull/5064))
2737
- Collect database transaction spans (`BEGIN`, `COMMIT`, `ROLLBACK`) ([#5072](https://github.com/getsentry/sentry-java/pull/5072))
@@ -32,6 +42,20 @@
3242
sentry:
3343
enable-database-transaction-tracing: true
3444
```
45+
- Add support for collecting native crashes using Tombstones ([#4933](https://github.com/getsentry/sentry-java/pull/4933), [#5037](https://github.com/getsentry/sentry-java/pull/5037))
46+
- Added Tombstone integration that detects native crashes using `ApplicationExitInfo.REASON_CRASH_NATIVE` on Android 12+
47+
- Crashes enriched with Tombstones contain more crash details and detailed thread info
48+
- Tombstone and NDK integrations are now automatically merged into a single crash event, eliminating duplicate reports
49+
- To enable it, add the integration in your Sentry initialization:
50+
```kotlin
51+
SentryAndroid.init(context, options -> {
52+
options.isTombstoneEnabled = true
53+
})
54+
```
55+
or in the `AndroidManifest.xml` using:
56+
```xml
57+
<meta-data android:name="io.sentry.tombstone.enable" android:value="true" />
58+
```
3559

3660
### Fixes
3761

@@ -42,10 +66,10 @@
4266
debugImplementation("io.sentry:sentry-spotlight:<version>")
4367
}
4468
```
45-
46-
### Fixes
47-
4869
- Fix scroll target detection for Jetpack Compose ([#5017](https://github.com/getsentry/sentry-java/pull/5017))
70+
- No longer fork Sentry `Scopes` for `reactor-kafka` consumer poll `Runnable` ([#5080](https://github.com/getsentry/sentry-java/pull/5080))
71+
- This was causing a memory leak because `reactor-kafka`'s poll event reschedules itself infinitely, and each invocation of `SentryScheduleHook` created forked scopes with a parent reference, building an unbounded chain that couldn't be garbage collected.
72+
- Fix cold/warm app start type detection for Android devices running API level 34+ ([#4999](https://github.com/getsentry/sentry-java/pull/4999))
4973

5074
### Internal
5175

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Sentry SDK for Java and Android
6767
| sentry-opentelemetry-core | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-opentelemetry-core?style=for-the-badge&logo=sentry&color=green) |
6868
| sentry-okhttp | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-okhttp?style=for-the-badge&logo=sentry&color=green) |
6969
| sentry-reactor | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-reactor?style=for-the-badge&logo=sentry&color=green) |
70+
| sentry-spotlight | ![Maven Central Version](https://img.shields.io/maven-central/v/io.sentry/sentry-spotlight?style=for-the-badge&logo=sentry&color=green) |
7071

7172
# Releases
7273

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ android.useAndroidX=true
1212
android.experimental.lint.version=8.9.0
1313

1414
# Release information
15-
versionName=8.31.0
15+
versionName=8.32.0
1616

1717
# Override the SDK name on native crashes on Android
1818
sentryAndroidSdkName=sentry.native.android

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ quartz = { module = "org.quartz-scheduler:quartz", version = "2.3.0" }
149149
reactor-core = { module = "io.projectreactor:reactor-core", version = "3.5.3" }
150150
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
151151
retrofit-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
152-
sentry-native-ndk = { module = "io.sentry:sentry-native-ndk", version = "0.12.4" }
152+
sentry-native-ndk = { module = "io.sentry:sentry-native-ndk", version = "0.12.7" }
153153
servlet-api = { module = "javax.servlet:javax.servlet-api", version = "3.1.0" }
154154
servlet-jakarta-api = { module = "jakarta.servlet:jakarta.servlet-api", version = "6.1.0" }
155155
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }

sentry-android-core/api/sentry-android-core.api

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public final class io/sentry/android/core/ActivityLifecycleIntegration : android
4141
}
4242

4343
public class io/sentry/android/core/AndroidContinuousProfiler : io/sentry/IContinuousProfiler, io/sentry/transport/RateLimiter$IRateLimitObserver {
44-
public fun <init> (Lio/sentry/android/core/BuildInfoProvider;Lio/sentry/android/core/internal/util/SentryFrameMetricsCollector;Lio/sentry/ILogger;Ljava/lang/String;ILio/sentry/ISentryExecutorService;)V
44+
public fun <init> (Lio/sentry/android/core/BuildInfoProvider;Lio/sentry/android/core/internal/util/SentryFrameMetricsCollector;Lio/sentry/ILogger;Ljava/lang/String;ILio/sentry/util/LazyEvaluator$Evaluator;)V
4545
public fun close (Z)V
4646
public fun getChunkId ()Lio/sentry/protocol/SentryId;
4747
public fun getProfilerId ()Lio/sentry/protocol/SentryId;
@@ -114,7 +114,7 @@ public final class io/sentry/android/core/AndroidMetricsBatchProcessorFactory :
114114

115115
public class io/sentry/android/core/AndroidProfiler {
116116
protected final field lock Lio/sentry/util/AutoClosableReentrantLock;
117-
public fun <init> (Ljava/lang/String;ILio/sentry/android/core/internal/util/SentryFrameMetricsCollector;Lio/sentry/ISentryExecutorService;Lio/sentry/ILogger;)V
117+
public fun <init> (Ljava/lang/String;ILio/sentry/android/core/internal/util/SentryFrameMetricsCollector;Lio/sentry/util/LazyEvaluator$Evaluator;Lio/sentry/ILogger;)V
118118
public fun close ()V
119119
public fun endAndCollect (ZLjava/util/List;)Lio/sentry/android/core/AndroidProfiler$ProfileEndData;
120120
public fun start ()Lio/sentry/android/core/AndroidProfiler$ProfileStartData;
@@ -291,6 +291,19 @@ public final class io/sentry/android/core/LoadClass : io/sentry/util/LoadClass {
291291
public fun loadClass (Ljava/lang/String;Lio/sentry/ILogger;)Ljava/lang/Class;
292292
}
293293

294+
public final class io/sentry/android/core/NativeEventCollector {
295+
public fun <init> (Lio/sentry/android/core/SentryAndroidOptions;)V
296+
public fun collect ()V
297+
public fun deleteNativeEventFile (Lio/sentry/android/core/NativeEventCollector$NativeEventData;)Z
298+
public fun findAndRemoveMatchingNativeEvent (J)Lio/sentry/android/core/NativeEventCollector$NativeEventData;
299+
}
300+
301+
public final class io/sentry/android/core/NativeEventCollector$NativeEventData {
302+
public fun getEnvelope ()Lio/sentry/SentryEnvelope;
303+
public fun getEvent ()Lio/sentry/SentryEvent;
304+
public fun getFile ()Ljava/io/File;
305+
}
306+
294307
public final class io/sentry/android/core/NdkHandlerStrategy : java/lang/Enum {
295308
public static final field SENTRY_HANDLER_STRATEGY_CHAIN_AT_START Lio/sentry/android/core/NdkHandlerStrategy;
296309
public static final field SENTRY_HANDLER_STRATEGY_DEFAULT Lio/sentry/android/core/NdkHandlerStrategy;
@@ -507,7 +520,7 @@ public final class io/sentry/android/core/TombstoneIntegration$TombstoneHint : i
507520
}
508521

509522
public class io/sentry/android/core/TombstoneIntegration$TombstonePolicy : io/sentry/android/core/ApplicationExitInfoHistoryDispatcher$ApplicationExitInfoPolicy {
510-
public fun <init> (Lio/sentry/android/core/SentryAndroidOptions;)V
523+
public fun <init> (Lio/sentry/android/core/SentryAndroidOptions;Landroid/content/Context;)V
511524
public fun buildReport (Landroid/app/ApplicationExitInfo;Z)Lio/sentry/android/core/ApplicationExitInfoHistoryDispatcher$Report;
512525
public fun getLabel ()Ljava/lang/String;
513526
public fun getLastReportedTimestamp ()Ljava/lang/Long;

0 commit comments

Comments
 (0)