Using Replay to Solve Hydration Errors #62097
scefali
announced in
Product Spitballin'
Replies: 2 comments 4 replies
-
This would be so lovely to have... in Remix. 😅 |
Beta Was this translation helpful? Give feedback.
4 replies
-
We've published a changelog with how to get started debugging hydration errors using session replay https://changelog.getsentry.com/announcements/diff-hydration-errors-with-replay |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
Hydration Errors are quite common yet hard to fix. They happen when the HTML in the first render cycle doesn't match the HTML sent by the server. It causes both a full re-render can sometimes can cause adverse side effects. Currently, hydration errors are being filtered out by Sentry's inbound filters because Sentry cannot give helpful debugging information and they are very noisy. Our goal is to make hydration errors actionable so developers can actually fix them.
Using Session Replay
We can use session replays to display a visual and html diff of when the app starts up. Because we're filtering out the error events we've added an additional
replay.hydrate-error
breadcrumb to the Replay SDK to record when these errors occur, similar to a click event.Once we have the hydration error breadcrumb, we can get the initial pageload and compare it with the html state at the time of the
replay.hydrate-error
event. Comparing these visually and using an html diff it should point people into the right direction of the hydration error's source.We'd love to hear from you on:
Getting Started
See this changelog for notes on how to get started https://changelog.getsentry.com/announcements/diff-hydration-errors-with-replay
Beta Was this translation helpful? Give feedback.
All reactions