Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable Spotlight in dev mode by default #6982

Merged
merged 3 commits into from
Mar 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions snuba/environment.py
Original file line number Diff line number Diff line change
@@ -75,8 +75,19 @@ def setup_logging(level: Optional[str] = None) -> None:


def setup_sentry() -> None:
spotlight: bool | str = False
if settings.DEBUG:
spotlight_env = os.getenv("SENTRY_SPOTLIGHT", "")
if spotlight_env.lower() in ("0", "false", "n", "no"):
spotlight = False
elif not spotlight_env.startswith("http"):
spotlight = spotlight_env
else:
spotlight = True

sentry_sdk.init(
dsn=settings.SENTRY_DSN,
spotlight=spotlight,
integrations=[
FlaskIntegration(),
GnuBacktraceIntegration(),