File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 10
10
import re
11
11
12
12
import pytz
13
+ import sentry_sdk
13
14
14
15
from client_wrapper import ClientWrapper
15
16
from constants import (
@@ -1607,11 +1608,22 @@ def has_command(command_words, input_words):
1607
1608
input_words = [word .lower () for word in input_words ]
1608
1609
return command_words == input_words [: len (command_words )]
1609
1610
1611
+ def init_sentry ():
1612
+ """Initialize the Sentry SDK"""
1613
+ sentry_dsn = os .environ .get ("SENTRY_SDK" , "" )
1614
+
1615
+ if sentry_dsn :
1616
+ sentry_sdk .init (
1617
+ dsn = sentry_dsn ,
1618
+ send_default_pii = False ,
1619
+ )
1610
1620
1611
1621
async def async_main ():
1612
1622
"""async function for bot"""
1613
1623
envs = get_envs ()
1614
1624
1625
+ init_sentry ()
1626
+
1615
1627
channels_info = await get_channels_info (envs ["SLACK_ACCESS_TOKEN" ])
1616
1628
doof_id = await get_doofs_id (envs ["SLACK_ACCESS_TOKEN" ])
1617
1629
repos_info = load_repos_info (channels_info )
Original file line number Diff line number Diff line change 1
1
python-dateutil
2
2
pytz
3
3
requests
4
+ sentry-sdk
4
5
tornado
5
6
virtualenv
You can’t perform that action at this time.
0 commit comments