|
@@ -477,3 +477,28 @@ class OrganizationEventsStatsMetricsEnhancedPerformanceEndpointTest(
|
|
|
},
|
|
|
)
|
|
|
assert response.status_code == 400, response.content
|
|
|
+
|
|
|
+ def test_title_filter(self):
|
|
|
+ self.store_transaction_metric(
|
|
|
+ 123,
|
|
|
+ tags={"transaction": "foo_transaction"},
|
|
|
+ timestamp=self.day_ago + timedelta(minutes=30),
|
|
|
+ )
|
|
|
+ response = self.do_request(
|
|
|
+ data={
|
|
|
+ "start": iso_format(self.day_ago),
|
|
|
+ "end": iso_format(self.day_ago + timedelta(hours=2)),
|
|
|
+ "interval": "1h",
|
|
|
+ "query": "title:foo_transaction",
|
|
|
+ "yAxis": [
|
|
|
+ "sum(transaction.duration)",
|
|
|
+ ],
|
|
|
+ "dataset": "metricsEnhanced",
|
|
|
+ },
|
|
|
+ )
|
|
|
+ assert response.status_code == 200, response.content
|
|
|
+ data = response.data["data"]
|
|
|
+ assert [attrs for time, attrs in data] == [
|
|
|
+ [{"count": 123}],
|
|
|
+ [{"count": 0}],
|
|
|
+ ]
|