Просмотр исходного кода

Revert "feat(discover): add ability to query for avg decoded resource size and transfer size (#58275)"

This reverts commit d590597ea5db0992bba9bbea2177d8428f01655b.

Co-authored-by: DominikB2014 <44422760+DominikB2014@users.noreply.github.com>
getsentry-bot 1 год назад
Родитель
Сommit
b4ef05c6a0

+ 0 - 2
src/sentry/search/events/constants.py

@@ -281,8 +281,6 @@ SPAN_METRICS_MAP = {
     "span.self_time": "d:spans/exclusive_time@millisecond",
     "span.duration": "d:spans/duration@millisecond",
     "http.response_content_length": "d:spans/http.response_content_length@byte",
-    "http.decoded_response_body_length": "d:spans/http.decoded_response_body_length@byte",
-    "http.response_transfer_size": "d:spans/http.response_transfer_size@byte",
 }
 SELF_TIME_LIGHT = "d:spans/exclusive_time_light@millisecond"
 # 50 to match the size of tables in the UI + 1 for pagination reasons

+ 0 - 2
src/sentry/testutils/cases.py

@@ -1748,8 +1748,6 @@ class MetricsEnhancedPerformanceTestCase(BaseMetricsLayerTestCase, TestCase):
         "span.duration": "metrics_distributions",
         "span.self_time": "metrics_distributions",
         "http.response_content_length": "metrics_distributions",
-        "http.decoded_response_body_length": "metrics_distributions",
-        "http.response_transfer_size": "metrics_distributions",
         "measurements.lcp": "metrics_distributions",
         "measurements.fp": "metrics_distributions",
         "measurements.fcp": "metrics_distributions",

+ 1 - 53
tests/snuba/api/endpoints/test_organization_events_stats_span_metrics.py

@@ -192,7 +192,7 @@ class OrganizationEventsStatsSpansMetricsEndpointTest(MetricsEnhancedPerformance
         assert "bar" in response.data
         assert response.data["Other"]["meta"]["dataset"] == "spansMetrics"
 
-    def test_resource_encoded_length(self):
+    def test_resource_size(self):
         self.store_span_metric(
             4,
             metric="http.response_content_length",
@@ -218,58 +218,6 @@ class OrganizationEventsStatsSpansMetricsEndpointTest(MetricsEnhancedPerformance
         assert data[0][1][0]["count"] == 0.0
         assert data[1][1][0]["count"] == 4.0
 
-    def test_resource_decoded_length(self):
-        self.store_span_metric(
-            4,
-            metric="http.decoded_response_body_length",
-            timestamp=self.day_ago + timedelta(minutes=1),
-            tags={"transaction": "foo"},
-        )
-
-        response = self.do_request(
-            data={
-                "start": iso_format(self.day_ago),
-                "end": iso_format(self.day_ago + timedelta(minutes=2)),
-                "interval": "1m",
-                "yAxis": "avg(http.decoded_response_body_length)",
-                "project": self.project.id,
-                "dataset": "spansMetrics",
-                "excludeOther": 0,
-            },
-        )
-
-        data = response.data["data"]
-        assert response.status_code == 200
-        assert len(data) == 2
-        assert data[0][1][0]["count"] == 0.0
-        assert data[1][1][0]["count"] == 4.0
-
-    def test_resource_transfer_size(self):
-        self.store_span_metric(
-            4,
-            metric="http_response_transfer_size",
-            timestamp=self.day_ago + timedelta(minutes=1),
-            tags={"transaction": "foo"},
-        )
-
-        response = self.do_request(
-            data={
-                "start": iso_format(self.day_ago),
-                "end": iso_format(self.day_ago + timedelta(minutes=2)),
-                "interval": "1m",
-                "yAxis": "avg(http_response_transfer_size)",
-                "project": self.project.id,
-                "dataset": "spansMetrics",
-                "excludeOther": 0,
-            },
-        )
-
-        data = response.data["data"]
-        assert response.status_code == 200
-        assert len(data) == 2
-        assert data[0][1][0]["count"] == 0.0
-        assert data[1][1][0]["count"] == 4.0
-
 
 class OrganizationEventsStatsSpansMetricsEndpointTestWithMetricLayer(
     OrganizationEventsStatsSpansMetricsEndpointTest