performanceAnalyticsEvents.tsx 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. import {PlatformKey} from 'sentry/data/platformCategories';
  2. type SampleTransactionParam = {
  3. platform?: PlatformKey;
  4. };
  5. type PerformanceTourParams = {
  6. duration: number;
  7. step: number;
  8. };
  9. type PageLayoutParams = {
  10. project_platforms: string;
  11. };
  12. export type PerformanceEventParameters = {
  13. 'performance_views.all_events.open_in_discover': {};
  14. 'performance_views.anomalies.anomalies_tab_clicked': PageLayoutParams;
  15. 'performance_views.create_sample_transaction': SampleTransactionParam;
  16. 'performance_views.event_details.anchor_span': {
  17. span_id: string;
  18. };
  19. 'performance_views.event_details.filter_by_op': {
  20. operation: string;
  21. };
  22. 'performance_views.event_details.json_button_click': {};
  23. 'performance_views.event_details.open_span_details': {
  24. operation: string;
  25. project_platform: string;
  26. };
  27. 'performance_views.event_details.search_query': {};
  28. 'performance_views.events.events_tab_clicked': PageLayoutParams;
  29. 'performance_views.filter_dropdown.selection': {
  30. action: string;
  31. };
  32. 'performance_views.landingv2.transactions.sort': {
  33. direction?: string;
  34. field?: string;
  35. };
  36. 'performance_views.landingv3.batch_queries': {
  37. num_collected: number;
  38. num_saved: number;
  39. num_sent: number;
  40. };
  41. 'performance_views.landingv3.display_change': {
  42. change_to_display: string;
  43. current_display: string;
  44. default_display: string;
  45. is_default: boolean;
  46. };
  47. 'performance_views.landingv3.table_pagination': {
  48. direction: string;
  49. };
  50. 'performance_views.landingv3.widget.interaction': {
  51. widget_type?: string;
  52. };
  53. 'performance_views.landingv3.widget.switch': {
  54. is_new_menu: boolean;
  55. from_default?: boolean;
  56. from_widget?: string;
  57. to_widget?: string;
  58. };
  59. 'performance_views.mep.metrics_outcome': {
  60. fallback_from_null: boolean;
  61. fallback_from_unparam: boolean;
  62. is_on_metrics: boolean;
  63. };
  64. 'performance_views.overview.cellaction': {action?: string};
  65. 'performance_views.overview.navigate.summary': {
  66. project_platforms: string;
  67. };
  68. 'performance_views.overview.search': {};
  69. 'performance_views.project_transaction_threshold.change': {
  70. from: string;
  71. key: string;
  72. to: string;
  73. };
  74. 'performance_views.project_transaction_threshold.clear': {};
  75. 'performance_views.relative_breakdown.selection': {
  76. action: string;
  77. };
  78. 'performance_views.span_summary.change_chart': {
  79. change_to_display: string;
  80. };
  81. 'performance_views.spans.change_op': {
  82. operation_name?: string;
  83. };
  84. 'performance_views.spans.change_sort': {
  85. sort_column?: string;
  86. };
  87. 'performance_views.spans.spans_tab_clicked': PageLayoutParams;
  88. 'performance_views.summary.tag_explorer.cell_action': {};
  89. 'performance_views.summary.tag_explorer.change_page': {};
  90. 'performance_views.summary.tag_explorer.sort': {
  91. direction?: string;
  92. field?: string;
  93. };
  94. 'performance_views.summary.tag_explorer.tag_value': {};
  95. 'performance_views.summary.tag_explorer.visit_tag_key': {};
  96. 'performance_views.tags.change_aggregate_column': {
  97. value: string;
  98. };
  99. 'performance_views.tags.change_tag': {
  100. from_tag: string;
  101. is_other_tag: boolean;
  102. to_tag: string;
  103. };
  104. 'performance_views.tags.jump_to_release': {};
  105. 'performance_views.tags.tags_tab_clicked': PageLayoutParams;
  106. 'performance_views.team_key_transaction.set': {
  107. action: string;
  108. };
  109. 'performance_views.tour.advance': PerformanceTourParams;
  110. 'performance_views.tour.close': PerformanceTourParams;
  111. 'performance_views.tour.start': {};
  112. 'performance_views.trace_view.open_in_discover': {};
  113. 'performance_views.trace_view.open_transaction_details': {
  114. operation: string;
  115. transaction: string;
  116. };
  117. 'performance_views.trace_view.view': {};
  118. 'performance_views.transaction_summary.change_chart_display': {
  119. from_chart: string;
  120. to_chart: string;
  121. };
  122. 'performance_views.transaction_summary.status_breakdown_click': {
  123. status: string;
  124. };
  125. 'performance_views.transaction_summary.view': {};
  126. 'performance_views.trends.change_duration': {
  127. value: string;
  128. widget_type: string;
  129. };
  130. 'performance_views.trends.widget_interaction': {
  131. widget_type: string;
  132. };
  133. 'performance_views.trends.widget_pagination': {
  134. direction: string;
  135. widget_type: string;
  136. };
  137. 'performance_views.vital_detail.switch_vital': {
  138. from_vital: string;
  139. to_vital: string;
  140. };
  141. 'performance_views.vital_detail.view': {
  142. project_platforms: string;
  143. };
  144. 'performance_views.vitals.vitals_tab_clicked': PageLayoutParams;
  145. };
  146. export type PerformanceEventKey = keyof PerformanceEventParameters;
  147. export const performanceEventMap: Record<PerformanceEventKey, string | null> = {
  148. 'performance_views.create_sample_transaction': 'Growth: Performance Sample Transaction',
  149. 'performance_views.tour.start': 'Performance Views: Tour Start',
  150. 'performance_views.tour.advance': 'Performance Views: Tour Advance',
  151. 'performance_views.tour.close': 'Performance Views: Tour Close',
  152. 'performance_views.landingv2.transactions.sort':
  153. 'Performance Views: Landing Transactions Sorted',
  154. 'performance_views.overview.navigate.summary':
  155. 'Performance Views: Overview view summary',
  156. 'performance_views.overview.cellaction': 'Performance Views: Cell Action Clicked',
  157. 'performance_views.landingv3.widget.interaction':
  158. 'Performance Views: Landing Widget Interaction',
  159. 'performance_views.landingv3.widget.switch':
  160. 'Performance Views: Landing Widget Switched',
  161. 'performance_views.landingv3.batch_queries':
  162. 'Performance Views: Landing Query Batching',
  163. 'performance_views.landingv3.display_change': 'Performance Views: Switch Landing Tabs',
  164. 'performance_views.landingv3.table_pagination':
  165. 'Performance Views: Landing Page Transactions Table Page Changed',
  166. 'performance_views.span_summary.change_chart':
  167. 'Performance Views: Span Summary displayed chart changed',
  168. 'performance_views.spans.change_op': 'Performance Views: Change span operation name',
  169. 'performance_views.spans.change_sort': 'Performance Views: Change span sort column',
  170. 'performance_views.summary.tag_explorer.tag_value':
  171. 'Performance Views: Tag Explorer Value Clicked',
  172. 'performance_views.summary.tag_explorer.cell_action':
  173. 'Performance Views: Tag Explorer Cell Action Clicked',
  174. 'performance_views.summary.tag_explorer.visit_tag_key':
  175. 'Performance Views: Tag Explorer - Visit Tag Key',
  176. 'performance_views.summary.tag_explorer.change_page':
  177. 'Performance Views: Tag Explorer Change Page',
  178. 'performance_views.summary.tag_explorer.sort': 'Performance Views: Tag Explorer Sorted',
  179. 'performance_views.overview.search': 'Performance Views: Transaction overview search',
  180. 'performance_views.project_transaction_threshold.change':
  181. 'Project Transaction Threshold: Changed',
  182. 'performance_views.project_transaction_threshold.clear':
  183. 'Project Transaction Threshold: Cleared',
  184. 'performance_views.vital_detail.view': 'Performance Views: Vital Detail viewed',
  185. 'performance_views.vital_detail.switch_vital':
  186. 'Performance Views: Vital Detail vital type switched',
  187. 'performance_views.trace_view.view': 'Performance Views: Trace View viewed',
  188. 'performance_views.trace_view.open_in_discover':
  189. 'Performance Views: Trace View open in Discover button clicked',
  190. 'performance_views.trace_view.open_transaction_details':
  191. 'Performance Views: Trace View transaction details opened',
  192. 'performance_views.transaction_summary.change_chart_display':
  193. 'Performance Views: Transaction Summary chart display changed',
  194. 'performance_views.transaction_summary.status_breakdown_click':
  195. 'Performance Views: Transaction Summary status breakdown option clicked',
  196. 'performance_views.all_events.open_in_discover':
  197. 'Performance Views: All Events page open in Discover button clicked',
  198. 'performance_views.tags.change_aggregate_column':
  199. 'Performance Views: Tags page changed aggregate column',
  200. 'performance_views.tags.change_tag':
  201. 'Performance Views: Tags Page changed selected tag',
  202. 'performance_views.tags.jump_to_release':
  203. 'Performance Views: Tags Page link to release in table clicked',
  204. 'performance_views.team_key_transaction.set':
  205. 'Performance Views: Set Team Key Transaction',
  206. 'performance_views.trends.widget_interaction':
  207. 'Performance Views: Trends Widget Interaction',
  208. 'performance_views.trends.widget_pagination':
  209. 'Performance Views: Trends Widget Page Changed',
  210. 'performance_views.trends.change_duration':
  211. 'Performance Views: Trends Widget Duration Changed',
  212. 'performance_views.event_details.filter_by_op':
  213. 'Performance Views: Event Details page operation filter applied',
  214. 'performance_views.event_details.search_query':
  215. 'Performance Views: Event Details search query',
  216. 'performance_views.event_details.open_span_details':
  217. 'Performance Views: Event Details span details opened',
  218. 'performance_views.event_details.anchor_span':
  219. 'Performance Views: Event Details span anchored',
  220. 'performance_views.event_details.json_button_click':
  221. 'Performance Views: Event Details JSON button clicked',
  222. 'performance_views.transaction_summary.view':
  223. 'Performance Views: Transaction Summary View',
  224. 'performance_views.filter_dropdown.selection': 'Performance Views: Filter Dropdown',
  225. 'performance_views.relative_breakdown.selection':
  226. 'Performance Views: Select Relative Breakdown',
  227. 'performance_views.mep.metrics_outcome': 'Performance Views: Metrics Outcome',
  228. 'performance_views.vitals.vitals_tab_clicked': 'Performance Views: Vitals tab clicked',
  229. 'performance_views.tags.tags_tab_clicked': 'Performance Views: Tags tab clicked',
  230. 'performance_views.events.events_tab_clicked': 'Performance Views: Events tab clicked',
  231. 'performance_views.spans.spans_tab_clicked': 'Performance Views: Spans tab clicked',
  232. 'performance_views.anomalies.anomalies_tab_clicked':
  233. 'Performance Views: Anomalies tab clicked',
  234. };