Skip to content

Commit b3cc664

Browse files
committed
feat(replay): add user.geo fields to typeahead
1 parent be917d1 commit b3cc664

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
@@ -2176,6 +2176,10 @@ export enum ReplayFieldKey {
21762176
SEEN_BY_ME = 'seen_by_me',
21772177
URLS = 'urls',
21782178
URL = 'url',
2179+
USER_GEO_CITY = 'user.geo.city',
2180+
USER_GEO_COUNTRY_CODE = 'user.geo.country_code',
2181+
USER_GEO_REGION = 'user.geo.region',
2182+
USER_GEO_SUBDIVISION = 'user.geo.subdivision',
21792183
VIEWED_BY_ME = 'viewed_by_me',
21802184
}
21812185

@@ -2239,6 +2243,10 @@ export const REPLAY_FIELDS = [
22392243
FieldKey.USER_ID,
22402244
FieldKey.USER_IP,
22412245
FieldKey.USER_USERNAME,
2246+
ReplayFieldKey.USER_GEO_CITY,
2247+
ReplayFieldKey.USER_GEO_COUNTRY_CODE,
2248+
ReplayFieldKey.USER_GEO_REGION,
2249+
ReplayFieldKey.USER_GEO_SUBDIVISION,
22422250
ReplayFieldKey.VIEWED_BY_ME,
22432251
];
22442252

@@ -2345,6 +2353,12 @@ const REPLAY_FIELD_DEFINITIONS: Record<ReplayFieldKey, FieldDefinition> = {
23452353
kind: FieldKind.FIELD,
23462354
valueType: FieldValueType.STRING,
23472355
},
2356+
[ReplayFieldKey.USER_GEO_CITY]: EVENT_FIELD_DEFINITIONS[FieldKey.GEO_CITY],
2357+
[ReplayFieldKey.USER_GEO_COUNTRY_CODE]:
2358+
EVENT_FIELD_DEFINITIONS[FieldKey.GEO_COUNTRY_CODE],
2359+
[ReplayFieldKey.USER_GEO_REGION]: EVENT_FIELD_DEFINITIONS[FieldKey.GEO_REGION],
2360+
[ReplayFieldKey.USER_GEO_SUBDIVISION]:
2361+
EVENT_FIELD_DEFINITIONS[FieldKey.GEO_SUBDIVISION],
23482362
[ReplayFieldKey.VIEWED_BY_ME]: {
23492363
desc: t('Whether you have seen this replay before. Alias of seen_by_me (true/false)'),
23502364
kind: FieldKind.FIELD,

0 commit comments

Comments
 (0)