Description
This is a braindump of feedback I got from a friend who tried to use Spotlight with Django:
- It's not clear what Spotlight is or how it works (ref What does this do? #561)
- There's no clear or easy to find guide for Django (feat(website): Add Django docs #762)
- Clearly announce the guiding principle for Spotlight & OSS: it will not require Sentry Cloud ever and it will stay OSI Open Source
- Capturing the error page is nice, want the widget too now (like Django Debug Toolbar) (Make the entrypoint JS usable by other pages #552) (feat(spotlight): Inject Spotlight button on Django sentry-python#3751)
- Click-to-copy for filenames (Add click to copy for file names #548)
- Main use cases:
- Number of requests
- Cache usage check / which cache key matched etc - We just need to enable
cache_spans
in Django integration on SDK side for this (feat(spotlight): Auto enable cache_spans for Spotlight on DEBUG sentry-python#3791) Which view & template was used to render this page -- I think this is captured in trace view so will not action unless I hear otherwise)We already capture this information- DB queries (With Sentry SDK v8, not able to get the queries in Spotlight #422)
- Are there N+1 queries around (Sentry & Django Debug Toolbar does this already) (Detect and report N+1 issues #651)
- Improvements complaints:
- It's impossible to tell if Spotlight mode is active and working properly. Add something to log output (either tie this to
DEBUG
setting orSENTRY_DEBUG
in the SDK) (feat(spotlight): Add info logs when Sentry is enabled sentry-python#3735) - GET/POST/FILES/COOKIES information is not displayed (this is already mostly captured by the SDK) - (feat: Add request and module details to context #544 mostly)
- User info is missing (the logged in user in Django)
- Cookies and User info is stripped by default with
[send_default_pii](https://docs.sentry.io/platforms/python/configuration/options/#send-default-pii)
. We can enable this when Spotlight is enabled but then we risk sending this upstream to Sentry if there's a DSN set too. For now, we can limit this toDEBUG
mode or lack ofDSN
for automatic turn-on behavior but looks like we need larger architectural changes for this such as post-scrubbing instead of limiting at the time of collection. (feat: Send PII to Spotlight when no DSN is set sentry-python#3804)
- Cookies and User info is stripped by default with
- Error to trace connection is not clear or easy to follow (Error to trace connection is not clear or easy to follow #551)
Transactions under-- We capture these/admin
doesn't seem to be captured (intentional by the SDK?)- We don't seem to be utilizing profiling info in the UI which may help with the view, template, cache key etc related use cases above (Add support for Profiles #565)
- Turn up trace sampling to 100% when Spotlight is enabled and no DSN is set (feat: Sample everything 100% w/ Spotlight & no DSN set sentry-python#4207)
- It's impossible to tell if Spotlight mode is active and working properly. Add something to log output (either tie this to
Will be filing individual issues from these as I go.