diff --git a/static/app/utils/fields/index.ts b/static/app/utils/fields/index.ts index c512c9aa8149a4..ca17a3c6091569 100644 --- a/static/app/utils/fields/index.ts +++ b/static/app/utils/fields/index.ts @@ -108,6 +108,7 @@ export enum FieldKey { USER_ID = 'user.id', USER_IP = 'user.ip', USER_USERNAME = 'user.username', + APP_IN_FOREGROUND = 'app.in_foreground', } export enum FieldValueType { @@ -926,6 +927,11 @@ const EVENT_FIELD_DEFINITIONS: Record = { kind: FieldKind.FIELD, valueType: FieldValueType.STRING, }, + [FieldKey.APP_IN_FOREGROUND]: { + desc: t('Indicates if the app is in the foreground or background'), + kind: FieldKind.FIELD, + valueType: FieldValueType.BOOLEAN, + }, }; export const ISSUE_FIELDS = [ @@ -991,6 +997,7 @@ export const ISSUE_FIELDS = [ FieldKey.USER_ID, FieldKey.USER_IP, FieldKey.USER_USERNAME, + FieldKey.APP_IN_FOREGROUND, ]; /** @@ -1067,6 +1074,9 @@ export const DISCOVER_FIELDS = [ FieldKey.STACK_STACK_LEVEL, // contexts.key and contexts.value omitted on purpose. + // App context fields + FieldKey.APP_IN_FOREGROUND, + // Transaction event fields. FieldKey.TRANSACTION_DURATION, FieldKey.TRANSACTION_OP,