TF-4268 Initialize Sentry from Linagora Ecosystem configuration

This commit is contained in:
dab246
2026-04-07 16:10:57 +07:00
committed by Dat H. Pham
parent c9ec1c2820
commit d2566dd9aa
14 changed files with 263 additions and 23 deletions
@@ -10,6 +10,7 @@ extension SetupScribePromptUrlExtension on MailboxDashBoardController {
void loadLinagoraEcosystem() {
if (cachedLinagoraEcosystem != null) {
_applyScribePromptUrl(cachedLinagoraEcosystem!.scribePromptUrl);
_setUpSentry(cachedLinagoraEcosystem!);
return;
}
@@ -30,6 +31,7 @@ extension SetupScribePromptUrlExtension on MailboxDashBoardController {
void handleGetLinagoraEcosystemSuccess(GetLinagoraEcosystemSuccess success) {
cachedLinagoraEcosystem = success.linagoraEcosystem;
_applyScribePromptUrl(cachedLinagoraEcosystem!.scribePromptUrl);
_setUpSentry(cachedLinagoraEcosystem!);
}
void handleGetLinagoraEcosystemFailure(GetLinagoraEcosystemFailure failure) {
@@ -47,4 +49,15 @@ extension SetupScribePromptUrlExtension on MailboxDashBoardController {
logWarning('SetupScribePromptUrlExtension::_applyScribePromptUrl: PromptService not found');
}
}
void _setUpSentry(LinagoraEcosystem ecosystem) {
final sentryConfigEcosystem = ecosystem.sentryConfigEcosystem;
if (sentryConfigEcosystem != null) {
setUpSentry(sentryConfigEcosystem);
} else {
logWarning(
'LinagoraEcosystemController:_setUpSentry: Sentry config ecosystem is null',
);
}
}
}