Skip to content

Commit

Permalink
Force 'Auto' from sentry window (#219)
Browse files Browse the repository at this point in the history
* Force 'Auto' from sentry window

* CHANGELOG

* Compression label removed

* Compression level set by default

* NoCompression instead of Auto
  • Loading branch information
semuserable authored Jun 10, 2021
1 parent b6a6107 commit f1c77e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Force 'Auto' from sentry window ([#219](https://github.com/getsentry/sentry-unity/pull/219))
- Hub.IsEnabled check in logging integration ([#210](https://github.com/getsentry/sentry-unity/pull/210))

### Features
Expand Down
4 changes: 0 additions & 4 deletions src/Sentry.Unity.Editor/SentryWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ private void OnGUI()
new GUIContent("Event Sample Rate", "What random sample rate to apply. 1.0 captures everything, 0.7 captures 70%."),
Options.SampleRate ?? 1.0f, 0.01f, 1);

Options.RequestBodyCompressionLevel = (CompressionLevelWithAuto)EditorGUILayout.EnumPopup(
new GUIContent("Compress Payload", "The level of which to compress the Sentry event before sending to Sentry."),
Options.RequestBodyCompressionLevel);

Options.AttachStacktrace = EditorGUILayout.Toggle(
new GUIContent("Stacktrace For Logs", "Whether to include a stack trace for non error events like logs. " +
"Even when Unity didn't include and no Exception was thrown.."),
Expand Down
3 changes: 3 additions & 0 deletions src/Sentry.Unity/SentryOptionsUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ public static void SetDefaults(SentryUnityOptions options, IApplication? applica
{
application ??= ApplicationAdapter.Instance;

// 'Optimal' and 'Fastest' don't work on IL2CPP. Forcing 'NoCompression'.
options.RequestBodyCompressionLevel = CompressionLevelWithAuto.NoCompression;

SetRelease(options, application);
SetEnvironment(options, application);
SetCacheDirectoryPath(options, application);
Expand Down
2 changes: 2 additions & 0 deletions src/Sentry.Unity/SentryUnityOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,12 @@ public enum CompressionLevelWithAuto
Auto = -1,
/// <summary>
/// The compression operation should be optimally compressed, even if the operation takes a longer time (and CPU) to complete.
/// Not supported on IL2CPP.
/// </summary>
Optimal = CompressionLevel.Optimal,
/// <summary>
/// The compression operation should complete as quickly as possible, even if the resulting data is not optimally compressed.
/// Not supported on IL2CPP.
/// </summary>
Fastest = CompressionLevel.Fastest,
/// <summary>
Expand Down

0 comments on commit f1c77e2

Please sign in to comment.