Skip to content

Commit ce3edb3

Browse files
authored
dont block init to flush (#291)
1 parent ef09233 commit ce3edb3

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Fix
6+
7+
- By default, don't block Sentry.Init up to 2 seconds to flush events ([#291](https://github.com/getsentry/sentry-unity/pull/291))
8+
39
## 0.5.0
410

511
### Features

src/Sentry.Unity.Editor/SentryWindow.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,8 @@ private void DisplayTransport()
262262

263263
Options.InitCacheFlushTimeout = EditorGUILayout.IntField(
264264
new GUIContent("Init Flush Timeout [ms]", "The timeout that limits how long the SDK " +
265-
"will attempt to flush existing cache during initialization." +
265+
"will attempt to flush existing cache during initialization, " +
266+
"potentially slowing down app start up to the specified time." +
266267
"\nThis features allows capturing errors that happen during " +
267268
"game startup and would not be captured because the process " +
268269
"would be killed before Sentry had a chance to capture the event."),

src/Sentry.Unity/SentryOptionsUtility.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void SetDefaults(SentryUnityOptions options, IApplication? applica
1414
options.AutoSessionTracking = true;
1515
options.CaptureInEditor = true;
1616
options.RequestBodyCompressionLevel = CompressionLevelWithAuto.NoCompression;
17-
options.InitCacheFlushTimeout = System.TimeSpan.FromSeconds(2);
17+
options.InitCacheFlushTimeout = System.TimeSpan.Zero;
1818

1919
options.StackTraceMode = StackTraceMode.Original;
2020
options.IsEnvironmentUser = false;

0 commit comments

Comments
 (0)