File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 88from aiohttp import web
99from gidgethub import aiohttp as gh_aiohttp
1010from gidgethub import routing , sansio
11+ import sentry_sdk
12+ from sentry_sdk .integrations .aiohttp import AioHttpIntegration
13+
1114
1215from . import backport_pr , check_run , delete_branch , status_change
1316
@@ -53,11 +56,11 @@ async def main(request):
5356 return web .Response (status = 500 )
5457
5558
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 )
6265
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