-
-
Notifications
You must be signed in to change notification settings - Fork 344
feat: wrap method, profiler with App start and Stall tracking #1728
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
Conversation
3eb8dbf
to
1575cae
Compare
f408128
to
a4417ba
Compare
a4417ba
to
4305934
Compare
Instructions and example for changelogPlease add an entry to
To the changelog entry, please add a link to this PR (consider a more descriptive message): - wrap method, profiler with App start and Stall tracking. (1728) If none of the above apply, you can opt out by adding #skip-changelog to the PR description. |
"@sentry/tracing": "6.7.1", | ||
"@sentry/types": "6.7.1", | ||
"@sentry/utils": "6.7.1", | ||
"@sentry/browser": "6.12.0-beta.2", |
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.
Let’s not bump to the beta please.
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.
We won't if you release it before Tuesday next week :)
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.
We'll make it happen :)
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.
Thanks!
We can merge this and ship another beta still today if there's time.
Next week bump deps to GA and GA this too
Can we not do the |
"@sentry/tracing": "6.7.1", | ||
"@sentry/types": "6.7.1", | ||
"@sentry/utils": "6.7.1", | ||
"@sentry/browser": "6.12.0-beta.2", |
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.
We won't if you release it before Tuesday next week :)
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.
Yeah I would separate out the sdk init with the app
wrapping.
"@sentry/tracing": "6.7.1", | ||
"@sentry/types": "6.7.1", | ||
"@sentry/utils": "6.7.1", | ||
"@sentry/browser": "6.12.0-beta.2", |
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.
We'll make it happen :)
@AbhiPrasad Init is called right away before we even return the wrapped App: sentry-react-native/src/js/sdk.tsx Lines 119 to 146 in 1dcae6c
|
@AbhiPrasad I see what you mean now, because this usually wraps the exports this might miss any crashes caused by things you call before the wrapping happens. Let's see how splitting it up goes. |
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.
wrap is tested via the e2e, right?
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.
Sweet let’s ship it
📢 Type of change
📜 Description
Adds a new
Sentry.wrap
method that wraps the app with a React Profiler to profile the app start, and a touch event boundary. Currently, we wrap the root component with just aReactNativeProfiler
and aTouchEventBoundary
. We will be able to instrument more things in the future (such as possibly auto-detect routing instrumentation, transactions triggered by touch events, etc).Now, the app start finishes when the root component finishes mounting. If
Sentry.wrap
isn't used, then the app start will fall back to the Javascript global scope initialization timestamp.Other Changes
sentry-javascript
dependencies to6.12.0-beta.2
.ReactNativeTracing
package for consistency.enableAutoPerformanceTracking
, which will be enabled by default. This means that you will need to just provide a sample rate to start using auto performance.enableAppStartTracking
,enableNativeFramesTracking
, andenableStallTracking
flags available as options toReactNativeTracing
.💡 Motivation and Context
Part of #1701
💚 How did you test it?
Wrote, updated unit tests and tested on both iOS and Android sample apps.
📝 Checklist