Skip to content

Commit f96e09e

Browse files
aliu39andrewshie-sentry
authored andcommitted
feat(replay): add user.geo fields to typeahead (#91315)
Depends on #91313 Closes getsentry/team-replay#566 Closes #67001
1 parent e5ef425 commit f96e09e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

static/app/utils/fields/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2192,6 +2192,10 @@ export enum ReplayFieldKey {
21922192
SEEN_BY_ME = 'seen_by_me',
21932193
URLS = 'urls',
21942194
URL = 'url',
2195+
USER_GEO_CITY = 'user.geo.city',
2196+
USER_GEO_COUNTRY_CODE = 'user.geo.country_code',
2197+
USER_GEO_REGION = 'user.geo.region',
2198+
USER_GEO_SUBDIVISION = 'user.geo.subdivision',
21952199
VIEWED_BY_ME = 'viewed_by_me',
21962200
}
21972201

@@ -2255,6 +2259,10 @@ export const REPLAY_FIELDS = [
22552259
FieldKey.USER_ID,
22562260
FieldKey.USER_IP,
22572261
FieldKey.USER_USERNAME,
2262+
ReplayFieldKey.USER_GEO_CITY,
2263+
ReplayFieldKey.USER_GEO_COUNTRY_CODE,
2264+
ReplayFieldKey.USER_GEO_REGION,
2265+
ReplayFieldKey.USER_GEO_SUBDIVISION,
22582266
ReplayFieldKey.VIEWED_BY_ME,
22592267
FieldKey.OTA_UPDATES_CHANNEL,
22602268
FieldKey.OTA_UPDATES_RUNTIME_VERSION,
@@ -2364,6 +2372,12 @@ const REPLAY_FIELD_DEFINITIONS: Record<ReplayFieldKey, FieldDefinition> = {
23642372
kind: FieldKind.FIELD,
23652373
valueType: FieldValueType.STRING,
23662374
},
2375+
[ReplayFieldKey.USER_GEO_CITY]: EVENT_FIELD_DEFINITIONS[FieldKey.GEO_CITY],
2376+
[ReplayFieldKey.USER_GEO_COUNTRY_CODE]:
2377+
EVENT_FIELD_DEFINITIONS[FieldKey.GEO_COUNTRY_CODE],
2378+
[ReplayFieldKey.USER_GEO_REGION]: EVENT_FIELD_DEFINITIONS[FieldKey.GEO_REGION],
2379+
[ReplayFieldKey.USER_GEO_SUBDIVISION]:
2380+
EVENT_FIELD_DEFINITIONS[FieldKey.GEO_SUBDIVISION],
23672381
[ReplayFieldKey.VIEWED_BY_ME]: {
23682382
desc: t('Whether you have seen this replay before. Alias of seen_by_me (true/false)'),
23692383
kind: FieldKind.FIELD,

0 commit comments

Comments
 (0)