File tree Expand file tree Collapse file tree 3 files changed +22
-11
lines changed
Expand file tree Collapse file tree 3 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ ### Fixes
6+
7+ - Add debug_meta to all events ([ #1756 ] ( https://github.com/getsentry/sentry-dart/pull/1756 ) )
8+ - Fixes obfuscated stacktraces when ` captureMessage ` or ` captureEvent ` is called with ` attachStacktrace ` option
9+
510### Features
611
712- Add option to opt out of fatal level for automatically collected errors ([ #1738 ] ( https://github.com/getsentry/sentry-dart/pull/1738 ) )
Original file line number Diff line number Diff line change @@ -25,14 +25,25 @@ extension _NeedsSymbolication on SentryEvent {
2525 if (this is SentryTransaction ) {
2626 return false ;
2727 }
28- if (exceptions? .isNotEmpty == false ) {
29- return false ;
30- }
31- final frames = exceptions? .first.stackTrace? .frames;
28+ final frames = _getStacktraceFrames ();
3229 if (frames == null ) {
3330 return false ;
3431 }
35- return frames.any ((frame) => 'native' == frame.platform);
32+ return frames.any ((frame) => 'native' == frame? .platform);
33+ }
34+
35+ List <SentryStackFrame ?>? _getStacktraceFrames () {
36+ if (exceptions? .isNotEmpty == true ) {
37+ return exceptions? .first.stackTrace? .frames;
38+ }
39+ if (threads? .isNotEmpty == true ) {
40+ var stacktraces = threads? .map ((e) => e.stacktrace);
41+ return stacktraces
42+ ? .where ((element) => element != null )
43+ .expand ((element) => element! .frames)
44+ .toList ();
45+ }
46+ return null ;
3647 }
3748}
3849
Original file line number Diff line number Diff line change @@ -187,12 +187,7 @@ void main() {
187187SentryEvent _getEvent () {
188188 final frame = SentryStackFrame (platform: 'native' );
189189 final st = SentryStackTrace (frames: [frame]);
190- final ex = SentryException (
191- type: 'type' ,
192- value: 'value' ,
193- stackTrace: st,
194- );
195- return SentryEvent (exceptions: [ex]);
190+ return SentryEvent (threads: [SentryThread (stacktrace: st)]);
196191}
197192
198193class Fixture {
You can’t perform that action at this time.
0 commit comments