fix(sentry): only import/run Sentry if enabled

This commit is contained in:
2024-11-24 10:05:22 +00:00
parent cf2d542e16
commit 2d4a1294cb
4 changed files with 121 additions and 82 deletions

View File

@ -2,7 +2,6 @@
import sys
import sentry_sdk
from sentry_sdk.integrations.stdlib import StdlibIntegration
from webex_bot.webex_bot import WebexBot
@ -11,6 +10,8 @@ from app.commands.submit_task import SubmitTaskCommand
from app.utils.config import config
if config.sentry_enabled:
import sentry_sdk
apm = sentry_sdk.init(
dsn=config.sentry_dsn,
enable_tracing=True,