TF-4268 Improve SentryConfig and SentryManager: sampling, frames tracking, non-blocking capture

This commit is contained in:
dab246
2026-04-07 16:09:55 +07:00
committed by Dat H. Pham
parent 2a666056c2
commit c9ec1c2820
4 changed files with 163 additions and 83 deletions
+6 -12
View File
@@ -1,5 +1,3 @@
import 'dart:async';
import 'package:core/utils/build_utils.dart';
import 'package:core/utils/platform_info.dart';
import 'package:core/utils/sentry/sentry_manager.dart';
@@ -82,17 +80,13 @@ void _internalLog(
if (shouldSentry) {
if (level == Level.trace) {
unawaited(
SentryManager.instance.captureMessage(rawMessage, extras: extras),
);
SentryManager.instance.captureMessage(rawMessage, extras: extras);
} else {
unawaited(
SentryManager.instance.captureException(
exception ?? rawMessage,
stackTrace: stackTrace,
message: rawMessage,
extras: extras,
),
SentryManager.instance.captureException(
exception ?? rawMessage,
stackTrace: stackTrace,
message: rawMessage,
extras: extras,
);
}
}