Skip to content

Commit af61d07

Browse files
xurui-cRachel ChenRachel Chen
authored
fix(eap): speed up GetTrace endpoint pagination (#7614)
Product team reports pagination to be slow, and we think making the order by clause of the query match the sort key of the CH table will help (consequently we change the pagination to match the order by). This is related to the pre-existing bug uncovered as part of #7586 We will be measuring the speed up by using our internal DD metrics rollout plan: - monitor error count via DD: https://app.datadoghq.com/s/FH6-Y3/vet-mu7-eq2 - monitor sentry issues - if things go wrong, click revert --------- Co-authored-by: Rachel Chen <[email protected]> Co-authored-by: Rachel Chen <[email protected]>
1 parent c579ec4 commit af61d07

File tree

3 files changed

+262
-78
lines changed

3 files changed

+262
-78
lines changed

snuba/web/rpc/v1/endpoint_export_trace_items.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def from_protobuf(cls, page_token: PageToken) -> Optional["ExportTraceItemsPageT
8181
filters[1].comparison_filter.key.name == "last_seen_timestamp"
8282
and filters[1].comparison_filter.key.type == AttributeKey.Type.TYPE_DOUBLE
8383
):
84-
raise ValueError("Invalid page token")
84+
raise ValueError("Invalid timestamp")
8585
last_seen_timestamp = filters[1].comparison_filter.value.val_double
8686

8787
if not (
@@ -95,7 +95,7 @@ def from_protobuf(cls, page_token: PageToken) -> Optional["ExportTraceItemsPageT
9595
filters[3].comparison_filter.key.name == "last_seen_item_id"
9696
and filters[3].comparison_filter.key.type == AttributeKey.Type.TYPE_STRING
9797
):
98-
raise ValueError("Invalid page token")
98+
raise ValueError("Invalid item id")
9999
last_seen_item_id = filters[3].comparison_filter.value.val_str
100100

101101
return cls(

0 commit comments

Comments
 (0)