Skip to content

Commit b3337e3

Browse files
committed
feat: Enable Spotlight in dev mode by default
This is a follow up to getsentry/sentry#87295. Can be disabled by setting `SENTRY_SPOTLIGHT=0` env variable
1 parent 9ba51e7 commit b3337e3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

snuba/environment.py

+10
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,18 @@ def setup_logging(level: Optional[str] = None) -> None:
7575

7676

7777
def setup_sentry() -> None:
78+
if settings.DEBUG:
79+
spotlight = os.getenv("SENTRY_SPOTLIGHT", "")
80+
if spotlight.lower() in ("0", "false", "n", "no"):
81+
spotlight = False
82+
elif not spotlight.startswith("http"):
83+
spotlight = True
84+
else:
85+
spotlight = False
86+
7887
sentry_sdk.init(
7988
dsn=settings.SENTRY_DSN,
89+
spotlight=spotlight,
8090
integrations=[
8191
FlaskIntegration(),
8292
GnuBacktraceIntegration(),

0 commit comments

Comments
 (0)