-
Notifications
You must be signed in to change notification settings - Fork 8
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
[AXON-41] Implement AtlascodeErrorBoundary #58
Conversation
a092942
to
3865a53
Compare
* Add support to receive rendering error events from UI * Add AtlascodeErrorBoundary component * Put the new boundary to Settings page
3865a53
to
3a11fea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my god it took so long to figure out how to submit pending comments 💀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving so you can move forward.
I am concerned about the 150 stack limit being too low.
What is this?
This is the 1st PR in a series related to improving our observability when something goes wrong.
In React, there's a concept of an Error Boundary - a special component which is intended to address rendering errors in the tree, and which is very notably missing in our pages 😉
Further, we are already pulling @atlaskit/analytics-next as a dependency, which conveniently offers an implementation we could use.
After the changes in this PR, we can receive an event with some data on rendering errors occuring in prod:
What does this PR have, mechanically?
SendAnalytics
AtlascodeErrorBoundary
implementation and usageWhat is notably NOT included here?
react
versionAtlascodeErrorBoundary
usage in other pages - to not overwhelm reviewers further ;DHow was this tested?
I've introduced the new error boundary to our
Settings
page, and then added a special component that fails on rendering. With that, when running our settings page, it was possible to show alternative HTML on render errors, while also receiving an event in the analityics service:(all the extra components were removed during clean-up)