Skip to content

feat(replay): add user.geo fields to typeahead #91315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions static/app/utils/fields/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2176,6 +2176,10 @@ export enum ReplayFieldKey {
SEEN_BY_ME = 'seen_by_me',
URLS = 'urls',
URL = 'url',
USER_GEO_CITY = 'user.geo.city',
USER_GEO_COUNTRY_CODE = 'user.geo.country_code',
USER_GEO_REGION = 'user.geo.region',
USER_GEO_SUBDIVISION = 'user.geo.subdivision',
VIEWED_BY_ME = 'viewed_by_me',
}

Expand Down Expand Up @@ -2239,6 +2243,10 @@ export const REPLAY_FIELDS = [
FieldKey.USER_ID,
FieldKey.USER_IP,
FieldKey.USER_USERNAME,
ReplayFieldKey.USER_GEO_CITY,
ReplayFieldKey.USER_GEO_COUNTRY_CODE,
ReplayFieldKey.USER_GEO_REGION,
ReplayFieldKey.USER_GEO_SUBDIVISION,
ReplayFieldKey.VIEWED_BY_ME,
];

Expand Down Expand Up @@ -2345,6 +2353,12 @@ const REPLAY_FIELD_DEFINITIONS: Record<ReplayFieldKey, FieldDefinition> = {
kind: FieldKind.FIELD,
valueType: FieldValueType.STRING,
},
[ReplayFieldKey.USER_GEO_CITY]: EVENT_FIELD_DEFINITIONS[FieldKey.GEO_CITY],
[ReplayFieldKey.USER_GEO_COUNTRY_CODE]:
EVENT_FIELD_DEFINITIONS[FieldKey.GEO_COUNTRY_CODE],
[ReplayFieldKey.USER_GEO_REGION]: EVENT_FIELD_DEFINITIONS[FieldKey.GEO_REGION],
[ReplayFieldKey.USER_GEO_SUBDIVISION]:
EVENT_FIELD_DEFINITIONS[FieldKey.GEO_SUBDIVISION],
[ReplayFieldKey.VIEWED_BY_ME]: {
desc: t('Whether you have seen this replay before. Alias of seen_by_me (true/false)'),
kind: FieldKind.FIELD,
Expand Down
Loading