Skip to content

Commit d83be50

Browse files
authored
Do not always write startup crash marker (#3409)
1 parent ef1c11b commit d83be50

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
- (Internal) Metrics code cleanup ([#3403](https://github.com/getsentry/sentry-java/pull/3403))
1313
- Fix Frame measurements in app start transactions ([#3382](https://github.com/getsentry/sentry-java/pull/3382))
1414
- Fix timing metric value different from span duration ([#3368](https://github.com/getsentry/sentry-java/pull/3368))
15+
- Do not always write startup crash marker ([#3409](https://github.com/getsentry/sentry-java/pull/3409))
16+
- This may have been causing the SDK init logic to block the main thread
1517

1618
## 7.8.0
1719

sentry-android-core/src/main/java/io/sentry/android/core/cache/AndroidEnvelopeCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void store(@NotNull SentryEnvelope envelope, @NotNull Hint hint) {
5757
if (HintUtils.hasType(hint, UncaughtExceptionHandlerIntegration.UncaughtExceptionHint.class)
5858
&& sdkInitTimeSpan.hasStarted()) {
5959
long timeSinceSdkInit =
60-
currentDateProvider.getCurrentTimeMillis() - sdkInitTimeSpan.getStartTimestampMs();
60+
currentDateProvider.getCurrentTimeMillis() - sdkInitTimeSpan.getStartUptimeMs();
6161
if (timeSinceSdkInit <= options.getStartupCrashDurationThresholdMillis()) {
6262
options
6363
.getLogger()

sentry-android-core/src/test/java/io/sentry/android/core/cache/AndroidEnvelopeCacheTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ class AndroidEnvelopeCacheTest {
5151
AppStartMetrics.getInstance().apply {
5252
if (options.isEnablePerformanceV2) {
5353
appStartTimeSpan.setStartedAt(appStartMillis)
54-
appStartTimeSpan.setStartUnixTimeMs(appStartMillis)
5554
} else {
5655
sdkInitTimeSpan.setStartedAt(appStartMillis)
57-
sdkInitTimeSpan.setStartUnixTimeMs(appStartMillis)
5856
}
5957
}
6058
}

0 commit comments

Comments
 (0)