coreuiAnalyticsEvents.tsx 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import {PinnedPageFilter} from 'sentry/types';
  2. interface DateSelector {
  3. field_changed: 'start' | 'end';
  4. path: string;
  5. time: string;
  6. }
  7. export type CoreUIEventParameters = {
  8. 'dateselector.time_changed': DateSelector;
  9. 'dateselector.utc_changed': {
  10. path: string;
  11. utc: boolean;
  12. };
  13. 'deprecated_urls.redirect': {
  14. feature: string;
  15. url: string;
  16. };
  17. 'environmentselector.direct_selection': {
  18. path: string;
  19. };
  20. 'environmentselector.toggle': {
  21. action: 'removed' | 'added';
  22. path: string;
  23. };
  24. 'environmentselector.update': {
  25. count: number;
  26. path: string;
  27. };
  28. 'number_drag_control.clicked': {};
  29. 'page_filters.pin_click': {
  30. filter: PinnedPageFilter;
  31. pin: boolean;
  32. };
  33. 'projectselector.bookmark_toggle': {
  34. bookmarked: boolean;
  35. };
  36. 'user_feedback.dialog_opened': {
  37. projects: string;
  38. };
  39. 'user_feedback.docs_clicked': {
  40. projects: string;
  41. };
  42. 'user_feedback.viewed': {
  43. projects: string;
  44. };
  45. };
  46. type CoreUIAnalyticsKey = keyof CoreUIEventParameters;
  47. export const coreUIEventMap: Record<CoreUIAnalyticsKey, string | null> = {
  48. 'number_drag_control.clicked': 'Number Drag Control: Clicked',
  49. 'page_filters.pin_click': 'Page Filters: Pin Button Clicked',
  50. 'user_feedback.docs_clicked': 'User Feedback Docs Clicked',
  51. 'user_feedback.dialog_opened': 'User Feedback Dialog Opened',
  52. 'user_feedback.viewed': null, // volume high
  53. 'dateselector.utc_changed': null, // volume high
  54. 'dateselector.time_changed': null, // volume high
  55. 'environmentselector.toggle': null, // volume high
  56. 'environmentselector.update': null, // volume high
  57. 'environmentselector.direct_selection': null, // volume high
  58. 'deprecated_urls.redirect': null, // volume high
  59. 'projectselector.bookmark_toggle': null, // volume high
  60. };