replayAnalyticsEvents.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import type {LayoutKey} from 'sentry/utils/replays/hooks/useReplayLayout';
  2. export type ReplayEventParameters = {
  3. 'replay.details-layout-changed': {
  4. chosen_layout: LayoutKey;
  5. default_layout: LayoutKey;
  6. };
  7. 'replay.details-resized-panel': {
  8. layout: LayoutKey;
  9. slide_motion: 'toTop' | 'toBottom' | 'toLeft' | 'toRight';
  10. };
  11. 'replay.details-tab-changed': {
  12. tab: string;
  13. };
  14. 'replay.details-time-spent': {
  15. seconds: number;
  16. user_email: string;
  17. };
  18. 'replay.details-viewed': {
  19. referrer: undefined | string;
  20. user_email: string;
  21. };
  22. 'replay.play-pause': {
  23. play: boolean;
  24. user_email: string;
  25. };
  26. 'replay.toggle-fullscreen': {
  27. fullscreen: boolean;
  28. user_email: string;
  29. };
  30. };
  31. export type ReplayEventKey = keyof ReplayEventParameters;
  32. export const replayEventMap: Record<ReplayEventKey, string | null> = {
  33. 'replay.details-layout-changed': 'Changed Replay Details Layout',
  34. 'replay.details-resized-panel': 'Resized Replay Details Panel',
  35. 'replay.details-tab-changed': 'Changed Replay Details Tab',
  36. 'replay.details-time-spent': 'Time Spent Viewing Replay Details',
  37. 'replay.details-viewed': 'Viewed Replay Details',
  38. 'replay.play-pause': 'Played/Paused Replay',
  39. 'replay.toggle-fullscreen': 'Toggled Replay Fullscreen',
  40. };