performanceAnalyticsEvents.tsx 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. export type PerformanceEventParameters = {
  10. 'performance_views.create_sample_transaction': SampleTransactionParam;
  11. 'performance_views.landingv2.transactions.sort': {
  12. direction?: string;
  13. field?: string;
  14. };
  15. 'performance_views.landingv3.batch_queries': {
  16. num_collected: number;
  17. num_saved: number;
  18. num_sent: number;
  19. };
  20. 'performance_views.landingv3.display_change': {
  21. change_to_display: string;
  22. current_display: string;
  23. default_display: string;
  24. is_default: boolean;
  25. };
  26. 'performance_views.landingv3.widget.interaction': {
  27. widget_type?: string;
  28. };
  29. 'performance_views.landingv3.widget.switch': {
  30. from_default?: boolean;
  31. from_widget?: string;
  32. to_widget?: string;
  33. };
  34. 'performance_views.overview.cellaction': {action?: string};
  35. 'performance_views.overview.navigate.summary': {};
  36. 'performance_views.overview.search': {};
  37. 'performance_views.overview.view': {
  38. show_onboarding: boolean;
  39. };
  40. 'performance_views.spans.change_op': {
  41. operation_name?: string;
  42. };
  43. 'performance_views.spans.change_sort': {
  44. sort_column?: string;
  45. };
  46. 'performance_views.tour.advance': PerformanceTourParams;
  47. 'performance_views.tour.close': PerformanceTourParams;
  48. 'performance_views.tour.start': {};
  49. };
  50. export type PerformanceEventKey = keyof PerformanceEventParameters;
  51. export const performanceEventMap: Record<PerformanceEventKey, string | null> = {
  52. 'performance_views.create_sample_transaction': 'Growth: Performance Sample Transaction',
  53. 'performance_views.tour.start': 'Performance Views: Tour Start',
  54. 'performance_views.tour.advance': 'Performance Views: Tour Advance',
  55. 'performance_views.tour.close': 'Performance Views: Tour Close',
  56. 'performance_views.landingv2.transactions.sort':
  57. 'Performance Views: Landing Transactions Sorted',
  58. 'performance_views.overview.navigate.summary':
  59. 'Performance Views: Overview view summary',
  60. 'performance_views.overview.cellaction': 'Performance Views: Cell Action Clicked',
  61. 'performance_views.landingv3.widget.interaction':
  62. 'Performance Views: Landing Widget Interaction',
  63. 'performance_views.landingv3.widget.switch':
  64. 'Performance Views: Landing Widget Switched',
  65. 'performance_views.landingv3.batch_queries':
  66. 'Performance Views: Landing Query Batching',
  67. 'performance_views.landingv3.display_change': 'Performance Views: Switch Landing Tabs',
  68. 'performance_views.spans.change_op': 'Performance Views: Change span operation name',
  69. 'performance_views.spans.change_sort': 'Performance Views: Change span sort column',
  70. 'performance_views.overview.view': 'Performance Views: Transaction overview view',
  71. 'performance_views.overview.search': 'Performance Views: Transaction overview search',
  72. };