Skip to content

Commit

Permalink
feat(replays): add count_rage_clicks and count_dead_clicks search fie…
Browse files Browse the repository at this point in the history
…lds (#53096)

Closes #52803 by making `count_rage_clicks `and `count_dead_clicks`
searchable in the replays list.

<img width="856" alt="Screenshot 2023-07-18 at 10 54 41 AM"
src="https://github.com/getsentry/sentry/assets/56095982/6a982c0b-6277-404b-882b-55ec4c134b71">
<img width="830" alt="Screenshot 2023-07-18 at 10 54 47 AM"
src="https://github.com/getsentry/sentry/assets/56095982/6cff08b2-a1ee-4bd3-8a3c-59eb9b165620">
  • Loading branch information
michellewzhang committed Jul 18, 2023
1 parent 989dbaf commit c3c1b08
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fixtures/js-stubs/replayRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export function ReplayRecord(replayRecord: Partial<TReplayRecord> = {}): TReplay
name: 'Other',
version: '',
},
count_dead_clicks: 1,
count_rage_clicks: 1,
count_errors: 1,
count_segments: 14,
count_urls: 1,
Expand Down
14 changes: 14 additions & 0 deletions static/app/utils/fields/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,8 @@ export enum ReplayFieldKey {
ACTIVITY = 'activity',
BROWSER_NAME = 'browser.name',
BROWSER_VERSION = 'browser.version',
COUNT_DEAD_CLICKS = 'count_dead_clicks',
COUNT_RAGE_CLICKS = 'count_rage_clicks',
COUNT_ERRORS = 'count_errors',
COUNT_SEGMENTS = 'count_segments',
COUNT_URLS = 'count_urls',
Expand Down Expand Up @@ -1214,6 +1216,8 @@ export const REPLAY_FIELDS = [
ReplayFieldKey.ACTIVITY,
ReplayFieldKey.BROWSER_NAME,
ReplayFieldKey.BROWSER_VERSION,
ReplayFieldKey.COUNT_DEAD_CLICKS,
ReplayFieldKey.COUNT_RAGE_CLICKS,
ReplayFieldKey.COUNT_ERRORS,
ReplayFieldKey.COUNT_SEGMENTS,
ReplayFieldKey.COUNT_URLS,
Expand Down Expand Up @@ -1256,6 +1260,16 @@ const REPLAY_FIELD_DEFINITIONS: Record<ReplayFieldKey, FieldDefinition> = {
kind: FieldKind.FIELD,
valueType: FieldValueType.STRING,
},
[ReplayFieldKey.COUNT_DEAD_CLICKS]: {
desc: t('Number of dead clicks in the replay'),
kind: FieldKind.FIELD,
valueType: FieldValueType.INTEGER,
},
[ReplayFieldKey.COUNT_RAGE_CLICKS]: {
desc: t('Number of rage clicks in the replay'),
kind: FieldKind.FIELD,
valueType: FieldValueType.INTEGER,
},
[ReplayFieldKey.COUNT_ERRORS]: {
desc: t('Number of errors in the replay'),
kind: FieldKind.FIELD,
Expand Down
8 changes: 8 additions & 0 deletions static/app/views/replays/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@ export type ReplayRecord = {
name: null | string;
version: null | string;
};
/**
* The number of dead clicks associated with the replay.
*/
count_dead_clicks: number;
/**
* The number of errors associated with the replay.
*/
count_errors: number;
/**
* The number of rage clicks associated with the replay.
*/
count_rage_clicks: number;
/**
* The number of segments that make up the replay.
*/
Expand Down

0 comments on commit c3c1b08

Please sign in to comment.