44
55import 'package:stack_trace/stack_trace.dart' ;
66
7- /// Used to filter or modify stack frames before sending the stack trace.
8- ///
9- /// The input stack frames are in the Sentry.io JSON format. The output
10- /// stack frames must follow the same format.
11- ///
12- /// Detailed documentation about the stack trace format is on Sentry.io's
13- /// web-site: https://docs.sentry.io/development/sdk-dev/overview/.
14- typedef StackFrameFilter = List <Map <String , dynamic >> Function (
15- List <Map <String , dynamic >>);
16-
177/// Sentry.io JSON encoding of a stack frame for the asynchronous suspension,
188/// which is the gap between asynchronous calls.
199const Map <String , dynamic > asynchronousGapFrameJson = < String , dynamic > {
@@ -25,7 +15,6 @@ const Map<String, dynamic> asynchronousGapFrameJson = <String, dynamic>{
2515/// [stackTrace] must be [String] or [StackTrace] .
2616List <Map <String , dynamic >> encodeStackTrace (
2717 dynamic stackTrace, {
28- StackFrameFilter stackFrameFilter,
2918 String origin,
3019}) {
3120 assert (stackTrace is String || stackTrace is StackTrace );
@@ -47,8 +36,7 @@ List<Map<String, dynamic>> encodeStackTrace(
4736 }
4837 }
4938
50- final jsonFrames = frames.reversed.toList ();
51- return stackFrameFilter != null ? stackFrameFilter (jsonFrames) : jsonFrames;
39+ return frames.reversed.toList ();
5240}
5341
5442Map <String , dynamic > encodeStackTraceFrame (Frame frame, {String origin}) {
0 commit comments