performanceAnalyticsEvents.tsx 13 KB

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