diff --git a/src/sentry/api/bases/organization_events.py b/src/sentry/api/bases/organization_events.py index 7746280ab6ca0f..f3f79669f9e686 100644 --- a/src/sentry/api/bases/organization_events.py +++ b/src/sentry/api/bases/organization_events.py @@ -163,12 +163,6 @@ def get_snuba_params( sampling_mode = cast(SAMPLING_MODES, sampling_mode.upper()) sentry_sdk.set_tag("sampling_mode", sampling_mode) - # kill switch: disable the highest accuracy flex time strategy to avoid hammering snuba - if sampling_mode == "HIGHEST_ACCURACY_FLEX_TIME" and not features.has( - "organizations:ourlogs-high-fidelity", organization, actor=request.user - ): - raise ParseError(f"sampling mode: {sampling_mode} is not supported") - if quantize_date_params: filter_params = self.quantize_date_params(request, filter_params) params = SnubaParams( diff --git a/tests/snuba/api/endpoints/test_organization_events_ourlogs.py b/tests/snuba/api/endpoints/test_organization_events_ourlogs.py index 79b043412b84f3..e660194d8b9882 100644 --- a/tests/snuba/api/endpoints/test_organization_events_ourlogs.py +++ b/tests/snuba/api/endpoints/test_organization_events_ourlogs.py @@ -562,7 +562,6 @@ def test_high_accuracy_flex_time_filter_trace(self): "dataset": self.dataset, "sampling": "HIGHEST_ACCURACY_FLEX_TIME", }, - features={"organizations:ourlogs-high-fidelity": True}, ) assert response.status_code == 200, response.content @@ -601,7 +600,6 @@ def test_high_accuracy_flex_time_order_by_timestamp(self): "dataset": self.dataset, "sampling": "HIGHEST_ACCURACY_FLEX_TIME", }, - features={"organizations:ourlogs-high-fidelity": True}, ) assert response.status_code == 200, response.content @@ -616,7 +614,6 @@ def test_high_accuracy_flex_time_empty_page_no_next(self): "dataset": self.dataset, "sampling": "HIGHEST_ACCURACY_FLEX_TIME", }, - features={"organizations:ourlogs-high-fidelity": True}, ) assert response.status_code == 200, response.content @@ -647,7 +644,6 @@ def test_high_accuracy_flex_time_partial_page_no_next(self): "sampling": "HIGHEST_ACCURACY_FLEX_TIME", "per_page": 10, }, - features={"organizations:ourlogs-high-fidelity": True}, ) assert response.status_code == 200, response.content @@ -680,7 +676,6 @@ def test_high_accuracy_flex_time_full_page_no_next(self): "sampling": "HIGHEST_ACCURACY_FLEX_TIME", "per_page": 5, }, - features={"organizations:ourlogs-high-fidelity": True}, ) assert response.status_code == 200, response.content @@ -715,7 +710,7 @@ def test_high_accuracy_flex_time_full_page_with_next(self): "per_page": 5, } - response = self.do_request(request, features={"organizations:ourlogs-high-fidelity": True}) + response = self.do_request(request) assert response.status_code == 200, response.content assert [row["message"] for row in response.data["data"]] == [ @@ -731,7 +726,6 @@ def test_high_accuracy_flex_time_full_page_with_next(self): response = self.do_request( {**request, "cursor": links["next"]["cursor"]}, - features={"organizations:ourlogs-high-fidelity": True}, ) assert response.status_code == 200, response.content @@ -801,7 +795,7 @@ def test_high_accuracy_flex_time_partial_page_with_next(self): "end": hour_4.isoformat(), } - response = self.do_request(request, features={"organizations:ourlogs-high-fidelity": True}) + response = self.do_request(request) assert response.status_code == 200, response.content assert [row["message"] for row in response.data["data"]] == ["log 1"] @@ -815,7 +809,6 @@ def test_high_accuracy_flex_time_partial_page_with_next(self): response = self.do_request( {**request, "cursor": links["next"]["cursor"]}, - features={"organizations:ourlogs-high-fidelity": True}, ) assert response.status_code == 200, response.content @@ -878,7 +871,7 @@ def test_high_accuracy_flex_time_empty_page_with_next(self): "end": hour_4.isoformat(), } - response = self.do_request(request, features={"organizations:ourlogs-high-fidelity": True}) + response = self.do_request(request) assert response.status_code == 200, response.content assert response.data["data"] == [] @@ -892,7 +885,6 @@ def test_high_accuracy_flex_time_empty_page_with_next(self): response = self.do_request( {**request, "cursor": links["next"]["cursor"]}, - features={"organizations:ourlogs-high-fidelity": True}, ) assert response.status_code == 200, response.content @@ -905,19 +897,6 @@ def test_high_accuracy_flex_time_empty_page_with_next(self): assert links["previous"]["results"] == "false" assert links["next"]["results"] == "true" - def test_high_accuracy_flex_time_without_feature_flag(self): - request = { - "field": ["timestamp", "message"], - "orderby": "-timestamp", - "project": self.project.id, - "dataset": self.dataset, - "sampling": "HIGHEST_ACCURACY_FLEX_TIME", - "per_page": 5, - } - - response = self.do_request(request) - assert response.status_code == 400 - def test_bytes_scanned(self): self.store_ourlogs([self.create_ourlog({"body": "log"}, timestamp=self.ten_mins_ago)])