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: Add SENTRY_SPOTLIGHT env variable support #3443

Merged
merged 10 commits into from
Aug 14, 2024
Merged
10 changes: 10 additions & 0 deletions sentry_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,16 @@ def _capture_envelope(envelope):
)

self.spotlight = None
spotlight_config = self.options.get("spotlight")
if spotlight_config == None:
sentrivana marked this conversation as resolved.
Show resolved Hide resolved
spotlight_config = os.environ["SENTRY_SPOTLIGHT"].lower() if "SENTRY_SPOTLIGHT" in os.environ else None
if spotlight_config in ('1', 'true', 'yes'):
self.options["spotlight"] = True
elif spotlight_config in ('0', 'false', 'no', ''):
self.options["spotlight"] = False
else:
self.options["spotlight"] = spotlight_config

if self.options.get("spotlight"):
self.spotlight = setup_spotlight(self.options)

Expand Down
Loading