Skip to content

Commit 79bb00c

Browse files
authored
feat(issues): Add app.in_foreground as a known field (#57918)
1 parent 495b238 commit 79bb00c

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

static/app/components/events/contexts/app/getAppKnownDataDetails.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ describe('getAppKnownDataDetails', function () {
3232
{subject: 'Build Name', value: ''},
3333
{subject: 'Version', value: '7.1.3'},
3434
{subject: 'App Build', value: '1'},
35+
{subject: 'In Foreground', value: false},
3536
]);
3637
});
3738
});

static/app/components/events/contexts/app/getAppKnownDataDetails.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ export function getAppKnownDataDetails({data, event, type}: Props): Output | und
6161
subject: t('App Build'),
6262
value: data.app_build,
6363
};
64+
case AppKnownDataType.IN_FOREGROUND:
65+
return {
66+
subject: t('In Foreground'),
67+
value: data.in_foreground,
68+
};
6469
default:
6570
return undefined;
6671
}

static/app/components/events/contexts/app/index.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const appMockData: AppData = {
1515
app_build: '1',
1616
app_id: '3145EA1A-0EAE-3F8C-969A-13A01394D3EA',
1717
type: 'app',
18+
in_foreground: false,
1819
};
1920

2021
export const appMetaMockData = {

static/app/components/events/contexts/app/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const appKnownDataValues = [
2121
AppKnownDataType.NAME,
2222
AppKnownDataType.VERSION,
2323
AppKnownDataType.BUILD,
24+
AppKnownDataType.IN_FOREGROUND,
2425
];
2526

2627
const appIgnoredDataValues = [];

static/app/components/events/contexts/app/types.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export enum AppKnownDataType {
77
NAME = 'app_name',
88
VERSION = 'app_version',
99
BUILD = 'app_build',
10+
IN_FOREGROUND = 'in_foreground',
1011
}
1112

1213
export type AppData = {
@@ -19,4 +20,5 @@ export type AppData = {
1920
app_version?: string;
2021
build_type?: string;
2122
device_app_hash?: string;
23+
in_foreground?: boolean;
2224
};

0 commit comments

Comments
 (0)