Browse Source

ref(feature-flag): Remove feature flag BE code for ops breakdown (#40605)

Co-authored-by: k-fish <kevan.fisher@sentry.io>
Ash Anand 2 years ago
parent
commit
625750809c

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

@@ -1136,8 +1136,6 @@ SENTRY_FEATURES = {
     "organizations:org-subdomains": False,
     # Enable project selection on the stats page
     "organizations:project-stats": False,
-    # Enable views for ops breakdown
-    "organizations:performance-ops-breakdown": False,
     # Enable interpolation of null data points in charts instead of zerofilling in performance
     "organizations:performance-chart-interpolation": False,
     # Enable views for anomaly detection

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

@@ -203,7 +203,6 @@ default_manager.add("organizations:integrations-issue-basic", OrganizationFeatur
 default_manager.add("organizations:integrations-issue-sync", OrganizationFeature)
 default_manager.add("organizations:integrations-stacktrace-link", OrganizationFeature)
 default_manager.add("organizations:integrations-ticket-rules", OrganizationFeature)
-default_manager.add("organizations:performance-ops-breakdown", OrganizationFeature)
 default_manager.add("organizations:performance-view", OrganizationFeature)
 default_manager.add("organizations:relay", OrganizationFeature)
 default_manager.add("organizations:sso-basic", OrganizationFeature)

+ 2 - 2
src/sentry/relay/config/__init__.py

@@ -253,8 +253,8 @@ def _get_project_config(project, full_config=True, project_keys=None):
         # This is all we need for external Relay processors
         return ProjectConfig(project, **cfg)
 
-    if features.has("organizations:performance-ops-breakdown", project.organization):
-        config["breakdownsV2"] = project.get_option("sentry:breakdowns")
+    config["breakdownsV2"] = project.get_option("sentry:breakdowns")
+
     if _should_extract_transaction_metrics(project):
         add_experimental_config(
             config,

+ 1 - 1
tests/relay_integration/test_integration.py

@@ -187,7 +187,7 @@ class SentryRemoteTest(RelayStoreHelper, TransactionTestCase):
 
         with Feature(
             {
-                "organizations:performance-ops-breakdown": True,
+                "projects:performance-suspect-spans-ingestion": True,
             }
         ):
             event = self.post_and_retrieve_event(event_data)

+ 0 - 1
tests/relay_integration/test_metrics_extraction.py

@@ -15,7 +15,6 @@ class MetricsExtractionTest(RelayStoreHelper, TransactionTestCase):
         with Feature(
             {
                 "organizations:transaction-metrics-extraction": True,
-                "organizations:performance-ops-breakdown": True,
             }
         ):
             event_data = {

+ 4 - 0
tests/sentry/api/endpoints/test_relay_projectconfigs.py

@@ -18,6 +18,10 @@ _date_regex = re.compile(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$")
 def _get_all_keys(config):
     for key in config:
         yield key
+        if key == "breakdownsV2":
+            # Breakdown keys are not field names and may contain underscores,
+            # e.g. span_ops
+            continue
         if isinstance(config[key], dict):
             for key in _get_all_keys(config[key]):
                 yield key

+ 4 - 0
tests/sentry/api/endpoints/test_relay_projectconfigs_v2.py

@@ -18,6 +18,10 @@ _date_regex = re.compile(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z$")
 def _get_all_keys(config):
     for key in config:
         yield key
+        if key == "breakdownsV2":
+            # Breakdown keys are not field names and may contain underscores,
+            # e.g. span_ops
+            continue
         if isinstance(config[key], dict):
             for key in _get_all_keys(config[key]):
                 yield key

+ 9 - 0
tests/sentry/relay/snapshots/test_config/test_get_project_config/full_config.pysnap

@@ -6,6 +6,15 @@ source: tests/sentry/relay/test_config.py
 config:
   allowedDomains:
   - '*'
+  breakdownsV2:
+    span_ops:
+      matches:
+      - http
+      - db
+      - browser
+      - resource
+      - ui
+      type: spanOperations
   datascrubbingSettings:
     excludeFields: []
     scrubData: true

+ 0 - 1
tests/sentry/relay/test_config.py

@@ -540,7 +540,6 @@ def test_project_config_with_boosted_latest_releases_boost_in_dynamic_sampling_r
 def test_project_config_with_breakdown(default_project, insta_snapshot, transaction_metrics):
     with Feature(
         {
-            "organizations:performance-ops-breakdown": True,
             "organizations:transaction-metrics-extraction": transaction_metrics == "with_metrics",
         }
     ):