-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Add a way to extract stacktraces from custom exception types #1335
Add a way to extract stacktraces from custom exception types #1335
Conversation
* add `ExceptionStackTraceExtractor` and use as fallback in `SentryExceptionFactory` * add `DioStackTraceExtractor` to the dio module which extracts `DioError.stackTrace`
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1335 +/- ##
==========================================
+ Coverage 90.29% 90.31% +0.02%
==========================================
Files 168 170 +2
Lines 5254 5266 +12
==========================================
+ Hits 4744 4756 +12
Misses 510 510
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Hmm no idea about the failing workflows. |
/// Extracts the inner stacktrace from [DioError] | ||
class DioStackTraceExtractor extends ExceptionStackTraceExtractor<DioError> { | ||
@override | ||
StackTrace? stackTrace(DioError error) { |
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.
StackTrace? stackTrace(DioError error) { | |
dynamic stackTrace(DioError error) { |
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.
This one is fine, for DioError
the type can be tightened.
The analyze one is due to dart-lang/pana#1020 |
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.
Thanks @kuhnroyal
Left a few comments but other than that LGTM
📜 Description
ExceptionStackTraceExtractor
and use as fallback inSentryExceptionFactory
DioStackTraceExtractor
to the dio module which extractsDioError.stackTrace
💡 Motivation and Context
See discussion in #1323
Fixes #1322
💚 How did you test it?
📝 Checklist
sendDefaultPii
is enabled🔮 Next steps
CC @ueman @marandaneto