performanceAnalyticsEvents.tsx 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. // This file contains the analytic events for the performance landing page.
  2. // The analytic events for the insights modules are stored separately in
  3. // analytics/insightAnalyticsEvents.tsx
  4. import type {FieldValue} from 'sentry/components/forms/model';
  5. import type {Organization, PlatformKey} from 'sentry/types';
  6. type SampleTransactionParam = {
  7. platform?: PlatformKey;
  8. };
  9. type PerformanceTourParams = {
  10. duration: number;
  11. step: number;
  12. };
  13. type PageLayoutParams = {
  14. project_platforms: string;
  15. };
  16. export type PerformanceEventParameters = {
  17. 'performance_views.all_events.open_in_discover': {};
  18. 'performance_views.anomalies.anomalies_tab_clicked': PageLayoutParams;
  19. 'performance_views.change_view': {
  20. project_platforms: string;
  21. view_name: string;
  22. };
  23. 'performance_views.create_sample_transaction': SampleTransactionParam;
  24. 'performance_views.event_details.anchor_span': {
  25. span_id: string;
  26. };
  27. 'performance_views.event_details.filter_by_op': {
  28. operation: string;
  29. };
  30. 'performance_views.event_details.json_button_click': {};
  31. 'performance_views.event_details.open_span_details': {
  32. operation: string;
  33. origin: string;
  34. project_platform: string;
  35. };
  36. 'performance_views.event_details.search_query': {};
  37. 'performance_views.events.events_tab_clicked': PageLayoutParams;
  38. 'performance_views.filter_dropdown.selection': {
  39. action: string;
  40. };
  41. 'performance_views.landing.table.seen': {};
  42. 'performance_views.landing.table.unparameterized': {
  43. first_event: 'none' | '14d' | '30d' | '>30d';
  44. hit_multi_project_cap: boolean;
  45. sent_transaction: boolean;
  46. single_project: boolean;
  47. stats_period: string;
  48. };
  49. 'performance_views.landingv2.display.filter_change': {
  50. field: string;
  51. max_value: number;
  52. min_value: number;
  53. };
  54. 'performance_views.landingv2.transactions.sort': {
  55. direction?: string;
  56. field?: string;
  57. };
  58. 'performance_views.landingv3.batch_queries': {
  59. num_collected: number;
  60. num_saved: number;
  61. num_sent: number;
  62. };
  63. 'performance_views.landingv3.display_change': {
  64. change_to_display: string;
  65. current_display: string;
  66. default_display: string;
  67. is_default: boolean;
  68. };
  69. 'performance_views.landingv3.table_pagination': {
  70. direction: string;
  71. };
  72. 'performance_views.landingv3.widget.interaction': {
  73. widget_type?: string;
  74. };
  75. 'performance_views.landingv3.widget.switch': {
  76. is_new_menu: boolean;
  77. from_default?: boolean;
  78. from_widget?: string;
  79. to_widget?: string;
  80. };
  81. 'performance_views.mep.metrics_outcome': {
  82. fallback_from_null: boolean;
  83. fallback_from_unparam: boolean;
  84. is_on_metrics: boolean;
  85. };
  86. 'performance_views.overview.cellaction': {action?: string};
  87. 'performance_views.overview.change_chart': {
  88. metric: string;
  89. };
  90. 'performance_views.overview.navigate.summary': {
  91. project_platforms: string;
  92. };
  93. 'performance_views.overview.search': {};
  94. 'performance_views.performance_change_explorer.function_link_clicked': {
  95. function: string;
  96. package: string;
  97. profile_id: string;
  98. transaction: string;
  99. };
  100. 'performance_views.performance_change_explorer.open': {
  101. transaction: string;
  102. };
  103. 'performance_views.performance_change_explorer.span_link_clicked': {
  104. group: string;
  105. op: string;
  106. transaction: string;
  107. };
  108. 'performance_views.performance_change_explorer.summary_link_clicked': {
  109. transaction: string;
  110. };
  111. 'performance_views.project_issue_detection_threshold_changed': {
  112. organization: Organization;
  113. project_slug: string;
  114. threshold_key: string;
  115. threshold_value: number;
  116. };
  117. 'performance_views.project_issue_detection_thresholds_reset': {
  118. organization: Organization;
  119. project_slug: string;
  120. };
  121. 'performance_views.project_transaction_threshold.change': {
  122. from: string;
  123. key: string;
  124. to: string;
  125. };
  126. 'performance_views.project_transaction_threshold.clear': {};
  127. 'performance_views.relative_breakdown.selection': {
  128. action: string;
  129. };
  130. 'performance_views.sample_spans.filter_updated': {
  131. filter: string;
  132. new_state: FieldValue;
  133. organization: Organization;
  134. source: string;
  135. };
  136. 'performance_views.sample_spans.opened': {
  137. organization: Organization;
  138. source: string;
  139. };
  140. 'performance_views.sample_spans.span_clicked': {
  141. organization: Organization;
  142. source: string;
  143. };
  144. 'performance_views.sample_spans.try_different_samples_clicked': {
  145. organization: Organization;
  146. source: string;
  147. };
  148. 'performance_views.span_summary.change_chart': {
  149. change_to_display: string;
  150. };
  151. 'performance_views.spans.change_op': {
  152. operation_name?: string;
  153. };
  154. 'performance_views.spans.change_sort': {
  155. sort_column?: string;
  156. };
  157. 'performance_views.spans.spans_tab_clicked': PageLayoutParams;
  158. 'performance_views.summary.create_alert_clicked': {};
  159. 'performance_views.summary.open_issues': {};
  160. 'performance_views.summary.tag_explorer.cell_action': {};
  161. 'performance_views.summary.tag_explorer.change_page': {};
  162. 'performance_views.summary.tag_explorer.sort': {
  163. direction?: string;
  164. field?: string;
  165. };
  166. 'performance_views.summary.tag_explorer.tag_value': {};
  167. 'performance_views.summary.tag_explorer.visit_tag_key': {};
  168. 'performance_views.summary.view_in_transaction_events': {};
  169. 'performance_views.tags.change_aggregate_column': {
  170. value: string;
  171. };
  172. 'performance_views.tags.change_tag': {
  173. from_tag: string;
  174. is_other_tag: boolean;
  175. to_tag: string;
  176. };
  177. 'performance_views.tags.interaction': {};
  178. 'performance_views.tags.jump_to_release': {};
  179. 'performance_views.tags.tags_tab_clicked': PageLayoutParams;
  180. 'performance_views.team_key_transaction.set': {
  181. action: string;
  182. };
  183. 'performance_views.tour.advance': PerformanceTourParams;
  184. 'performance_views.tour.close': PerformanceTourParams;
  185. 'performance_views.tour.start': {};
  186. 'performance_views.trace_view.open_in_discover': {};
  187. 'performance_views.trace_view.open_transaction_details': {
  188. operation: string;
  189. transaction: string;
  190. };
  191. 'performance_views.trace_view.view': {};
  192. 'performance_views.trace_view_v1_page_load': {
  193. organization: Organization;
  194. source: string;
  195. };
  196. 'performance_views.transactionEvents.cellaction': {
  197. action: string;
  198. };
  199. 'performance_views.transactionEvents.display_filter_dropdown.selection': {
  200. action: string;
  201. };
  202. 'performance_views.transactionEvents.ops_filter_dropdown.selection': {
  203. action: string;
  204. };
  205. 'performance_views.transactionEvents.sort': {
  206. direction?: string;
  207. field?: string;
  208. };
  209. 'performance_views.transaction_summary.change_chart_display': {
  210. from_chart: string;
  211. to_chart: string;
  212. };
  213. 'performance_views.transaction_summary.status_breakdown_click': {
  214. status: string;
  215. };
  216. 'performance_views.transaction_summary.view': {};
  217. 'performance_views.trends.change_duration': {
  218. value: string;
  219. widget_type: string;
  220. };
  221. 'performance_views.trends.change_function': {
  222. function_name: string;
  223. };
  224. 'performance_views.trends.change_parameter': {
  225. parameter_name: string;
  226. };
  227. 'performance_views.trends.widget_interaction': {
  228. widget_type: string;
  229. };
  230. 'performance_views.trends.widget_pagination': {
  231. direction: string;
  232. widget_type: string;
  233. };
  234. 'performance_views.vital_detail.switch_vital': {
  235. from_vital: string;
  236. to_vital: string;
  237. };
  238. 'performance_views.vital_detail.view': {
  239. project_platforms: string;
  240. };
  241. 'performance_views.vitals.filter_changed': {value: string};
  242. 'performance_views.vitals.open_all_events': {vital: string};
  243. 'performance_views.vitals.open_in_discover': {vital: string};
  244. 'performance_views.vitals.reset_view': {};
  245. 'performance_views.vitals.vitals_tab_clicked': PageLayoutParams;
  246. };
  247. export type PerformanceEventKey = keyof PerformanceEventParameters;
  248. export const performanceEventMap: Record<PerformanceEventKey, string | null> = {
  249. 'performance_views.create_sample_transaction': 'Growth: Performance Sample Transaction',
  250. 'performance_views.tour.start': 'Performance Views: Tour Start',
  251. 'performance_views.tour.advance': 'Performance Views: Tour Advance',
  252. 'performance_views.tour.close': 'Performance Views: Tour Close',
  253. 'performance_views.change_view': 'Performance Views: Change View',
  254. 'performance_views.landingv2.transactions.sort':
  255. 'Performance Views: Landing Transactions Sorted',
  256. 'performance_views.landingv2.display.filter_change':
  257. 'Performance Views: Landing v2 Display Filter Change',
  258. 'performance_views.overview.navigate.summary':
  259. 'Performance Views: Overview view summary',
  260. 'performance_views.overview.cellaction': 'Performance Views: Cell Action Clicked',
  261. 'performance_views.landingv3.widget.interaction':
  262. 'Performance Views: Landing Widget Interaction',
  263. 'performance_views.landingv3.widget.switch':
  264. 'Performance Views: Landing Widget Switched',
  265. 'performance_views.trace_view_v1_page_load':
  266. 'Performance Views: Trace View v1 Page Load',
  267. 'performance_views.landingv3.batch_queries':
  268. 'Performance Views: Landing Query Batching',
  269. 'performance_views.landingv3.display_change': 'Performance Views: Switch Landing Tabs',
  270. 'performance_views.landingv3.table_pagination':
  271. 'Performance Views: Landing Page Transactions Table Page Changed',
  272. 'performance_views.overview.change_chart': 'Performance Views: Change Overview Chart',
  273. 'performance_views.sample_spans.opened': 'Performance Views: Sample spans panel opened',
  274. 'performance_views.sample_spans.span_clicked': 'Performance Views: Sample span clicked',
  275. 'performance_views.sample_spans.try_different_samples_clicked':
  276. 'Performance Views: Try Different Samples clicked',
  277. 'performance_views.sample_spans.filter_updated':
  278. 'Performance Views: Sample spans panel filter updated',
  279. 'performance_views.span_summary.change_chart':
  280. 'Performance Views: Span Summary displayed chart changed',
  281. 'performance_views.spans.change_op': 'Performance Views: Change span operation name',
  282. 'performance_views.spans.change_sort': 'Performance Views: Change span sort column',
  283. 'performance_views.summary.create_alert_clicked':
  284. 'Performance Views: Create alert clicked',
  285. 'performance_views.summary.tag_explorer.tag_value':
  286. 'Performance Views: Tag Explorer Value Clicked',
  287. 'performance_views.summary.tag_explorer.cell_action':
  288. 'Performance Views: Tag Explorer Cell Action Clicked',
  289. 'performance_views.summary.tag_explorer.visit_tag_key':
  290. 'Performance Views: Tag Explorer - Visit Tag Key',
  291. 'performance_views.summary.tag_explorer.change_page':
  292. 'Performance Views: Tag Explorer Change Page',
  293. 'performance_views.summary.tag_explorer.sort': 'Performance Views: Tag Explorer Sorted',
  294. 'performance_views.overview.search': 'Performance Views: Transaction overview search',
  295. 'performance_views.project_transaction_threshold.change':
  296. 'Project Transaction Threshold: Changed',
  297. 'performance_views.project_issue_detection_threshold_changed':
  298. 'Performance Views: Changed detector threshold of an issue for a project',
  299. 'performance_views.project_issue_detection_thresholds_reset':
  300. 'Performance Views: Reset the detector thresholds of an issue for a project',
  301. 'performance_views.project_transaction_threshold.clear':
  302. 'Project Transaction Threshold: Cleared',
  303. 'performance_views.vital_detail.view': 'Performance Views: Vital Detail viewed',
  304. 'performance_views.vital_detail.switch_vital':
  305. 'Performance Views: Vital Detail vital type switched',
  306. 'performance_views.trace_view.view': 'Performance Views: Trace View viewed',
  307. 'performance_views.trace_view.open_in_discover':
  308. 'Performance Views: Trace View open in Discover button clicked',
  309. 'performance_views.trace_view.open_transaction_details':
  310. 'Performance Views: Trace View transaction details opened',
  311. 'performance_views.transaction_summary.change_chart_display':
  312. 'Performance Views: Transaction Summary chart display changed',
  313. 'performance_views.transaction_summary.status_breakdown_click':
  314. 'Performance Views: Transaction Summary status breakdown option clicked',
  315. 'performance_views.all_events.open_in_discover':
  316. 'Performance Views: All Events page open in Discover button clicked',
  317. 'performance_views.tags.change_aggregate_column':
  318. 'Performance Views: Tags page changed aggregate column',
  319. 'performance_views.tags.change_tag':
  320. 'Performance Views: Tags Page changed selected tag',
  321. 'performance_views.tags.jump_to_release':
  322. 'Performance Views: Tags Page link to release in table clicked',
  323. 'performance_views.team_key_transaction.set':
  324. 'Performance Views: Set Team Key Transaction',
  325. 'performance_views.trends.widget_interaction':
  326. 'Performance Views: Trends Widget Interaction',
  327. 'performance_views.trends.widget_pagination':
  328. 'Performance Views: Trends Widget Page Changed',
  329. 'performance_views.trends.change_duration':
  330. 'Performance Views: Trends Widget Duration Changed',
  331. 'performance_views.event_details.filter_by_op':
  332. 'Performance Views: Event Details page operation filter applied',
  333. 'performance_views.event_details.search_query':
  334. 'Performance Views: Event Details search query',
  335. 'performance_views.event_details.open_span_details':
  336. 'Performance Views: Event Details span details opened',
  337. 'performance_views.event_details.anchor_span':
  338. 'Performance Views: Event Details span anchored',
  339. 'performance_views.event_details.json_button_click':
  340. 'Performance Views: Event Details JSON button clicked',
  341. 'performance_views.transactionEvents.cellaction':
  342. 'Performance Views: Transaction Events Tab Cell Action Clicked',
  343. 'performance_views.transactionEvents.sort':
  344. 'Performance Views: Transaction Events Tab Sorted',
  345. 'performance_views.transactionEvents.display_filter_dropdown.selection':
  346. 'Performance Views: Transaction Events Display Filter Dropdown',
  347. 'performance_views.transactionEvents.ops_filter_dropdown.selection':
  348. 'Performance Views: Transaction Events Ops Breakdown Filter Dropdown',
  349. 'performance_views.transaction_summary.view':
  350. 'Performance Views: Transaction Summary View',
  351. 'performance_views.filter_dropdown.selection': 'Performance Views: Filter Dropdown',
  352. 'performance_views.relative_breakdown.selection':
  353. 'Performance Views: Select Relative Breakdown',
  354. 'performance_views.mep.metrics_outcome': 'Performance Views: Metrics Outcome',
  355. 'performance_views.vitals.vitals_tab_clicked': 'Performance Views: Vitals tab clicked',
  356. 'performance_views.tags.tags_tab_clicked': 'Performance Views: Tags tab clicked',
  357. 'performance_views.events.events_tab_clicked': 'Performance Views: Events tab clicked',
  358. 'performance_views.spans.spans_tab_clicked': 'Performance Views: Spans tab clicked',
  359. 'performance_views.anomalies.anomalies_tab_clicked':
  360. 'Performance Views: Anomalies tab clicked',
  361. 'performance_views.summary.view_in_transaction_events':
  362. 'Performance Views: View in All Events from Transaction Summary',
  363. 'performance_views.summary.open_issues':
  364. 'Performance Views: Open issues from transaction summary',
  365. 'performance_views.tags.interaction': 'Performance Views: Tag Page - Interaction',
  366. 'performance_views.vitals.filter_changed': 'Performance Views: Change vitals filter',
  367. 'performance_views.vitals.reset_view': 'Performance Views: Reset vitals view',
  368. 'performance_views.trends.change_parameter': 'Performance Views: Change Parameter',
  369. 'performance_views.trends.change_function': 'Performance Views: Change Function',
  370. 'performance_views.vitals.open_in_discover':
  371. 'Performance Views: Open vitals in discover',
  372. 'performance_views.vitals.open_all_events':
  373. 'Performance Views: Open vitals in all events',
  374. 'performance_views.landing.table.unparameterized':
  375. 'Performance Views: Landing Page - Table Unparameterized',
  376. 'performance_views.landing.table.seen': 'Performance Views: Landing Page - Table Seen',
  377. 'performance_views.performance_change_explorer.function_link_clicked':
  378. 'Performance Views: Performance Change Explorer - Link to Function',
  379. 'performance_views.performance_change_explorer.open':
  380. 'Performance Views: Performance Change Explorer - Opened',
  381. 'performance_views.performance_change_explorer.span_link_clicked':
  382. 'Performance Views: Performance Change Explorer - Link to Span',
  383. 'performance_views.performance_change_explorer.summary_link_clicked':
  384. 'Performance Views: Performance Change Explorer - Link to Summary',
  385. };