File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1515 from typing import Dict
1616 from typing import Optional
1717
18- from sentry_sdk .utils import logger , env_to_bool
18+ from sentry_sdk .utils import logger , env_to_bool , capture_internal_exceptions
1919from sentry_sdk .envelope import Envelope
2020
2121
@@ -120,13 +120,11 @@ def setup_spotlight(options):
120120 and settings .DEBUG
121121 and env_to_bool (os .environ .get ("SENTRY_SPOTLIGHT_ON_ERROR" , "1" ))
122122 ):
123- try :
123+ with capture_internal_exceptions () :
124124 middleware = settings .MIDDLEWARE
125125 if DJANGO_SPOTLIGHT_MIDDLEWARE_PATH not in middleware :
126126 settings .MIDDLEWARE = type (middleware )(
127127 chain (middleware , (DJANGO_SPOTLIGHT_MIDDLEWARE_PATH ,))
128128 )
129- except Exception as err :
130- logger .error ("Cannot inject Spotlight middleware" , exc_info = err )
131129
132130 return SpotlightClient (url )
You can’t perform that action at this time.
0 commit comments