Skip to content

Commit e8f5147

Browse files
authored
chore(perf-issues): Remove some detector flags (getsentry#90488)
The Consecutive HTTP and Large Payload Detectors checked flags for their rollout that were never GA'd even though they were marked `released=True` implying users could see them. This removes the check on those flags, **but doesn't GA them** just yet. They will still exit in `is_creation_allowed_for_system` ([source](https://github.com/getsentry/sentry/blob/master/src/sentry/utils/performance_issues/base.py#L98-L112)) since the registered flag is set to 0.0 (see this PR - getsentry#90486)
1 parent d0194d8 commit e8f5147

File tree

4 files changed

+34
-151
lines changed

4 files changed

+34
-151
lines changed

src/sentry/apidocs/examples/project_examples.py

+4-113
Original file line numberDiff line numberDiff line change
@@ -187,120 +187,11 @@
187187
"require2FA": False,
188188
"avatar": {"avatarType": "upload", "avatarUuid": "24f6f762f7a7473888b259c566da5adb"},
189189
"features": [
190-
"performance-uncompressed-assets-ingest",
191-
"dashboards-rh-widget",
192-
"performance-db-main-thread-visible",
193-
"transaction-name-mark-scrubbed-as-sanitized",
194-
"sentry-pride-logo-footer",
195-
"issue-list-prefetch-issue-on-hover",
196-
"mep-rollout-flag",
197-
"performance-issues-m-n-plus-one-db-detector",
198-
"session-replay-ui",
199-
"alert-crash-free-metrics",
200-
"performance-n-plus-one-db-queries-visible",
201-
"session-replay-recording-scrubbing",
202-
"profile-file-io-main-thread-visible",
203-
"performance-consecutive-http-detector",
204-
"profiling",
205-
"symbol-sources",
206-
"advanced-search",
207-
"performance-n-plus-one-db-queries-post-process-group",
208-
"minute-resolution-sessions",
209-
"performance-transaction-name-only-search-indexed",
210-
"performance-large-http-payload-detector",
211-
"performance-consecutive-db-queries-ingest",
212-
"business-to-team-promotion",
213-
"shared-issues",
214-
"performance-large-http-payload-post-process-group",
215-
"promotion-be-adoption-enabled",
190+
"global-views",
191+
"discover-basic",
192+
"incidents",
193+
"uptime",
216194
"monitors",
217-
"am2-billing",
218-
"profiling-ga",
219-
"performance-new-trends",
220-
"performance-n-plus-one-api-calls-post-process-group",
221-
"performance-db-main-thread-post-process-group",
222-
"performance-metrics-backed-transaction-summary",
223-
"issue-platform",
224-
"performance-consecutive-db-issue",
225-
"performance-consecutive-http-post-process-group",
226-
"performance-n-plus-one-api-calls-detector",
227-
"performance-render-blocking-asset-span-post-process-group",
228-
"performance-uncompressed-assets-post-process-group",
229-
"performance-slow-db-issue",
230-
"performance-db-main-thread-ingest",
231-
"session-replay",
232-
"sql-format",
233-
"performance-consecutive-db-queries-visible",
234-
"user-spend-notifications-settings",
235-
"performance-m-n-plus-one-db-queries-post-process-group",
236-
"transaction-metrics-extraction",
237-
"performance-consecutive-db-queries-post-process-group",
238-
"performance-slow-db-query-post-process-group",
239-
"performance-n-plus-one-db-queries-ingest",
240-
"profile-image-decode-main-thread-visible",
241-
"performance-issues-render-blocking-assets-detector",
242-
"performance-m-n-plus-one-db-queries-ingest",
243-
"anr-rate",
244-
"auto-enable-codecov",
245-
"ondemand-budgets",
246-
"profile-file-io-main-thread-post-process-group",
247-
"performance-render-blocking-asset-span-ingest",
248-
"profile-json-decode-main-thread-post-process-group",
249-
"onboarding-project-deletion-on-back-click",
250-
"invite-members-rate-limits",
251-
"transaction-name-normalize",
252-
"performance-file-io-main-thread-visible",
253-
"performance-span-histogram-view",
254-
"performance-file-io-main-thread-ingest",
255-
"metrics-extraction",
256-
"profile-json-decode-main-thread-ingest",
257-
"onboarding",
258-
"promotion-mobperf-gift50kerr",
259-
"device-classification",
260-
"transaction-name-normalize-legacy",
261-
"performance-slow-db-query-ingest",
262-
"bundle-plan-checkout",
263-
"metric-alert-chartcuterie",
264-
"performance-issues-all-events-tab",
265-
"discover-events-rate-limit",
266-
"india-promotion",
267-
"track-button-click-events",
268-
"performance-issues-compressed-assets-detector",
269-
"device-class-synthesis",
270-
"profiling-billing",
271-
"integrations-deployment",
272-
"performance-m-n-plus-one-db-queries-visible",
273-
"mobile-cpu-memory-in-transactions",
274-
"derive-code-mappings",
275-
"performance-onboarding-checklist",
276-
"performance-consecutive-http-visible",
277-
"performance-n-plus-one-api-calls-ingest",
278-
"performance-landing-page-stats-period",
279-
"dynamic-sampling",
280-
"performance-slow-db-query-visible",
281-
"performance-n-plus-one-api-calls-visible",
282-
"profile-image-decode-main-thread-ingest",
283-
"set-grouping-config",
284-
"event-attachments",
285-
"open-membership",
286-
"new-spike-protection",
287-
"source-maps-debug-ids",
288-
"paid-to-free-promotion",
289-
"performance-large-http-payload-ingest",
290-
"crons-issue-platform",
291-
"profile-file-io-main-thread-ingest",
292-
"performance-file-io-main-thread-post-process-group",
293-
"performance-render-blocking-asset-span-visible",
294-
"ds-sliding-window-org",
295-
"performance-consecutive-http-ingest",
296-
"profile-image-decode-main-thread-post-process-group",
297-
"performance-mep-bannerless-ui",
298-
"performance-uncompressed-assets-visible",
299-
"performance-large-http-payload-visible",
300-
"performance-view",
301-
"promotion-mobperf-discount20",
302-
"performance-new-widget-designs",
303-
"profile-json-decode-main-thread-visible",
304195
],
305196
"links": {
306197
"organizationUrl": "https://sentry.sentry.io",

src/sentry/utils/performance_issues/detectors/consecutive_http_detector.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from typing import Any
44

5-
from sentry import features
65
from sentry.issues.grouptype import PerformanceConsecutiveHTTPQueriesGroupType
76
from sentry.issues.issue_occurrence import IssueEvidence
87
from sentry.models.organization import Organization
@@ -176,9 +175,7 @@ def on_complete(self) -> None:
176175
self._validate_and_store_performance_problem()
177176

178177
def is_creation_allowed_for_organization(self, organization: Organization) -> bool:
179-
return features.has(
180-
"organizations:performance-consecutive-http-detector", organization, actor=None
181-
)
178+
return True
182179

183180
def is_creation_allowed_for_project(self, project: Project) -> bool:
184181
return self.settings["detection_enabled"]

src/sentry/utils/performance_issues/detectors/large_payload_detector.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from datetime import timedelta
55
from typing import Any
66

7-
from sentry import features
87
from sentry.issues.grouptype import PerformanceLargeHTTPPayloadGroupType
98
from sentry.issues.issue_occurrence import IssueEvidence
109
from sentry.models.organization import Organization
@@ -130,9 +129,7 @@ def _fingerprint(self, span: Span) -> str:
130129
return f"1-{PerformanceLargeHTTPPayloadGroupType.type_id}-{hashed_url_paths}"
131130

132131
def is_creation_allowed_for_organization(self, organization: Organization) -> bool:
133-
return features.has(
134-
"organizations:performance-large-http-payload-detector", organization, actor=None
135-
)
132+
return True
136133

137134
def is_creation_allowed_for_project(self, project: Project) -> bool:
138135
return self.settings["detection_enabled"]

tests/sentry/utils/performance_issues/test_performance_detection.py

+28-30
Original file line numberDiff line numberDiff line change
@@ -301,49 +301,47 @@ def test_boolean_system_option_disables_detector_issue_creation(self):
301301
event = get_event("consecutive-http/consecutive-http-basic")
302302
sdk_span_mock = Mock()
303303

304-
with self.feature("organizations:performance-consecutive-http-detector"):
305-
perf_problems = _detect_performance_problems(event, sdk_span_mock, self.project)
306-
assert perf_problems == []
304+
perf_problems = _detect_performance_problems(event, sdk_span_mock, self.project)
305+
assert perf_problems == []
307306

308307
@override_options({"performance.issues.consecutive_http.problem-creation": False})
309308
def test_boolean_system_option_enables_detector_issue_creation(self):
310309
event = get_event("consecutive-http/consecutive-http-basic")
311310
sdk_span_mock = Mock()
312311

313-
with self.feature("organizations:performance-consecutive-http-detector"):
314-
perf_problems = _detect_performance_problems(event, sdk_span_mock, self.project)
315-
assert perf_problems == [
316-
PerformanceProblem(
317-
fingerprint="1-1009-6654ad4d1d494222ce02c656386e6955575c17ed",
318-
op="http",
319-
desc="GET https://my-api.io/api/users?page=1",
320-
type=PerformanceConsecutiveHTTPQueriesGroupType,
321-
parent_span_ids=None,
322-
cause_span_ids=[],
323-
offender_span_ids=[
312+
perf_problems = _detect_performance_problems(event, sdk_span_mock, self.project)
313+
assert perf_problems == [
314+
PerformanceProblem(
315+
fingerprint="1-1009-6654ad4d1d494222ce02c656386e6955575c17ed",
316+
op="http",
317+
desc="GET https://my-api.io/api/users?page=1",
318+
type=PerformanceConsecutiveHTTPQueriesGroupType,
319+
parent_span_ids=None,
320+
cause_span_ids=[],
321+
offender_span_ids=[
322+
"96e0ae187b5481a1",
323+
"8d22b49a27b18270",
324+
"b2bc2ebb42248c74",
325+
"9336922774fd35bc",
326+
"a307ceb77c702cea",
327+
"ac1e90ff646617e7",
328+
],
329+
evidence_data={
330+
"op": "http",
331+
"parent_span_ids": None,
332+
"cause_span_ids": [],
333+
"offender_span_ids": [
324334
"96e0ae187b5481a1",
325335
"8d22b49a27b18270",
326336
"b2bc2ebb42248c74",
327337
"9336922774fd35bc",
328338
"a307ceb77c702cea",
329339
"ac1e90ff646617e7",
330340
],
331-
evidence_data={
332-
"op": "http",
333-
"parent_span_ids": None,
334-
"cause_span_ids": [],
335-
"offender_span_ids": [
336-
"96e0ae187b5481a1",
337-
"8d22b49a27b18270",
338-
"b2bc2ebb42248c74",
339-
"9336922774fd35bc",
340-
"a307ceb77c702cea",
341-
"ac1e90ff646617e7",
342-
],
343-
},
344-
evidence_display=[],
345-
)
346-
]
341+
},
342+
evidence_display=[],
343+
)
344+
]
347345

348346
@override_options(BASE_DETECTOR_OPTIONS)
349347
def test_system_option_used_when_project_option_is_default(self):

0 commit comments

Comments
 (0)