Browse Source

ref(performance): remove unused analytics (#72545)

Remove unused performance analytics per
https://www.notion.so/sentry/Performance-Analytic-Events-31e3f362b11c4aa88472f4acbfa0a0cb
Kevin Liu 9 months ago
parent
commit
babf8c4c83

+ 0 - 32
static/app/utils/analytics/performanceAnalyticsEvents.tsx

@@ -19,25 +19,11 @@ type PageLayoutParams = {
 
 export type PerformanceEventParameters = {
   'performance_views.all_events.open_in_discover': {};
-  'performance_views.anomalies.anomalies_tab_clicked': PageLayoutParams;
   'performance_views.change_view': {
     project_platforms: string;
     view_name: string;
   };
   'performance_views.create_sample_transaction': SampleTransactionParam;
-  'performance_views.event_details.anchor_span': {
-    span_id: string;
-  };
-  'performance_views.event_details.filter_by_op': {
-    operation: string;
-  };
-  'performance_views.event_details.json_button_click': {};
-  'performance_views.event_details.open_span_details': {
-    operation: string;
-    origin: string;
-    project_platform: string;
-  };
-  'performance_views.event_details.search_query': {};
   'performance_views.events.events_tab_clicked': PageLayoutParams;
   'performance_views.filter_dropdown.selection': {
     action: string;
@@ -167,7 +153,6 @@ export type PerformanceEventParameters = {
     direction?: string;
     field?: string;
   };
-  'performance_views.summary.tag_explorer.tag_value': {};
   'performance_views.summary.tag_explorer.visit_tag_key': {};
   'performance_views.summary.view_in_transaction_events': {};
   'performance_views.tags.change_aggregate_column': {
@@ -244,7 +229,6 @@ export type PerformanceEventParameters = {
   };
   'performance_views.vitals.filter_changed': {value: string};
   'performance_views.vitals.open_all_events': {vital: string};
-  'performance_views.vitals.open_in_discover': {vital: string};
   'performance_views.vitals.reset_view': {};
   'performance_views.vitals.vitals_tab_clicked': PageLayoutParams;
 };
@@ -288,8 +272,6 @@ export const performanceEventMap: Record<PerformanceEventKey, string | null> = {
   'performance_views.spans.change_sort': 'Performance Views: Change span sort column',
   'performance_views.summary.create_alert_clicked':
     'Performance Views: Create alert clicked',
-  'performance_views.summary.tag_explorer.tag_value':
-    'Performance Views: Tag Explorer Value Clicked',
   'performance_views.summary.tag_explorer.cell_action':
     'Performance Views: Tag Explorer Cell Action Clicked',
   'performance_views.summary.tag_explorer.visit_tag_key':
@@ -334,16 +316,6 @@ export const performanceEventMap: Record<PerformanceEventKey, string | null> = {
     'Performance Views: Trends Widget Page Changed',
   'performance_views.trends.change_duration':
     'Performance Views: Trends Widget Duration Changed',
-  'performance_views.event_details.filter_by_op':
-    'Performance Views: Event Details page operation filter applied',
-  'performance_views.event_details.search_query':
-    'Performance Views: Event Details search query',
-  'performance_views.event_details.open_span_details':
-    'Performance Views: Event Details span details opened',
-  'performance_views.event_details.anchor_span':
-    'Performance Views: Event Details span anchored',
-  'performance_views.event_details.json_button_click':
-    'Performance Views: Event Details JSON button clicked',
   'performance_views.transactionEvents.cellaction':
     'Performance Views: Transaction Events Tab Cell Action Clicked',
   'performance_views.transactionEvents.sort':
@@ -362,8 +334,6 @@ export const performanceEventMap: Record<PerformanceEventKey, string | null> = {
   'performance_views.tags.tags_tab_clicked': 'Performance Views: Tags tab clicked',
   'performance_views.events.events_tab_clicked': 'Performance Views: Events tab clicked',
   'performance_views.spans.spans_tab_clicked': 'Performance Views: Spans tab clicked',
-  'performance_views.anomalies.anomalies_tab_clicked':
-    'Performance Views: Anomalies tab clicked',
   'performance_views.summary.view_in_transaction_events':
     'Performance Views: View in All Events from Transaction Summary',
   'performance_views.summary.open_issues':
@@ -373,8 +343,6 @@ export const performanceEventMap: Record<PerformanceEventKey, string | null> = {
   'performance_views.vitals.reset_view': 'Performance Views: Reset vitals view',
   'performance_views.trends.change_parameter': 'Performance Views: Change Parameter',
   'performance_views.trends.change_function': 'Performance Views: Change Function',
-  'performance_views.vitals.open_in_discover':
-    'Performance Views: Open vitals in discover',
   'performance_views.vitals.open_all_events':
     'Performance Views: Open vitals in all events',
   'performance_views.landing.table.unparameterized':

+ 1 - 3
static/app/views/performance/transactionSummary/pageLayout.tsx

@@ -46,15 +46,13 @@ type TabEvents =
   | 'performance_views.vitals.vitals_tab_clicked'
   | 'performance_views.tags.tags_tab_clicked'
   | 'performance_views.events.events_tab_clicked'
-  | 'performance_views.spans.spans_tab_clicked'
-  | 'performance_views.anomalies.anomalies_tab_clicked';
+  | 'performance_views.spans.spans_tab_clicked';
 
 const TAB_ANALYTICS: Partial<Record<Tab, TabEvents>> = {
   [Tab.WEB_VITALS]: 'performance_views.vitals.vitals_tab_clicked',
   [Tab.TAGS]: 'performance_views.tags.tags_tab_clicked',
   [Tab.EVENTS]: 'performance_views.events.events_tab_clicked',
   [Tab.SPANS]: 'performance_views.spans.spans_tab_clicked',
-  [Tab.ANOMALIES]: 'performance_views.anomalies.anomalies_tab_clicked',
 };
 
 export type ChildProps = {

+ 0 - 5
static/app/views/performance/transactionSummary/transactionOverview/tagExplorer.tsx

@@ -266,11 +266,6 @@ export class TagExplorer extends Component<Props> {
   };
 
   handleTagValueClick = (location: Location, tagKey: string, tagValue: string) => {
-    const {organization} = this.props;
-    trackAnalytics('performance_views.summary.tag_explorer.tag_value', {
-      organization,
-    });
-
     const queryString = decodeScalar(location.query.query);
     const conditions = new MutableSearch(queryString ?? '');
 

+ 0 - 9
static/app/views/performance/transactionSummary/transactionVitals/vitalCard.tsx

@@ -119,15 +119,6 @@ class VitalCard extends Component<Props, State> {
     return {...prevState};
   }
 
-  trackOpenInDiscoverClicked = () => {
-    const {organization} = this.props;
-    const {vitalDetails: vital} = this.props;
-    trackAnalytics('performance_views.vitals.open_in_discover', {
-      organization,
-      vital: vital.slug,
-    });
-  };
-
   trackOpenAllEventsClicked = () => {
     const {organization} = this.props;
     const {vitalDetails: vital} = this.props;