Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPDX-8506 - Prevent hydration errors being sent to RollBar #1234

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

dr-bizz
Copy link
Contributor

@dr-bizz dr-bizz commented Dec 19, 2024

Description

Due to the amount of errors being sent to RollBar regarding hydration and it maxing out our log rate limit, we need to prevent them from being sent to Rollbar.

In this PR, I add a check to prevent any logs regarding hydration from being sent to Rollbar.

Screenshot 2024-12-19 at 8 31 13 AM

We might just be able to get away with ignoring Minified React error and not have to worry about Expected server HTML since that only shows locally.

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

@dr-bizz dr-bizz requested a review from canac December 19, 2024 13:34
Copy link
Contributor

github-actions bot commented Dec 19, 2024

Bundle sizes [mpdx-react]

Compared against e2bbe01

No significant changes found

Copy link
Contributor

@canac canac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this!

pages/_app.page.tsx Outdated Show resolved Hide resolved
pages/api/utils/rollBar.ts Outdated Show resolved Hide resolved
@dr-bizz dr-bizz requested a review from canac December 19, 2024 18:50
Copy link
Contributor

@canac canac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enabled: !!process.env.ROLLBAR_ACCESS_TOKEN,
enabled: Boolean(process.env.ROLLBAR_ACCESS_TOKEN),
checkIgnore: (_, args) =>
[
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[
// Ignore React hydration warnings
[

@dr-bizz dr-bizz force-pushed the prevent-dehydration-logs branch 2 times, most recently from fb4cb7f to 9d2cdc0 Compare December 19, 2024 21:21
@dr-bizz dr-bizz merged commit 32743d7 into main Dec 19, 2024
34 of 35 checks passed
@dr-bizz dr-bizz deleted the prevent-dehydration-logs branch December 19, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants