-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: disable offline caching on unknown platforms #770
Conversation
|
Downside is that it could work on xbox/playstation and we'd be turning it off. |
With this being a handler for "unknown platform", we could white-list the platforms we know/think it would work and leave disable by default. https://docs.unity3d.com/ScriptReference/RuntimePlatform.html I don't really know which ones to enable, though... |
@@ -11,14 +11,23 @@ public static class SentryUnknownPlatform | |||
{ | |||
public static void Configure(SentryUnityOptions options) | |||
{ | |||
options.DiagnosticLogger?.Log(SentryLevel.Debug, | |||
"Configuring on an unknown platform - some options may be overridden to improve compatibility."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Configuring on an unknown platform - some options may be overridden to improve compatibility."); | |
"Configuring on an unsupported platform - some options may be overridden to improve compatibility."); |
What do you think about unsupported instead of unknown? Because we actually do know the current platform, it's just not supported (yet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was considering this. Why I chose not to is because it's not really "unsupported", just not "officially supported"
// This is only provided on a best-effort basis for other than the explicitly supported platforms. | ||
if (options.BackgroundWorker is null) | ||
{ | ||
options.DiagnosticLogger?.Log(SentryLevel.Debug, | ||
"Configuring on an unknown platform. Using WebBackgroundWorker to improve compatibility."); | ||
options.DiagnosticLogger?.Log(SentryLevel.Debug, "Unknown platform: using WebBackgroundWorker."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.DiagnosticLogger?.Log(SentryLevel.Debug, "Unknown platform: using WebBackgroundWorker."); | |
options.DiagnosticLogger?.Log(SentryLevel.Debug, "Unsupported platform: using WebBackgroundWorker."); |
|
||
if (options.CacheDirectoryPath is not null) | ||
{ | ||
options.DiagnosticLogger?.Log(SentryLevel.Debug, "Unknown platform: disabling offline caching."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.DiagnosticLogger?.Log(SentryLevel.Debug, "Unknown platform: disabling offline caching."); | |
options.DiagnosticLogger?.Log(SentryLevel.Debug, "Unsupported platform: disabling offline caching."); |
@@ -11,14 +11,23 @@ public static class SentryUnknownPlatform | |||
{ | |||
public static void Configure(SentryUnityOptions options) | |||
{ | |||
options.DiagnosticLogger?.Log(SentryLevel.Debug, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.DiagnosticLogger?.Log(SentryLevel.Debug, | |
options.DiagnosticLogger?.Log(SentryLevel.Info, |
What do you think about raising this to Info
?
- Use single-threaded HTTP transport on unknown platforms ([#756](https://github.com/getsentry/sentry-unity/pull/756)) | ||
- Disable offline caching on unknown platforms ([#770](https://github.com/getsentry/sentry-unity/pull/770)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Use single-threaded HTTP transport on unknown platforms ([#756](https://github.com/getsentry/sentry-unity/pull/756)) | |
- Disable offline caching on unknown platforms ([#770](https://github.com/getsentry/sentry-unity/pull/770)) | |
- Use single-threaded HTTP transport on currently unsupported platforms ([#756](https://github.com/getsentry/sentry-unity/pull/756)) | |
- Disable offline caching on currently unsupported platforms ([#770](https://github.com/getsentry/sentry-unity/pull/770)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word "Unsupported" like that might give the wrong message? Maybe reword the whole thing to be more clear:
"Platform support for Offline Caching is unknown. Disabling it"
used @bruno-garcia's suggested wording - that's what I wanted the message to convey. |
No description provided.