sentry
sentry copied to clipboard
fix(snuba-search): Fix first_seen sort aggregation
Add an aggregation for the first seen sort to convert the first_seen value to a uint64. Without the aggregation, the paginator is unable to parse and handle the cursor value which is formatted as a datetime (e.g. 2024-08-08T04:30:09+00:00:0:0). The aggregation converts the value like we do for the last_seen sort to have an int cursor instead (e.g. 1723176015000:0:0).
Tested locally to confirm pagination works, and this change (as well as all snuba-search changes) are only enabled for Sentry right now so this is safe to land.