issueAnalyticsEvents.tsx 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. type IssueStream = {
  2. group_id: string;
  3. tab: string;
  4. was_shown_suggestion: boolean;
  5. };
  6. export type IssueEventParameters = {
  7. 'event_cause.dismissed': {};
  8. 'event_cause.docs_clicked': {};
  9. 'event_cause.snoozed': {};
  10. 'event_cause.viewed': {
  11. platform?: string;
  12. project_id?: string;
  13. };
  14. 'inbox_tab.issue_clicked': {
  15. group_id: string;
  16. };
  17. 'issue.quick_trace_status': {
  18. is_performance_issue: boolean;
  19. status: string;
  20. };
  21. 'issue.search_sidebar_clicked': {};
  22. 'issue.shared_publicly': {};
  23. 'issue_details.performance.autogrouped_siblings_toggle': {};
  24. 'issue_details.performance.hidden_spans_expanded': {};
  25. 'issue_error_banner.viewed': {
  26. error_message: string[];
  27. error_type: string[];
  28. group?: string;
  29. platform?: string;
  30. };
  31. 'issue_group_details.tab.clicked': {
  32. tab: string;
  33. browser?: string;
  34. device?: string;
  35. os?: string;
  36. platform?: string;
  37. };
  38. 'issue_search.empty': {
  39. query: string;
  40. search_source: string;
  41. search_type: string;
  42. };
  43. 'issue_search.failed': {
  44. error: string;
  45. search_source: string;
  46. search_type: string;
  47. };
  48. 'issues_stream.issue_assigned': IssueStream & {
  49. assigned_type: string;
  50. did_assign_suggestion: boolean;
  51. assigned_suggestion_reason?: string;
  52. };
  53. 'issues_stream.issue_clicked': IssueStream;
  54. 'issues_stream.paginate': {
  55. direction: string;
  56. };
  57. 'issues_stream.realtime_clicked': {
  58. enabled: boolean;
  59. };
  60. 'issues_stream.sort_changed': {
  61. sort: string;
  62. };
  63. 'issues_tab.viewed': {
  64. num_issues: number;
  65. num_perf_issues: number;
  66. page: number;
  67. query: string;
  68. tab?: string;
  69. };
  70. 'quick_trace.connected_services': {
  71. projects: number;
  72. };
  73. 'quick_trace.dropdown.clicked': {
  74. node_key: string;
  75. };
  76. 'quick_trace.dropdown.clicked_extra': {
  77. node_key: string;
  78. };
  79. 'quick_trace.missing_service.dismiss': {
  80. platform: string;
  81. };
  82. 'quick_trace.missing_service.docs': {
  83. platform: string;
  84. };
  85. 'quick_trace.node.clicked': {
  86. node_key: string;
  87. };
  88. resolve_issue: {release: string};
  89. 'span_view.embedded_child.hide': {};
  90. 'span_view.embedded_child.show': {};
  91. 'tag.clicked': {
  92. is_clickable: boolean;
  93. };
  94. };
  95. export type IssueEventKey = keyof IssueEventParameters;
  96. export const issueEventMap: Record<IssueEventKey, string | null> = {
  97. 'event_cause.viewed': null, // send to main event store only due to high event volume
  98. 'event_cause.docs_clicked': 'Event Cause Docs Clicked',
  99. 'event_cause.snoozed': 'Event Cause Snoozed',
  100. 'event_cause.dismissed': 'Event Cause Dismissed',
  101. 'issue_error_banner.viewed': 'Issue Error Banner Viewed',
  102. 'issues_tab.viewed': 'Viewed Issues Tab', // high volume but send to our secondary event store anyways
  103. 'issue_search.failed': 'Issue Search: Failed',
  104. 'issue_search.empty': 'Issue Search: Empty',
  105. 'issue.search_sidebar_clicked': 'Issue Search Sidebar Clicked',
  106. 'inbox_tab.issue_clicked': 'Clicked Issue from Inbox Tab',
  107. 'issues_stream.realtime_clicked': 'Issues Stream: Realtime Clicked',
  108. 'issues_stream.issue_clicked': 'Clicked Issue from Issues Stream',
  109. 'issues_stream.issue_assigned': 'Assigned Issue from Issues Stream',
  110. 'issues_stream.sort_changed': 'Changed Sort on Issues Stream',
  111. 'issues_stream.paginate': 'Paginate Issues Stream',
  112. 'issue.shared_publicly': 'Issue Shared Publicly',
  113. resolve_issue: 'Resolve Issue',
  114. 'tag.clicked': 'Tag: Clicked',
  115. 'issue.quick_trace_status': 'Issue Quick Trace Status',
  116. 'quick_trace.missing_service.dismiss': 'Quick Trace: Missing Service Dismissed',
  117. 'quick_trace.missing_service.docs': 'Quick Trace: Missing Service Clicked',
  118. 'quick_trace.dropdown.clicked': 'Quick Trace: Dropdown clicked',
  119. 'quick_trace.dropdown.clicked_extra': 'Quick Trace: Dropdown clicked',
  120. 'quick_trace.node.clicked': 'Quick Trace: Node clicked',
  121. 'quick_trace.connected_services': 'Quick Trace: Connected Services',
  122. 'span_view.embedded_child.hide': 'Span View: Hide Embedded Transaction',
  123. 'span_view.embedded_child.show': 'Span View: Show Embedded Transaction',
  124. 'issue_group_details.tab.clicked': 'Issue Group Details: Header Tab Clicked',
  125. // Performance Issue specific events here
  126. 'issue_details.performance.autogrouped_siblings_toggle':
  127. 'Performance Issue Details: Autogrouped Siblings Toggled',
  128. 'issue_details.performance.hidden_spans_expanded':
  129. 'Performance Issue Details: Hidden Spans Expanded',
  130. };