|
@@ -101,6 +101,11 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
release=None,
|
|
|
)
|
|
|
)
|
|
|
+ self.store_replays(
|
|
|
+ self.mock_event_links(
|
|
|
+ seq1_timestamp, project.id, "error", replay1_id, "a3a62ef6ac86415b83c2416fc2f76db1"
|
|
|
+ )
|
|
|
+ )
|
|
|
|
|
|
with self.feature(REPLAYS_FEATURES):
|
|
|
response = self.client.get(self.url)
|
|
@@ -527,7 +532,12 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
self.mock_event_links(seq1_timestamp, project.id, "fatal", replay1_id, uuid.uuid4().hex)
|
|
|
)
|
|
|
self.store_replays(
|
|
|
- self.mock_event_links(seq1_timestamp, project.id, "error", replay1_id, uuid.uuid4().hex)
|
|
|
+ self.mock_event_links(seq1_timestamp, project.id, "fatal", replay1_id, uuid.uuid4().hex)
|
|
|
+ )
|
|
|
+ self.store_replays(
|
|
|
+ self.mock_event_links(
|
|
|
+ seq1_timestamp, project.id, "error", replay1_id, "a3a62ef6ac86415b83c2416fc2f76db1"
|
|
|
+ )
|
|
|
)
|
|
|
self.store_replays(
|
|
|
self.mock_event_links(
|
|
@@ -607,9 +617,6 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
"url:example.com",
|
|
|
"activity:3",
|
|
|
"activity:>2",
|
|
|
- "new_count_errors:2",
|
|
|
- "new_count_errors:>1",
|
|
|
- "new_count_errors:<3",
|
|
|
"count_warnings:1",
|
|
|
"count_warnings:>0",
|
|
|
"count_warnings:<2",
|
|
@@ -823,7 +830,6 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
"user.email",
|
|
|
"user.id",
|
|
|
"user.username",
|
|
|
- "new_count_errors",
|
|
|
"count_warnings",
|
|
|
"count_infos",
|
|
|
]
|
|
@@ -965,10 +971,8 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
"count_segments": None,
|
|
|
"count_urls": None,
|
|
|
"clicks": None,
|
|
|
- "new_error_ids": None,
|
|
|
"warning_ids": None,
|
|
|
"info_ids": None,
|
|
|
- "new_count_errors": None,
|
|
|
"count_warnings": None,
|
|
|
"count_infos": None,
|
|
|
}
|
|
@@ -1593,6 +1597,11 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
|
|
|
self.store_replays(mock_replay(seq1_timestamp, project.id, replay1_id))
|
|
|
self.store_replays(mock_replay(seq2_timestamp, project.id, replay1_id, error_ids=[]))
|
|
|
+ self.store_replays(
|
|
|
+ self.mock_event_links(
|
|
|
+ seq1_timestamp, project.id, "error", replay1_id, "a3a62ef6ac86415b83c2416fc2f76db1"
|
|
|
+ )
|
|
|
+ )
|
|
|
|
|
|
with self.feature(REPLAYS_FEATURES):
|
|
|
queries = [
|
|
@@ -1797,23 +1806,21 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
)
|
|
|
with self.feature(REPLAYS_FEATURES):
|
|
|
queries = [
|
|
|
- f"new_error_id:{uid1}",
|
|
|
- f"new_error_id:{uid2}",
|
|
|
- f"new_error_id:[{uid1}]",
|
|
|
- f"!new_error_id:[{uid3}]",
|
|
|
- f"!new_error_id:{uid3}",
|
|
|
+ f"error_id:{uid1}",
|
|
|
+ f"error_id:{uid2}",
|
|
|
+ f"error_id:[{uid1}]",
|
|
|
+ f"!error_id:[{uid3}]",
|
|
|
+ f"!error_id:{uid3}",
|
|
|
]
|
|
|
for query in queries:
|
|
|
- response = self.client.get(
|
|
|
- self.url + f"?field=id&field=new_error_ids&query={query}"
|
|
|
- )
|
|
|
+ response = self.client.get(self.url + f"?field=id&field=error_ids&query={query}")
|
|
|
assert response.status_code == 200
|
|
|
response_data = response.json()
|
|
|
assert len(response_data["data"]) == 1, query
|
|
|
- assert len(response_data["data"][0]["new_error_ids"]) == 2, query
|
|
|
+ assert len(response_data["data"][0]["error_ids"]) == 2, query
|
|
|
|
|
|
response = self.client.get(
|
|
|
- self.url + f"?field=id&field=new_error_ids&query=new_error_id:{uid3}"
|
|
|
+ self.url + f"?field=id&field=error_ids&query=error_id:{uid3}"
|
|
|
)
|
|
|
assert response.status_code == 200
|
|
|
response_data = response.json()
|
|
@@ -1913,19 +1920,17 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
|
|
|
with self.feature(REPLAYS_FEATURES):
|
|
|
queries = [
|
|
|
- f"new_error_ids:{uid1}",
|
|
|
- f"!new_error_ids:{uid2}",
|
|
|
- f"new_error_ids:[{uid1},{uid2}]",
|
|
|
- f"!new_error_ids:[{uid2}]",
|
|
|
+ f"error_ids:{uid1}",
|
|
|
+ f"!error_ids:{uid2}",
|
|
|
+ f"error_ids:[{uid1},{uid2}]",
|
|
|
+ f"!error_ids:[{uid2}]",
|
|
|
]
|
|
|
for query in queries:
|
|
|
- response = self.client.get(
|
|
|
- self.url + f"?field=id&field=new_error_ids&query={query}"
|
|
|
- )
|
|
|
+ response = self.client.get(self.url + f"?field=id&field=error_ids&query={query}")
|
|
|
assert response.status_code == 200
|
|
|
response_data = response.json()
|
|
|
assert len(response_data["data"]) == 1, query
|
|
|
- assert len(response_data["data"][0]["new_error_ids"]) == 1, query
|
|
|
+ assert len(response_data["data"][0]["error_ids"]) == 1, query
|
|
|
|
|
|
def test_event_id_count_columns(self):
|
|
|
project = self.create_project(teams=[self.team])
|
|
@@ -1967,11 +1972,8 @@ class OrganizationReplayIndexTest(APITestCase, ReplaysSnubaTestCase):
|
|
|
|
|
|
with self.feature(REPLAYS_FEATURES):
|
|
|
response = self.client.get(
|
|
|
- self.url
|
|
|
- + f"?field=id&field=new_count_errors&field=count_warnings&field=count_infos&query=id:{replay1_id}"
|
|
|
+ self.url + f"?field=id&field=count_warnings&field=count_infos&query=id:{replay1_id}"
|
|
|
)
|
|
|
assert response.status_code == 200
|
|
|
response_data = response.json()
|
|
|
- assert response_data["data"][0]["new_count_errors"] == 2
|
|
|
assert response_data["data"][0]["count_warnings"] == 1
|
|
|
- assert response_data["data"][0]["new_count_errors"] == 2
|