File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 8
8
from aiohttp import web
9
9
from gidgethub import aiohttp as gh_aiohttp
10
10
from gidgethub import routing , sansio
11
+ import sentry_sdk
12
+ from sentry_sdk .integrations .aiohttp import AioHttpIntegration
13
+
11
14
12
15
from . import backport_pr , check_run , delete_branch , status_change
13
16
@@ -53,11 +56,11 @@ async def main(request):
53
56
return web .Response (status = 500 )
54
57
55
58
56
- if __name__ == "__main__" : # pragma: no cover
57
- app = web .Application ()
58
- app .router .add_post ("/" , main )
59
- port = os .environ .get ("PORT" )
60
- if port is not None :
61
- port = int (port )
59
+ sentry_sdk . init ( dsn = os . environ . get ( "SENTRY_DSN" ), integrations = [ AioHttpIntegration ()])
60
+ app = web .Application ()
61
+ app .router .add_post ("/" , main )
62
+ port = os .environ .get ("PORT" )
63
+ if port is not None :
64
+ port = int (port )
62
65
63
- web .run_app (app , port = port )
66
+ web .run_app (app , port = port )
You can’t perform that action at this time.
0 commit comments