Integration
sentry-android
Build System
Gradle
AGP Version
6.1.0
Proguard
Enabled
Version
8.33.0
Steps to Reproduce
When enableAutoSessionTracking is set to false and a session is started manually via Sentry.startSession(), crashed sessions are never marked as crashed. As a result, crash-free metrics always show 100% despite confirmed crashes.
Apparently PreviousSessionFinalizer.run() bails out early when isEnableAutoSessionTracking() returns false which means a manually started session that ends in a crash is never finalized on the next app launch and the previous session file on disk is simply ignored:
|
if (!options.isEnableAutoSessionTracking()) { |
|
options |
|
.getLogger() |
|
.log(DEBUG, "Session tracking is disabled, bailing from previous session finalizer."); |
|
return; |
|
} |
Originally this issue was reported in the Unreal SDK: getsentry/sentry-unreal#1204 (comment)
Expected Result
Crash free session rate display valid value.
Actual Result
Crash free session rate is always 100%
Integration
sentry-android
Build System
Gradle
AGP Version
6.1.0
Proguard
Enabled
Version
8.33.0
Steps to Reproduce
When
enableAutoSessionTrackingis set to false and a session is started manually viaSentry.startSession(), crashed sessions are never marked as crashed. As a result, crash-free metrics always show 100% despite confirmed crashes.Apparently
PreviousSessionFinalizer.run()bails out early whenisEnableAutoSessionTracking()returnsfalsewhich means a manually started session that ends in a crash is never finalized on the next app launch and the previous session file on disk is simply ignored:sentry-java/sentry/src/main/java/io/sentry/PreviousSessionFinalizer.java
Lines 51 to 56 in 22f4345
Originally this issue was reported in the Unreal SDK: getsentry/sentry-unreal#1204 (comment)
Expected Result
Crash free session rate display valid value.
Actual Result
Crash free session rate is always 100%