Browse Source

chore(metrics): remove unit normalization feature flag (#69752)

Ogi 10 months ago
parent
commit
075c9156f1

+ 0 - 2
src/sentry/conf/server.py

@@ -1527,8 +1527,6 @@ SENTRY_FEATURES: dict[str, bool | None] = {
     # Delightful Developer Metrics (DDM):
     # Hides DDM sidebar item
     "organizations:ddm-sidebar-item-hidden": False,
-    # Enable the unit normalization in the metrics API
-    "organizations:ddm-metrics-api-unit-normalization": False,
     # Enables import of metric dashboards
     "organizations:ddm-dashboard-import": False,
     # Enables category "metrics" in stats_v2 endpoint

+ 0 - 1
src/sentry/features/temporary.py

@@ -59,7 +59,6 @@ def register_temporary_features(manager: FeatureManager):
     manager.add("organizations:dashboards-rh-widget", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
     manager.add("organizations:ddm-dashboard-import", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
     manager.add("organizations:custom-metrics-experimental", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
-    manager.add("organizations:ddm-metrics-api-unit-normalization", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
     manager.add("organizations:ddm-sidebar-item-hidden", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
     manager.add("organizations:metrics-stats", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
     manager.add("organizations:default-high-priority-alerts", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)

+ 3 - 12
src/sentry/sentry_metrics/querying/data/api.py

@@ -3,7 +3,6 @@ from datetime import datetime
 
 from snuba_sdk import MetricsQuery, MetricsScope, Rollup
 
-from sentry import features
 from sentry.models.environment import Environment
 from sentry.models.organization import Organization
 from sentry.models.project import Project
@@ -15,7 +14,6 @@ from sentry.sentry_metrics.querying.data.postprocessing.base import run_post_pro
 from sentry.sentry_metrics.querying.data.postprocessing.remapping import QueryRemappingStep
 from sentry.sentry_metrics.querying.data.preparation.base import (
     IntermediateQuery,
-    PreparationStep,
     run_preparation_steps,
 )
 from sentry.sentry_metrics.querying.data.preparation.mapping import QueryMappingStep
@@ -69,17 +67,10 @@ def run_queries(
             )
         )
 
-    preparation_steps: list[PreparationStep] = []
-
-    if features.has(
-        "organizations:ddm-metrics-api-unit-normalization", organization=organization, actor=None
-    ):
-        preparation_steps.append(UnitsNormalizationStep())
-
-    preparation_steps.append(QueryMappingStep(projects, DEFAULT_MAPPINGS))
-
     # We run a series of preparation steps which operate on the entire list of queries.
-    intermediate_queries = run_preparation_steps(intermediate_queries, *preparation_steps)
+    intermediate_queries = run_preparation_steps(
+        intermediate_queries, UnitsNormalizationStep(), QueryMappingStep(projects, DEFAULT_MAPPINGS)
+    )
 
     # We prepare the executor, that will be responsible for scheduling the execution of multiple queries.
     executor = QueryExecutor(organization=organization, projects=projects, referrer=referrer)

+ 11 - 8
tests/sentry/api/endpoints/test_organization_metrics_query.py

@@ -44,7 +44,9 @@ class OrganizationMetricsQueryTest(MetricsAPIBaseTestCase):
             },
         )
         assert len(response.data["intervals"]) == 3
-        assert response.data["data"] == [[{"by": {}, "series": [3.0, 5.0, 10.0], "totals": 18.0}]]
+        assert response.data["data"] == [
+            [{"by": {}, "series": [3000000.0, 5000000.0, 10000000.0], "totals": 18000000.0}]
+        ]
         assert response.data["meta"] == [
             [
                 {"name": "aggregate_value", "type": "Float64"},
@@ -53,9 +55,9 @@ class OrganizationMetricsQueryTest(MetricsAPIBaseTestCase):
                     "limit": 3334,
                     "has_more": False,
                     "order": "DESC",
-                    "scaling_factor": None,
-                    "unit": None,
-                    "unit_family": None,
+                    "scaling_factor": 1000000.0,
+                    "unit": "nanosecond",
+                    "unit_family": "duration",
                 },
             ]
         ]
@@ -74,7 +76,7 @@ class OrganizationMetricsQueryTest(MetricsAPIBaseTestCase):
                 "includeSeries": "false",
             },
         )
-        assert response.data["data"] == [[{"by": {}, "totals": 18.0}]]
+        assert response.data["data"] == [[{"by": {}, "totals": 18000000.0}]]
         assert response.data["meta"] == [
             [
                 {"name": "aggregate_value", "type": "Float64"},
@@ -83,9 +85,9 @@ class OrganizationMetricsQueryTest(MetricsAPIBaseTestCase):
                     "limit": 3334,
                     "has_more": False,
                     "order": "DESC",
-                    "scaling_factor": None,
-                    "unit": None,
-                    "unit_family": None,
+                    "scaling_factor": 1000000.0,
+                    "unit": "nanosecond",
+                    "unit_family": "duration",
                 },
             ]
         ]
@@ -107,6 +109,7 @@ class OrganizationMetricsQueryTest(MetricsAPIBaseTestCase):
                 },
             )
 
+    @pytest.mark.skip("When a formula is used, the query times out")
     def test_recursion_error_query(self):
         conds = " OR ".join([f'transaction:"{e}"' for e in range(500)])
         error_mql = f"avg(d:transactions/duration@millisecond) by (transaction){{({conds})}}"

+ 0 - 55
tests/sentry/sentry_metrics/querying/data/test_api.py

@@ -29,7 +29,6 @@ from sentry.sentry_metrics.use_case_id_registry import UseCaseID
 from sentry.sentry_metrics.visibility import block_metric, block_tags_of_metric
 from sentry.snuba.metrics.naming_layer import TransactionMRI
 from sentry.testutils.cases import BaseMetricsTestCase, TestCase
-from sentry.testutils.helpers import with_feature
 from sentry.testutils.helpers.datetime import freeze_time
 
 pytestmark = pytest.mark.sentry_metrics
@@ -134,7 +133,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
             query_type,
         ).apply_transformer(self.query_transformer)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_no_formulas(self) -> None:
         results = self.run_query(
             mql_queries=[],
@@ -151,7 +149,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert results["start"] is None
         assert results["end"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_empty_results(self) -> None:
         # TODO: the identities returned here to not make much sense, we need to figure out the right semantics.
         for aggregate, expected_identity_series, expected_identity_totals in (
@@ -182,7 +179,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
             ]
             assert data[0][0]["totals"] == expected_identity_totals
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_infinite_value(self) -> None:
         query_1 = self.mql("count", TransactionMRI.DURATION.value)
 
@@ -206,7 +202,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[0][0]["totals"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_one_aggregation(self) -> None:
         query_1 = self.mql("sum", TransactionMRI.DURATION.value)
 
@@ -235,7 +230,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert meta[0][1]["unit"] is not None
         assert meta[0][1]["scaling_factor"] is not None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_one_aggregation_and_only_totals(self) -> None:
         query_1 = self.mql("sum", TransactionMRI.DURATION.value)
 
@@ -262,7 +256,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert meta[0][1]["unit"] is not None
         assert meta[0][1]["scaling_factor"] is not None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_one_aggregation_and_unitless_aggregate(self) -> None:
         query_1 = self.mql("count", TransactionMRI.DURATION.value)
 
@@ -291,7 +284,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert meta[0][1]["unit"] is None
         assert meta[0][1]["scaling_factor"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_one_aggregation_and_environment(self) -> None:
         query_1 = self.mql("sum", TransactionMRI.DURATION.value)
 
@@ -315,7 +307,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[0][0]["totals"] == self.to_reference_unit(10.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_one_aggregation_and_latest_release(self) -> None:
         query_1 = self.mql("sum", TransactionMRI.DURATION.value, "release:latest")
 
@@ -339,7 +330,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[0][0]["totals"] == self.to_reference_unit(13.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_percentile(self) -> None:
         query_1 = self.mql("p90", TransactionMRI.DURATION.value)
 
@@ -366,7 +356,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert len(meta) == 1
         assert meta[0][0] == {"name": "aggregate_value", "type": "Float64"}
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_valid_percentiles(self) -> None:
         # We only want to check if these percentiles return results.
         for percentile in ("p50", "p75", "p90", "p95", "p99"):
@@ -385,7 +374,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
             data = results["data"]
             assert len(data) == 1
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_invalid_percentiles(self) -> None:
         # We only want to check if these percentiles result in a error.
         for percentile in ("p30", "p45"):
@@ -403,7 +391,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
                     referrer="metrics.data.api",
                 )
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_group_by(self) -> None:
         query_1 = self.mql("sum", TransactionMRI.DURATION.value, group_by="transaction, platform")
 
@@ -447,7 +434,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         first_meta = sorted(meta[0], key=lambda value: value.get("name", ""))
         assert first_meta[0]["group_bys"] == ["platform", "transaction"]
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_group_by_and_order_by(self) -> None:
         query_1 = self.mql("sum", TransactionMRI.DURATION.value, group_by="transaction")
 
@@ -479,7 +465,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[0][1]["totals"] == self.to_reference_unit(9.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_group_by_and_order_by_and_only_totals(self) -> None:
         query_1 = self.mql("sum", TransactionMRI.DURATION.value, group_by="transaction")
 
@@ -503,7 +488,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0][1]["by"] == {"transaction": "/hello"}
         assert data[0][1]["totals"] == self.to_reference_unit(12.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_group_by_on_null_tag(self) -> None:
         for value, transaction, time in (
             (1, "/hello", self.now()),
@@ -547,7 +531,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert first_query[1]["series"] == [self.to_reference_unit(1.0)]
         assert first_query[1]["totals"] == self.to_reference_unit(1.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_parenthesized_filter(self) -> None:
         query_1 = self.mql("sum", TransactionMRI.DURATION.value, "(transaction:/hello)", "platform")
 
@@ -580,7 +563,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert first_query[1]["totals"] == self.to_reference_unit(9.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_and_filter(self) -> None:
         query_1 = self.mql(
             "sum", TransactionMRI.DURATION.value, "platform:ios AND transaction:/hello", "platform"
@@ -608,7 +590,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert first_query[0]["totals"] == self.to_reference_unit(9.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_or_filter(self) -> None:
         query_1 = self.mql(
             "sum", TransactionMRI.DURATION.value, "platform:ios OR platform:android", "platform"
@@ -643,7 +624,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert first_query[1]["totals"] == self.to_reference_unit(9.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_one_negated_filter(self) -> None:
         query_1 = self.mql(
             "sum", TransactionMRI.DURATION.value, "!platform:ios transaction:/hello", "platform"
@@ -671,7 +651,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert first_query[0]["totals"] == self.to_reference_unit(3.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_one_in_filter(self) -> None:
         query_1 = self.mql(
             "sum", TransactionMRI.DURATION.value, "platform:[android, ios]", "platform"
@@ -706,7 +685,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert first_query[1]["totals"] == self.to_reference_unit(9.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_one_not_in_filter(self) -> None:
         query_1 = self.mql(
             "sum", TransactionMRI.DURATION.value, '!platform:["android", "ios"]', "platform"
@@ -734,7 +712,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert first_query[0]["totals"] == self.to_reference_unit(9.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_multiple_aggregations(self) -> None:
         query_1 = self.mql("min", TransactionMRI.DURATION.value)
         query_2 = self.mql("max", TransactionMRI.DURATION.value)
@@ -766,7 +743,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[1][0]["totals"] == self.to_reference_unit(6.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_multiple_aggregations_and_single_group_by(self) -> None:
         query_1 = self.mql("min", TransactionMRI.DURATION.value, group_by="platform")
         query_2 = self.mql("max", TransactionMRI.DURATION.value, group_by="platform")
@@ -830,7 +806,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert second_query[2]["totals"] == self.to_reference_unit(5.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_multiple_aggregations_and_single_group_by_and_order_by_with_limit(
         self,
     ) -> None:
@@ -893,7 +868,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert second_meta[0]["limit"] == 2
         assert second_meta[0]["order"] == "DESC"
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_limit_above_snuba_limit(
         self,
     ) -> None:
@@ -923,7 +897,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         first_meta = sorted(meta[0], key=lambda value: value.get("name", ""))
         assert first_meta[0]["limit"] == SNUBA_QUERY_LIMIT
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     @patch("sentry.sentry_metrics.querying.data.execution.SNUBA_QUERY_LIMIT", 3)
     def test_query_with_multiple_aggregations_and_single_group_by_and_dynamic_limit(
         self,
@@ -980,7 +953,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert first_meta[0]["has_more"]
         assert second_meta[0]["order"] == "DESC"
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_custom_set(self):
         mri = "s:custom/User.Click.2@none"
         for user in ("marco", "marco", "john"):
@@ -1013,7 +985,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0][0]["series"] == [None, 2, None]
         assert data[0][0]["totals"] == 2
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_one_metric_blocked_for_one_project(self):
         mri = "d:custom/page_size@byte"
 
@@ -1052,7 +1023,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0][0]["series"] == [None, self.to_reference_unit(15.0, "byte"), None]
         assert data[0][0]["totals"] == self.to_reference_unit(15.0, "byte")
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_one_metric_blocked_for_all_projects(self):
         mri = "d:custom/page_load@millisecond"
 
@@ -1090,7 +1060,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0][0]["series"] == [None, None, None]
         assert data[0][0]["totals"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_two_metrics_and_one_blocked_for_a_project(self):
         mri_1 = "d:custom/page_load@millisecond"
         mri_2 = "d:custom/app_load@millisecond"
@@ -1134,7 +1103,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[1][0]["series"] == [None, self.to_reference_unit(10.0), None]
         assert data[1][0]["totals"] == self.to_reference_unit(10.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_one_tag_blocked_for_one_project(self):
         mri = "d:custom/page_size@byte"
 
@@ -1174,7 +1142,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0][0]["series"] == [None, self.to_reference_unit(25.0, "byte"), None]
         assert data[0][0]["totals"] == self.to_reference_unit(25.0, "byte")
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_invalid_syntax(
         self,
     ) -> None:
@@ -1196,7 +1163,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
                 referrer="metrics.data.api",
             )
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_different_namespaces(self):
         query_1 = self.mql(
             "min",
@@ -1220,7 +1186,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
                 referrer="metrics.data.api",
             )
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_different_metric_types(self):
         query_1 = self.mql("count", "c:custom/page_click@none")
         query_2 = self.mql("max", "d:custom/app_load@millisecond")
@@ -1241,7 +1206,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
                 referrer="metrics.data.api",
             )
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_different_group_bys(self):
         query_1 = self.mql("min", "d:custom/page_click@none", group_by="transaction, environment")
         query_2 = self.mql("max", "d:custom/app_load@millisecond", group_by="transaction")
@@ -1264,7 +1228,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
                 referrer="metrics.data.api",
             )
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_complex_group_by(self):
         query_1 = self.mql("min", "d:custom/page_click@none", group_by="environment")
         query_2 = self.mql("max", "d:custom/app_load@millisecond", group_by="transaction")
@@ -1287,7 +1250,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
                 referrer="metrics.data.api",
             )
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_basic_formula(self):
         query_1 = self.mql("count", TransactionMRI.DURATION.value)
         query_2 = self.mql("sum", TransactionMRI.DURATION.value)
@@ -1312,7 +1274,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0][0]["series"] == [None, 4.0, 3.0]
         assert data[0][0]["totals"] == 3.5
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_complex_formula(self):
         query_1 = self.mql("count", TransactionMRI.DURATION.value)
         query_2 = self.mql("sum", TransactionMRI.DURATION.value)
@@ -1342,7 +1303,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0][0]["series"] == [None, 136.0, 127.0]
         assert data[0][0]["totals"] == 226.0
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_formula_and_group_by(self):
         query_1 = self.mql("count", TransactionMRI.DURATION.value)
         query_2 = self.mql("sum", TransactionMRI.DURATION.value)
@@ -1377,7 +1337,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert first_query[2]["series"] == [None, 5.0, 4.0]
         assert first_query[2]["totals"] == 18.0
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_formula_and_filter(self):
         query_1 = self.mql("count", TransactionMRI.DURATION.value, filters="platform:android")
         query_2 = self.mql("sum", TransactionMRI.DURATION.value, filters="platform:ios")
@@ -1409,7 +1368,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0][1]["series"] == [None, 1.0, 1.0]
         assert data[0][1]["totals"] == 2.0
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_basic_formula_and_coercible_units(self):
         mri_1 = "d:custom/page_load@nanosecond"
         mri_2 = "d:custom/image_load@microsecond"
@@ -1469,7 +1427,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
             assert meta[0][1]["unit"] == "nanosecond"
             assert meta[0][1]["scaling_factor"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_basic_formula_and_non_coercible_units(self):
         mri_1 = "d:custom/page_load@nanosecond"
         mri_2 = "d:custom/page_size@byte"
@@ -1513,7 +1470,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert meta[0][1]["unit"] is None
         assert meta[0][1]["scaling_factor"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_basic_formula_and_unitless_aggregates(self):
         mri_1 = "d:custom/page_load@nanosecond"
         mri_2 = "d:custom/load_time@microsecond"
@@ -1557,7 +1513,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert meta[0][1]["unit"] is None
         assert meta[0][1]["scaling_factor"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_basic_formula_and_unknown_units(self):
         mri_1 = "d:custom/cost@bananas"
         mri_2 = "d:custom/speed@mangos"
@@ -1601,7 +1556,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert meta[0][1]["unit"] is None
         assert meta[0][1]["scaling_factor"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_query_with_basic_formula_and_coefficient_operators(self):
         mri_1 = "d:custom/page_load@nanosecond"
         mri_2 = "d:custom/load_time@microsecond"
@@ -1653,7 +1607,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
             assert meta[0][1]["unit"] == expected_unit
             assert meta[0][1]["scaling_factor"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_filter_project_mapping(self) -> None:
         mql = self.mql("sum", TransactionMRI.DURATION.value, "project:bar")
         query = MQLQuery(mql)
@@ -1729,7 +1682,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
                 UseCaseID.TRANSACTIONS,
             )
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_groupby_project_mapping(self) -> None:
         self.setup_second_project()
         mql = self.mql("avg", TransactionMRI.DURATION.value, group_by="project")
@@ -1756,7 +1708,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[1]["totals"] == self.to_reference_unit(4.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_groupby_and_filter_project_mapping(self) -> None:
         self.setup_second_project()
         self.setup_third_project()
@@ -1805,7 +1756,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
             ]
             assert data[1]["totals"] == self.to_reference_unit(4.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_groupby_project_id_is_not_unmapped(self) -> None:
         self.setup_second_project()
 
@@ -1834,7 +1784,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[1]["totals"] == self.to_reference_unit(4.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_only_specific_queries_project_mapping(self) -> None:
         self.setup_second_project()
 
@@ -1863,7 +1812,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data_2[0]["by"] == {"project": self.project.slug}
         assert data_2[1]["by"] == {"project": self.new_project_1.slug}
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_groupby_project_id_and_filter_by_project(self) -> None:
         self.setup_second_project()
         self.setup_third_project()
@@ -1898,7 +1846,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[1]["totals"] == self.to_reference_unit(4.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_groupby_project_and_filter_by_project_id(self) -> None:
         self.setup_second_project()
         self.setup_third_project()
@@ -1933,7 +1880,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         ]
         assert data[1]["totals"] == self.to_reference_unit(4.0)
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_groupby_project_and_filter_by_unknown_project_id(self) -> None:
         self.empty_project = self.create_project(name="empty project")
 
@@ -1959,7 +1905,6 @@ class MetricsAPITestCase(TestCase, BaseMetricsTestCase):
         assert data[0]["series"] == [None, None, None]
         assert data[0]["totals"] is None
 
-    @with_feature("organizations:ddm-metrics-api-unit-normalization")
     def test_filter_by_unknown_project_slug(self) -> None:
         self.empty_project = self.create_project(name="empty project")