From 0f7123ee1432b37308a181c293ed07f2a8c9bc44 Mon Sep 17 00:00:00 2001 From: Josh Callender <1569818+saponifi3d@users.noreply.github.com> Date: Mon, 4 May 2026 15:59:44 -0700 Subject: [PATCH 1/2] Update the UI for the filter querying to show 'monitor' insetad of 'detector' --- static/app/utils/fields/index.ts | 18 +++++++++--------- static/app/views/issueList/utils.tsx | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/static/app/utils/fields/index.ts b/static/app/utils/fields/index.ts index 43cc4f05b77d6c..9a42ba671fbc2a 100644 --- a/static/app/utils/fields/index.ts +++ b/static/app/utils/fields/index.ts @@ -31,7 +31,6 @@ export enum FieldKey { BOOKMARKS = 'bookmarks', BROWSER_NAME = 'browser.name', CULPRIT = 'culprit', - DETECTOR = 'detector', DEVICE = 'device', DEVICE_ARCH = 'device.arch', DEVICE_BATTERY_LEVEL = 'device.battery_level', @@ -87,6 +86,7 @@ export enum FieldKey { LEVEL = 'level', LOCATION = 'location', MESSAGE = 'message', + MONITOR = 'monitor', OS = 'os', OS_BUILD = 'os.build', OS_KERNEL_VERSION = 'os.kernel_version', @@ -178,7 +178,6 @@ type ErrorFieldKey = | FieldKey.ASSIGNED_OR_SUGGESTED | FieldKey.BOOKMARKS | FieldKey.CULPRIT - | FieldKey.DETECTOR | FieldKey.ERROR_HANDLED | FieldKey.ERROR_MECHANISM | FieldKey.ERROR_TYPE @@ -199,6 +198,7 @@ type ErrorFieldKey = | FieldKey.LAST_SEEN | FieldKey.LEVEL | FieldKey.LOCATION + | FieldKey.MONITOR | FieldKey.STACK_ABS_PATH | FieldKey.STACK_COLNO | FieldKey.STACK_FILENAME @@ -1959,12 +1959,6 @@ const ERROR_FIELD_DEFINITION: Record = { kind: FieldKind.FIELD, valueType: FieldValueType.STRING, }, - [FieldKey.DETECTOR]: { - desc: t('The detector that triggered the issue'), - kind: FieldKind.FIELD, - valueType: FieldValueType.STRING, - allowWildcard: false, - }, [FieldKey.ERROR_HANDLED]: { desc: t('Determines handling status of the error'), kind: FieldKind.FIELD, @@ -2074,6 +2068,12 @@ const ERROR_FIELD_DEFINITION: Record = { kind: FieldKind.FIELD, valueType: FieldValueType.STRING, }, + [FieldKey.MONITOR]: { + desc: t('The monitor that triggered the issue'), + kind: FieldKind.FIELD, + valueType: FieldValueType.STRING, + allowWildcard: false, + }, [FieldKey.STACK_ABS_PATH]: { desc: t('Absolute path to the source file'), kind: FieldKind.FIELD, @@ -2747,7 +2747,6 @@ export const ISSUE_PROPERTY_FIELDS: FieldKey[] = [ FieldKey.ASSIGNED_OR_SUGGESTED, FieldKey.ASSIGNED, FieldKey.BOOKMARKS, - FieldKey.DETECTOR, FieldKey.FIRST_RELEASE, FieldKey.FIRST_SEEN, FieldKey.HAS, @@ -2759,6 +2758,7 @@ export const ISSUE_PROPERTY_FIELDS: FieldKey[] = [ FieldKey.ISSUE_TYPE, FieldKey.ISSUE, FieldKey.LAST_SEEN, + FieldKey.MONITOR, FieldKey.RELEASE_STAGE, FieldKey.TIMES_SEEN, ]; diff --git a/static/app/views/issueList/utils.tsx b/static/app/views/issueList/utils.tsx index 766e0b54219c10..8eef70fd17aa48 100644 --- a/static/app/views/issueList/utils.tsx +++ b/static/app/views/issueList/utils.tsx @@ -70,7 +70,7 @@ export const DISCOVER_EXCLUSION_FIELDS: string[] = [ 'issue.type', 'issue.seer_actionability', 'issue.seer_last_run', - 'detector', + 'monitor', ]; export const FOR_REVIEW_QUERIES: string[] = [Query.FOR_REVIEW]; From d7470e3fd8a6cb09ff5c637b64230acee4d9c975 Mon Sep 17 00:00:00 2001 From: Josh Callender <1569818+saponifi3d@users.noreply.github.com> Date: Mon, 4 May 2026 16:09:35 -0700 Subject: [PATCH 2/2] Remove the 'detector' keywords from the backend, now that the UI has been safely rolled out --- src/sentry/api/serializers/models/group.py | 1 - src/sentry/issues/issue_search.py | 1 - src/sentry/search/snuba/backend.py | 3 -- .../seer/assisted_query/issues_tools.py | 1 - .../test_organization_group_index.py | 41 ------------------- 5 files changed, 47 deletions(-) diff --git a/src/sentry/api/serializers/models/group.py b/src/sentry/api/serializers/models/group.py index fe52d39fc64e9d..142bad728198ba 100644 --- a/src/sentry/api/serializers/models/group.py +++ b/src/sentry/api/serializers/models/group.py @@ -911,7 +911,6 @@ def serialize( # type: ignore[override] # return value is a subset ( "status", "substatus", - "detector", # TODO - delete this once the UI has been updated "monitor", "bookmarked_by", "assigned_to", diff --git a/src/sentry/issues/issue_search.py b/src/sentry/issues/issue_search.py index 6ec2a37c1d9376..a4cc88046c0f7e 100644 --- a/src/sentry/issues/issue_search.py +++ b/src/sentry/issues/issue_search.py @@ -286,7 +286,6 @@ def convert_detector_value( "device.class": convert_device_class_value, "substatus": convert_substatus_value, "issue.seer_actionability": convert_seer_actionability_value, - "detector": convert_detector_value, # TODO - delete this once the UI has been updated "monitor": convert_detector_value, } diff --git a/src/sentry/search/snuba/backend.py b/src/sentry/search/snuba/backend.py index d2edc0a71ea416..d6e656fe140a1c 100644 --- a/src/sentry/search/snuba/backend.py +++ b/src/sentry/search/snuba/backend.py @@ -587,9 +587,6 @@ def _get_queryset_conditions( "regressed_in_release": QCallbackCondition( functools.partial(regressed_in_release_filter, projects=projects) ), - "detector": QCallbackCondition( - _make_detector_filter - ), # TODO - delete this once the UI has been updated "monitor": QCallbackCondition(_make_detector_filter), "issue.category": QCallbackCondition(lambda categories: Q(type__in=categories)), "issue.type": QCallbackCondition(lambda types: Q(type__in=types)), diff --git a/src/sentry/seer/assisted_query/issues_tools.py b/src/sentry/seer/assisted_query/issues_tools.py index 03140c9da92594..558201e62135cc 100644 --- a/src/sentry/seer/assisted_query/issues_tools.py +++ b/src/sentry/seer/assisted_query/issues_tools.py @@ -73,7 +73,6 @@ "issue": "issue_short_id", "device.class": "device_class", "timesSeen": "integer", - "detector": "dynamic_id", # TODO - delete this once the UI has been updated "monitor": "dynamic_id", } diff --git a/tests/sentry/issues/endpoints/test_organization_group_index.py b/tests/sentry/issues/endpoints/test_organization_group_index.py index 510258d15b657e..0a0af70fab9ff3 100644 --- a/tests/sentry/issues/endpoints/test_organization_group_index.py +++ b/tests/sentry/issues/endpoints/test_organization_group_index.py @@ -2517,47 +2517,6 @@ def test_query_status_and_substatus_nonoverlapping(self) -> None: == [] ) - # TODO - Delete this test once the UI has been updated - def test_query_detector_filter(self) -> None: - event = self.store_event( - data={"timestamp": before_now(seconds=500).isoformat(), "fingerprint": ["group-1"]}, - project_id=self.project.id, - ) - group = event.group - - event2 = self.store_event( - data={"timestamp": before_now(seconds=400).isoformat(), "fingerprint": ["group-2"]}, - project_id=self.project.id, - ) - assert event2.group.id != group.id - - detector_id = 12345 # intentionally multi-digit - detector = self.create_detector( - id=detector_id, - name=f"Test Detector {detector_id}", - project=self.project, - type="error", - ) - - self.create_detector_group( - detector=detector, - group=group, - ) - - self.login_as(user=self.user) - - # Query for the specific detector ID - response = self.get_response(sort_by="date", query=f"detector:{detector_id}") - assert response.status_code == 200 - - # Should return only the group associated with the detector - assert len(response.data) == 1 - assert int(response.data[0]["id"]) == group.id - - response_empty = self.get_response(sort_by="date", query="detector:99999") - assert response_empty.status_code == 200 - assert len(response_empty.data) == 0 - def test_query_monitor_filter(self) -> None: event = self.store_event( data={"timestamp": before_now(seconds=500).isoformat(), "fingerprint": ["group-1"]},