Skip to content
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

Merged
merged 7 commits into from
Nov 28, 2022

Conversation

markushi
Copy link
Member

@markushi markushi commented Nov 11, 2022

Extends the protocol for contexts

  • in_foreground for the app context event payload
  • main for the thread context

This 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

Copy link
Member

@jjbayer jjbayer left a 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>,
Copy link
Member

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.

Copy link
Member Author

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 👍

Copy link
Contributor

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.

@markushi markushi changed the title feat(protocol): Add app.app_in_foreground and thread.ui flag feat(protocol): Add app.in_foreground and thread.ui flag Nov 14, 2022
In order to be consistent with getsentry/rfcs#36
@markushi markushi changed the title feat(protocol): Add app.in_foreground and thread.ui flag feat(protocol): Add app.in_foreground and thread.main flag Nov 28, 2022
@markushi markushi merged commit dba7030 into master Nov 28, 2022
@markushi markushi deleted the feat/app-in-foreground-and-threading branch November 28, 2022 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants