-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref: Use @sentry/react #19366
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
ref: Use @sentry/react #19366
Conversation
145eaa8 to
7469eb7
Compare
64b4061 to
f92b616
Compare
08e5c57 to
576d24f
Compare
01cdb3c to
a805960
Compare
a805960 to
5f04aca
Compare
5f04aca to
1264318
Compare
e34e618 to
56db117
Compare
billyvg
left a comment
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.
🚀
Left a comment re: sdk API, but otherwise looks good
|
|
||
| export default withProfiler(LoadingIndicator); | ||
| export default withProfiler(LoadingIndicator, { | ||
| hasUpdateSpan: false, |
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.
mmm I can't form words atm, but has doesn't read to me that this is an option for withProfiler... maybe something like includeUpdateSpan?
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.
Or just updateSpan
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.
updateSpan makes it sound like the profiler will perform an update of a span -- maybe includeUpdates?
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.
So somethin alongs the lines of:
// If time component is on page should be displayed as a span. True by default.
includeRender?: boolean;
// If component updates should be displayed as spans. True by default.
includeUpdates?: boolean;I like this naming.
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.
For now I am going to merge this in, but I will make the API changes and come back and update.
Motivation
As we are preparing to add public docs for https://github.com/getsentry/sentry-javascript/tree/master/packages/react, we figured it would be best to dogfood the react package first with sentry.
@sentry/reactis a superset of the@sentry/browserpackage, with a customProfilercomponent added, as well as anErrorBoundarycomponent out of the box.Implementation
List of changes:
@sentry/browserwith@sentry/reactwithProfilerfrom@sentry/reactFuture
Another PR to add the
@sentry/reactErrorBoundarycomponent.