File tree 3 files changed +22
-11
lines changed
3 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
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
+
5
10
### Features
6
11
7
12
- 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 {
25
25
if (this is SentryTransaction ) {
26
26
return false ;
27
27
}
28
- if (exceptions? .isNotEmpty == false ) {
29
- return false ;
30
- }
31
- final frames = exceptions? .first.stackTrace? .frames;
28
+ final frames = _getStacktraceFrames ();
32
29
if (frames == null ) {
33
30
return false ;
34
31
}
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 ;
36
47
}
37
48
}
38
49
Original file line number Diff line number Diff line change @@ -187,12 +187,7 @@ void main() {
187
187
SentryEvent _getEvent () {
188
188
final frame = SentryStackFrame (platform: 'native' );
189
189
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)]);
196
191
}
197
192
198
193
class Fixture {
You can’t perform that action at this time.
0 commit comments