Skip to content

feat(spotlight): Add info logs when Sentry is enabled #3735

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

Merged
merged 1 commit into from
Nov 5, 2024
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
14 changes: 9 additions & 5 deletions sentry_sdk/spotlight.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import io
import logging
import os
import urllib.parse
import urllib.request
Expand Down Expand Up @@ -108,11 +109,10 @@ def setup_spotlight(options):

url = options.get("spotlight")

if isinstance(url, str):
pass
elif url is True:
if url is True:
url = DEFAULT_SPOTLIGHT_URL
else:

if not isinstance(url, str):
return None

if (
Expand All @@ -126,5 +126,9 @@ def setup_spotlight(options):
settings.MIDDLEWARE = type(middleware)(
chain(middleware, (DJANGO_SPOTLIGHT_MIDDLEWARE_PATH,))
)
logging.info("Enabled Spotlight integration for Django")

client = SpotlightClient(url)
logging.info("Enabled Spotlight at %s", url)

return SpotlightClient(url)
return client
Loading