ref(replays): Use generic /events/ endpoint in useReplayData#113346
Open
ref(replays): Use generic /events/ endpoint in useReplayData#113346
Conversation
The replay-specific /replays-events-meta/ endpoint exists to bypass the cross-project gate the generic events endpoints used to enforce. That gate was removed when the organizations:global-views flag was retired (PR #98684), so the replay clone is no longer needed. Point useReplayData at OrganizationEventsEndpoint (/events/) with an explicit `field` list covering the columns the replay endpoint used to hardcode, plus project.name. timestamp_ms is now consumed by the hook directly: hydrateErrors normalizes Snuba's non-ISO "YYYY-MM-DD HH:MM:SS.sss" shape before constructing the Date so ms precision survives. onRetry narrows its cache invalidation via a predicate on referrer=replay_details so unrelated /events/ queries aren't refetched. Note that the dataset changed from `DISCOVER` to `ERRORS` - it was already using `ERRORS` behind the scenes, but this makes it explicit (so it can't be confused for a TRANSACTIONS usage, which is deprecated.) The backend endpoint can be cleaned up after this goes out.
ryan953
reviewed
Apr 17, 2026
Member
There was a problem hiding this comment.
can we throw til up into static/utils/date/* maybe? it's date transforms, nothing replay specific.
i bet other places do something similar already, so finding a shared home for all that could create re-use in the future.
Member
Author
There was a problem hiding this comment.
Good idea, will do before merge!
ryan953
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The replay-specific
/replays-events-meta/endpoint exists to bypass the cross-project gate the generic events endpoints used to enforce. That gate was removed when theorganizations:global-viewsflag was retired (#98684), so the replay clone is no longer needed.useReplayDataat/events/with an explicitfieldlist covering the columns the replay endpoint used to hardcode, plusproject.name.timestamp_msis now consumed by the hook directly:hydrateErrorsnormalizes Snuba's non-ISO "YYYY-MM-DD HH:MM:SS.sss" shape before constructing the Date so ms precision survives.onRetrynarrows its cache invalidation via a predicate onreferrer=replay_detailsso unrelated/events/queries aren't refetched.DISCOVERtoERRORS- it was already usingERRORSbehind the scenes, but this makes it explicit (so it can't be confused for aTRANSACTIONSdataset usage, which is deprecated.)The backend endpoint can be cleaned up after this goes out.
Fixes DAIN-1459.