Skip to content

ref(perf-detectors): Pass detector-specific settings to PerformanceDetector constructors#107387

Merged
kcons merged 2 commits intomasterfrom
kcons/simplercfg
Feb 2, 2026
Merged

ref(perf-detectors): Pass detector-specific settings to PerformanceDetector constructors#107387
kcons merged 2 commits intomasterfrom
kcons/simplercfg

Conversation

@kcons
Copy link
Copy Markdown
Member

@kcons kcons commented Jan 31, 2026

Previously, each PerformanceDetector received the full settings dict for all detector types and extracted its own config in __init__. This meant every detector had visibility into other detectors' configuration, even though none actually used it.

Now the caller extracts the specific detector's settings before instantiation, so each detector only receives its own config dict, and we can be confident configs are independent.

@kcons kcons requested a review from a team January 31, 2026 01:13
@kcons kcons requested a review from a team as a code owner January 31, 2026 01:13
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 31, 2026
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.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread tests/sentry/issue_detection/test_n_plus_one_api_calls_detector.py
Copy link
Copy Markdown
Contributor

@thetruecpaul thetruecpaul left a comment

Choose a reason for hiding this comment

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

LGTM! Was this a problem that we'd seen in the wild? Or just preemptive improvement?

@kcons
Copy link
Copy Markdown
Member Author

kcons commented Feb 2, 2026

LGTM! Was this a problem that we'd seen in the wild? Or just preemptive improvement?

Not part of a real problem, just a bit of simplification of data model as we start working toward basing Performance Detectors on Workflow Engine Detectors.

@kcons kcons merged commit f07182e into master Feb 2, 2026
72 checks passed
@kcons kcons deleted the kcons/simplercfg branch February 2, 2026 17:40
roggenkemper added a commit that referenced this pull request Feb 11, 2026
…` commands

The `PerformanceDetector` constructor was refactored in #107387 to accept
only the detector's own settings dict instead of the full settings dict.
The `sentry performance detect` and `sentry performance timeit` CLI
commands were not updated, causing them to pass the full settings dict
and break.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roggenkemper added a commit that referenced this pull request Feb 11, 2026
…` commands (#108074)

changes in #107387 didn't touch
the CLI commands, this pr makes the necessary changes so the CLI
commands work
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants