Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/sentry/api/bases/organization_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 0 additions & 2 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:ourlogs-tags-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable service hooks outbox
manager.add("organizations:service-hooks-outbox", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable UI for log high fidelity queries
manager.add("organizations:ourlogs-high-fidelity", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable alerting on trace metrics
manager.add("organizations:tracemetrics-alerts", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable trace metrics in dashboards UI
Expand Down
14 changes: 3 additions & 11 deletions tests/snuba/api/endpoints/test_organization_events_ourlogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"]] == [
Expand All @@ -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
Expand Down Expand Up @@ -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"]
Expand All @@ -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
Expand Down Expand Up @@ -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"] == []
Expand All @@ -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
Expand Down
Loading