performanceAnalyticsEvents.tsx 11 KB

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