-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Incompatiblity with recordStackTraceAtLevel
from the Logging package
#1580
Comments
Hi, Here is an example stack trace reported to Sentry. Code snippet: recordStackTraceAtLevel = Level.SEVERE;
final log = Logger('Logging');
log.severe('My Logging test severe');
|
Hi @maBarabas sentry-dart/dart/lib/src/hub.dart Lines 605 to 610 in d783424
This is just an
This could be done but the problem is that if the same error is thrown twice, since a new object is constructed every time, the Maybe if the wrapper exception overrides |
Platform
Flutter Mobile
Obfuscation
Enabled
Debug Info
Enabled
Doctor
Version
7.9.0
Steps to Reproduce
recordStackTraceAtLevel = Level.SEVERE
. The makes Logging automatically set the error to a string, and assign the current stacktrace to the log.Logger('test').severe('hello world')
The snippet from
Logger.log
that auto generates the String is:Expected Result
Error is captured, and sentry does not print internal errors.
Sentry logging integration should be compatible with all types accepted by the Logging package. The signature or log is:
Therefore, Sentry should not have internal errors regardless of the type of the error. At the very least, it needs to support String for this use case. I guess this can be worked around by constructing an Exception from the String, but this must be done inside Sentry.
Actual Result
Sentry logs an internal error:
It seems like the error is captured regardless. Maybe it will be missing from the transation that was in progress.
Are you willing to submit a PR?
None
The text was updated successfully, but these errors were encountered: