Browse Source

chore(metrics): Remove metrics-stats flag on backend (#70764)

Closes https://github.com/getsentry/sentry/issues/70724

Requires https://github.com/getsentry/getsentry/pull/13934
Matej Minar 10 months ago
parent
commit
d099375894

+ 1 - 1
src/sentry/api/endpoints/organization_stats_v2.py

@@ -167,7 +167,7 @@ class OrganizationStatsEndpointV2(OrganizationEndpoint):
         """
         with self.handle_query_errors():
 
-            if features.has("organizations:metrics-stats", organization):
+            if features.has("organizations:custom-metrics", organization):
                 if (
                     request.GET.get("category") == "metrics"
                     or request.GET.get("category") == "metricSecond"

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

@@ -1521,8 +1521,6 @@ SENTRY_FEATURES: dict[str, bool | None] = {
     "organizations:ddm-sidebar-item-hidden": False,
     # Enables import of metric dashboards
     "organizations:ddm-dashboard-import": False,
-    # Enables category "metrics" in stats_v2 endpoint
-    "organizations:metrics-stats": False,
     # Enable the default alert at project creation to be the high priority alert
     "organizations:default-high-priority-alerts": False,
     # Enables automatically deriving of code mappings

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

@@ -61,7 +61,6 @@ def register_temporary_features(manager: FeatureManager):
     manager.add("organizations:ddm-dashboard-import", OrganizationFeature, FeatureHandlerStrategy.REMOTE)
     manager.add("organizations:custom-metrics-experimental", 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)
     manager.add("organizations:derive-code-mappings", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)
     manager.add("organizations:device-class-synthesis", OrganizationFeature, FeatureHandlerStrategy.INTERNAL)

+ 3 - 3
tests/snuba/api/endpoints/test_organization_stats_v2.py

@@ -951,7 +951,7 @@ class OrganizationStatsMetricsTestV2(APITestCase, BaseMetricsLayerTestCase):
         )
 
     @freeze_time("2021-03-14T12:27:28.303Z")
-    @with_feature("organizations:metrics-stats")
+    @with_feature("organizations:custom-metrics")
     def test_metrics_category(self):
         response = self.do_request(
             {
@@ -974,7 +974,7 @@ class OrganizationStatsMetricsTestV2(APITestCase, BaseMetricsLayerTestCase):
         }
 
     @freeze_time("2021-03-14T12:27:28.303Z")
-    @with_feature("organizations:metrics-stats")
+    @with_feature("organizations:custom-metrics")
     def test_metrics_group_by_project(self):
         response = self.do_request(
             {
@@ -1007,7 +1007,7 @@ class OrganizationStatsMetricsTestV2(APITestCase, BaseMetricsLayerTestCase):
         }
 
     @freeze_time("2021-03-14T12:27:28.303Z")
-    @with_feature("organizations:metrics-stats")
+    @with_feature("organizations:custom-metrics")
     def test_metrics_multiple_group_by(self):
         response = self.do_request(
             {