TF-4136 Move Sentry duplication guard, but keep interceptor ordering last (not first)
This commit is contained in:
@@ -56,7 +56,7 @@ class ApplicationManager {
|
||||
log('ApplicationManager:getAppVersion -> cached: $version');
|
||||
return version;
|
||||
} catch (e) {
|
||||
logWarning('ApplicationManager:getAppVersion failedd, Exception = $e');
|
||||
logWarning('ApplicationManager:getAppVersion failed, Exception = $e');
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,10 @@ class SentryInitializer {
|
||||
'set-cookie',
|
||||
'x-auth',
|
||||
'x-token',
|
||||
'api-key',
|
||||
'apikey',
|
||||
'secret',
|
||||
'bearer',
|
||||
];
|
||||
|
||||
static Future<bool> init(FutureOr<void> Function() appRunner) async {
|
||||
@@ -63,6 +67,8 @@ class SentryInitializer {
|
||||
data: null,
|
||||
);
|
||||
|
||||
// Note: The copyWith method is deprecated,
|
||||
// so values must be assigned directly to the instance.
|
||||
return SentryEvent(
|
||||
eventId: event.eventId,
|
||||
contexts: event.contexts,
|
||||
|
||||
@@ -20,6 +20,10 @@ class SentryManager {
|
||||
required FutureOr<void> Function() fallBackRunner,
|
||||
}) async {
|
||||
try {
|
||||
if (_isSentryAvailable) {
|
||||
log('[SentryManager] Already initialized, skipping');
|
||||
return;
|
||||
}
|
||||
_isSentryAvailable = await SentryInitializer.init(appRunner);
|
||||
log('[SentryManager] Sentry initialized: $_isSentryAvailable');
|
||||
} catch (e, st) {
|
||||
|
||||
Reference in New Issue
Block a user