aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-03-26 19:29:46 +0000
committerGravatar Chris Lovering <[email protected]>2024-03-26 19:29:46 +0000
commit288cc09cc143c7d0791178d3fd333433a95fa416 (patch)
tree2dd7179db7d9ef932cf6a5115a88d4881c2897ca
parentRemove sentry sample rates and add asyncio integration (#2979) (diff)
Move sentry initialisation to after the event loop is created
This is required for the sentry asyncio integration
-rw-r--r--bot/__main__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/__main__.py b/bot/__main__.py
index ddb6ed608..42b3c0c95 100644
--- a/bot/__main__.py
+++ b/bot/__main__.py
@@ -13,7 +13,6 @@ from bot import constants
from bot.bot import Bot
from bot.log import get_logger, setup_sentry
-setup_sentry()
LOCALHOST = "127.0.0.1"
@@ -36,6 +35,8 @@ async def _create_redis_session() -> RedisSession:
async def main() -> None:
"""Entry async method for starting the bot."""
+ setup_sentry()
+
statsd_url = constants.Stats.statsd_host
if constants.DEBUG_MODE:
# Since statsd is UDP, there are no errors for sending to a down port.