sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Configurable Unity Log level to Event and Breadcrumb

Open bruno-garcia opened this issue 3 years ago • 5 comments

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

bruno-garcia avatar Mar 01 '21 17:03 bruno-garcia

With such a feature, we could configure the SDK to send an invite for what the warning seeing here as a crumb:

image

bruno-garcia avatar Aug 28 '21 12:08 bruno-garcia

+1 would like to limit reporting only to exceptions, errors still to be in breadcrumbs though.

oddgames-david avatar Jan 05 '22 00:01 oddgames-david

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

mattjohnsonpint avatar Oct 20 '22 16:10 mattjohnsonpint

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

oddgames-david avatar Jul 03 '23 03:07 oddgames-david

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.

bitsandfoxes avatar Jul 07 '23 11:07 bitsandfoxes