File tree 4 files changed +8
-8
lines changed
enable-manual-instrumentation
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ import 'package:sentry/sentry.dart';
8
8
final transaction = Sentry.startTransaction('processOrderBatch()', 'task');
9
9
10
10
try {
11
- processOrderBatch(transaction);
11
+ await processOrderBatch(transaction);
12
12
} catch (exception) {
13
13
transaction.throwable = exception;
14
14
transaction.status = SpanStatus.internalError();
15
15
} finally {
16
- transaction.finish();
16
+ await transaction.finish();
17
17
}
18
18
19
- void processOrderBatch(ISentrySpan span) {
19
+ Future< void> processOrderBatch(ISentrySpan span) async {
20
20
// span operation: task, span description: operation
21
21
final innerSpan = span.startChild('task', description: 'operation');
22
22
@@ -26,7 +26,7 @@ void processOrderBatch(ISentrySpan span) {
26
26
innerSpan.throwable = exception;
27
27
innerSpan.status = SpanStatus.notFound();
28
28
} finally {
29
- innerSpan.finish();
29
+ await innerSpan.finish();
30
30
}
31
31
}
32
32
```
Original file line number Diff line number Diff line change 18
18
} catch (exception) {
19
19
Sentry.captureException(exception);
20
20
} finally {
21
- transaction.finish();
21
+ await transaction.finish();
22
22
}
23
23
```
24
24
35
35
transaction.throwable = exception;
36
36
rethrow;
37
37
} finally {
38
- transaction.finish();
38
+ await transaction.finish();
39
39
}
40
40
```
Original file line number Diff line number Diff line change 11
11
transaction.throwable = exception;
12
12
transaction.status = SpanStatus.internalError();
13
13
} finally {
14
- transaction.finish();
14
+ await transaction.finish();
15
15
}
16
16
```
Original file line number Diff line number Diff line change 14
14
span.throwable = exception;
15
15
span.status = SpanStatus.internalError();
16
16
} finally {
17
- span.finish();
17
+ await span.finish();
18
18
}
19
19
```
You can’t perform that action at this time.
0 commit comments