sentry
sentry copied to clipboard
feat(toolbar): add a replay panel for start/stop current replay
Closes #74583 Closes #74452
If you want to checkout this branch to test it, you need to run dev-ui in getsentry and make local changes:
- Comment out https://github.com/getsentry/getsentry/blob/2a1da081f3a9e4e4111b577d5551fa24691da374/static/getsentry/gsApp/utils/useReplayInit.tsx#L85-L87
- Right below that, manually control the sample rates by commenting out/overriding ^. Best to test with 1.0/0.0, 0.0/1.0, 0/0.
Notes:
- "last recorded replay" is persisted with sessionStorage
- stopping then starting will make a new replay
- uses some try-catch logic to handle older SDK versions where the recording fxs throw.
Follow-ups before merging
- [x] Analytics context provider and start/stop button analytics (todo in this PR)
- [x] comment on SDK versioning
- exact release of
getReplay
/public API is unknown, but it was ~2yr ago near the release of the whole product
- exact release of
- [x] test with v8.18
- [x] remove the debug flag
- [x] make the links work for dev mode (can hard-code the sentry-test/app-frontend org/proj)
Follow-ups after merging
- [ ] test the links work in prod
- [ ] account for minimum replay duration (so users don't stop too early)
- [ ] add more content to the panel! Open to ideas. Can do this in a separate PR
- [ ] keep dogfooding for bugs, w/different sample rates, sdk versions