Skip to content

ref: delete unused options#116409

Merged
joshuarli merged 5 commits into
masterfrom
delete-unused-options
May 29, 2026
Merged

ref: delete unused options#116409
joshuarli merged 5 commits into
masterfrom
delete-unused-options

Conversation

@joshuarli
Copy link
Copy Markdown
Member

@joshuarli joshuarli commented May 28, 2026

this removes 93 unused options identified via tracking read options via logging in #115610 (which this PR also reverts as I'm done collecting data) cross referenced with static analysis in getsentry/sentry-options#123

the details are in getsentry/sentry-options#123 - scripts/migration/safe.txt is essentially the set intersection of statically unreferenced options and unseen/unread options over 120 hours of GCP production logs.

the unseen list was determined by subtracting options.seen unique events from all known options (options.all()) and I observed no newly seen options beyond the ~100 hour mark (scripts/migration/collect-seen-options-out.txt).

getsentry options that were unused are removed here too: https://github.com/getsentry/getsentry/pull/20449

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 28, 2026
@joshuarli joshuarli force-pushed the delete-unused-options branch from 37ac00c to b9c25db Compare May 28, 2026 20:00
@joshuarli joshuarli marked this pull request as ready for review May 28, 2026 20:39
@joshuarli joshuarli requested a review from a team as a code owner May 28, 2026 20:39
Comment thread src/sentry/options/defaults.py Outdated
Comment thread src/sentry/options/defaults.py
Copy link
Copy Markdown
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. There are a few clanker comments that are worth addressing for extra polish.

Copy link
Copy Markdown
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty scary, but I guess we'll see errors pop up in canary if any of these are mistaken

Copy link
Copy Markdown
Member

@shashjar shashjar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice, spring cleaning 🎉

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 602e39d. Configure here.

Comment thread src/sentry/options/defaults.py
@joshuarli joshuarli merged commit 8c0f8f8 into master May 29, 2026
84 checks passed
@joshuarli joshuarli deleted the delete-unused-options branch May 29, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants