-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
feat(sdk): Add in_foreground
to event app context
#2826
Conversation
Android (legacy) Performance metrics 🚀
|
iOS (legacy) Performance metrics 🚀
|
Android (new) Performance metrics 🚀
|
iOS (new) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d760caf+dirty | 1258.76 ms | 1292.66 ms | 33.90 ms |
b868b53+dirty | 1253.68 ms | 1253.94 ms | 0.26 ms |
d091239+dirty | 1261.62 ms | 1275.80 ms | 14.17 ms |
58ae930+dirty | 1266.80 ms | 1273.79 ms | 6.99 ms |
34dc259+dirty | 1283.72 ms | 1289.30 ms | 5.58 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
d760caf+dirty | 2.92 MiB | 3.37 MiB | 462.90 KiB |
b868b53+dirty | 2.92 MiB | 3.30 MiB | 387.19 KiB |
d091239+dirty | 2.92 MiB | 3.30 MiB | 387.22 KiB |
58ae930+dirty | 2.92 MiB | 3.37 MiB | 464.04 KiB |
34dc259+dirty | 2.92 MiB | 3.37 MiB | 463.96 KiB |
nativeContext = nativeContext || {}; | ||
nativeContext.app = { | ||
...nativeContext.app, | ||
in_foreground: AppState.currentState === 'active', |
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.
Doesn't it need to be set to "false"
at some point too? Or are you passing the nativeContext
to the native SDKs and they set it for you?
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.
The in_foreground
is merged into what I get from native SDKs. As I think the value that RN reports is important for RN devs.
If the AppState.currentState === 'active'
=> true
, else false
.
Thanks for the comment I've added a test to make it clear how it works.
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.
Ahh, I see now, gotcha. Thanks!
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.
Awesome!
in_foreground
to event app context
|
📢 Type of change
📜 Description
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled🔮 Next steps