sentry-unity
sentry-unity copied to clipboard
Configurable Unity Log level to Event and Breadcrumb
This issue describes this todo:
https://github.com/getsentry/sentry-unity/blob/d30c7765172972162db86bac1ab4414a6aad75bf/src/Sentry.Unity/SentryInitialization.cs#L158-L159
We should have a configurable minimum level for what becomes a breadcrumb and what becomes an event. Similar to what other logging integrations do.
Example: https://github.com/getsentry/sentry-dotnet/blob/357a0eb751414ca5cd7a8a1a476fdf5fa309bcb9/src/Sentry.Extensions.Logging/SentryLogger.cs#L119 and https://github.com/getsentry/sentry-dotnet/blob/357a0eb751414ca5cd7a8a1a476fdf5fa309bcb9/src/Sentry.Extensions.Logging/SentryLogger.cs#L138
- [x] Add configuration to allow control automatic "log type to breadcrumb" capture
- [ ] Add configuration of what log type gets captured as an event
With such a feature, we could configure the SDK to send an invite for what the warning seeing here as a crumb:
+1 would like to limit reporting only to exceptions, errors still to be in breadcrumbs though.
This should mirror the behavior we have with MinimumBreadcrumbLevel
and MinimumEventLevel
in Sentry.Extensions.Logging. See https://docs.sentry.io/platforms/dotnet/guides/extensions-logging/#options
Still want to see this. Unity developers rely on many 3rd party sdk's and generally error log is used as a "serious" log when something has gone wrong but hasn't actually broken the app and sometimes we cant change the code (or at least shouldn't have to since we'll need to update it later and make those changes again).
All you need to do is push Exception's over to Fatal and keep Errors as Errors and we can filter out on before send
You basically just want to be able to automatically separate exceptions from logged errors. I think everything should be in place within the UnityLogHandlerIntegration
to make that work. The SDK won't be able to distinguish between LogException and an actual exception tho.