diff --git a/static/app/components/events/contexts/knownContext/app.spec.tsx b/static/app/components/events/contexts/knownContext/app.spec.tsx index a97b7ebb7896fe..4c299f6f0ab258 100644 --- a/static/app/components/events/contexts/knownContext/app.spec.tsx +++ b/static/app/components/events/contexts/knownContext/app.spec.tsx @@ -18,6 +18,7 @@ const MOCK_APP_CONTEXT: AppContext = { app_id: '3145EA1A-0EAE-3F8C-969A-13A01394D3EA', type: 'app', in_foreground: false, + is_active: false, app_memory: 1048576 * 12, view_names: ['app.view1', 'app.view2'], // Extra data is still valid and preserved @@ -65,6 +66,7 @@ describe('AppContext', () => { value: '3145EA1A-0EAE-3F8C-969A-13A01394D3EA', }, {key: 'in_foreground', subject: 'In Foreground', value: false}, + {key: 'is_active', subject: 'Is Active', value: false}, {key: 'app_memory', subject: 'Memory Usage', value: '12.0 MiB'}, { key: 'view_names', diff --git a/static/app/components/events/contexts/knownContext/app.tsx b/static/app/components/events/contexts/knownContext/app.tsx index 26ad70fe94006b..4f851e599c24c3 100644 --- a/static/app/components/events/contexts/knownContext/app.tsx +++ b/static/app/components/events/contexts/knownContext/app.tsx @@ -18,6 +18,7 @@ enum AppContextKeys { VERSION = 'app_version', BUILD = 'app_build', IN_FOREGROUND = 'in_foreground', + IS_ACTIVE = 'is_active', APP_MEMORY = 'app_memory', VIEW_NAMES = 'view_names', // XXX: From https://github.com/getsentry/sentry/issues/87238, not in the schema yet. @@ -37,6 +38,7 @@ export interface AppContext { [AppContextKeys.TYPE]?: string; [AppContextKeys.DEVICE_HASH]?: string; [AppContextKeys.IN_FOREGROUND]?: boolean; + [AppContextKeys.IS_ACTIVE]?: boolean; [AppContextKeys.APP_MEMORY]?: number; [AppContextKeys.VIEW_NAMES]?: string[]; [AppContextKeys.FREE_MEMORY]?: number; @@ -119,6 +121,12 @@ export function getAppContextData({ subject: t('In Foreground'), value: data.in_foreground, }; + case AppContextKeys.IS_ACTIVE: + return { + key: ctxKey, + subject: t('Is Active'), + value: data.is_active, + }; case AppContextKeys.APP_MEMORY: return { key: ctxKey,