-
Notifications
You must be signed in to change notification settings - Fork 92
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(protocol): Add app.in_foreground and thread.main flag #1578
Conversation
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.
This looks good to me. Let's not merge until getsentry/develop#728 is approved and we know the naming is final.
@@ -36,6 +36,9 @@ pub struct AppContext { | |||
/// Amount of memory used by the application in bytes. | |||
pub app_memory: Annotated<u64>, | |||
|
|||
/// A flag indicating whether the app is in foreground or not. An app is in foreground when it's visible to the user. | |||
pub app_in_foreground: Annotated<bool>, |
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.
nit: I realize it's consistent with the other fields in this context, but the app_
prefix seems redundant to me.
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 prefer to not have the app_
prefix as well. It might not be consistent within the app context, but looking at other contexts, it seems to be a better fit without the prefix. Let me remove the prefix 👍
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.
Update the changelog too to reflect this name change, please.
In order to be consistent with getsentry/rfcs#36
Extends the protocol for contexts
in_foreground
for the app context event payloadmain
for the thread contextThis is especially useful for analysing events for mobile platforms, as it provides extra context for e.g. crashes.
Related PRs:
develop: getsentry/develop#728
Related Issues:
getsentry/team-mobile#36
getsentry/rfcs#36