Skip to content

Add a breadcrumb when a hydration error happens #9649

Closed
@bruno-garcia

Description

@bruno-garcia

Context

This came out of a discussion internally about possible ways to help developers using Next.js (and possibly other frameworks like Remix, SvelteKit, etc) identify the root cause of hydration errors.

Currently, after several users complained about these errors not being actionable, Sentry is dropping them server-side, by default. Users can opt-out of this server-side filter under Project Settings, Inbound Filters:

image

Improvement

The goal is to use Replay to help users. As a first step, we'd like to add a breadcrumb to Replays so we know when the hydration error happens. This won't affect the default server-side filter mentioned above.

Ideas from @ryan953:

To 100% validate that the replay data helps with hydration errors we wouldn’t even need to build out the service to start. We could add hydration errors as breadcrumbs to the replay (instead of proper errors, which we do want obvs) and do the highlighting when the replay details page is viewed. Probably wouldn’t ship that, but it would give us a visualization in a matter of hours.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions