Skip to content

Commit

Permalink
Merge branch 'master' into byk/fix/spotlight-url-django
Browse files Browse the repository at this point in the history
  • Loading branch information
BYK authored Dec 13, 2024
2 parents 29b3ede + 1239499 commit 1747e8c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sentry_sdk/spotlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ def setup_spotlight(options):
if not isinstance(url, str):
return None

if (
settings is not None
and settings.DEBUG
and env_to_bool(os.environ.get("SENTRY_SPOTLIGHT_ON_ERROR", "1"))
and env_to_bool(os.environ.get("SENTRY_SPOTLIGHT_MIDDLEWARE", "1"))
):
with capture_internal_exceptions():
with capture_internal_exceptions():
if (
settings is not None
and settings.DEBUG
and env_to_bool(os.environ.get("SENTRY_SPOTLIGHT_ON_ERROR", "1"))
and env_to_bool(os.environ.get("SENTRY_SPOTLIGHT_MIDDLEWARE", "1"))
):
middleware = settings.MIDDLEWARE
if DJANGO_SPOTLIGHT_MIDDLEWARE_PATH not in middleware:
settings.MIDDLEWARE = type(middleware)(
Expand Down

0 comments on commit 1747e8c

Please sign in to comment.