Browse Source

ref(analytics): removed old analytics (#47377)

This removes the last two legacy analytics function that went to BQ only
that are not being used
Stephen Cefali 1 year ago
parent
commit
fa943201cd

+ 0 - 31
static/app/utils/eventWaiter.tsx

@@ -3,25 +3,10 @@ import * as Sentry from '@sentry/react';
 
 import {Client} from 'sentry/api';
 import {Group, Organization, Project} from 'sentry/types';
-import {analytics} from 'sentry/utils/analytics';
 import withApi from 'sentry/utils/withApi';
 
 const DEFAULT_POLL_INTERVAL = 5000;
 
-const recordAnalyticsFirstEvent = ({
-  key,
-  organization,
-  project,
-}: {
-  key: 'first_event_recieved' | 'first_transaction_recieved' | 'first_replay_recieved';
-  organization: Organization;
-  project: Project;
-}) =>
-  analytics(`onboarding_v2.${key}`, {
-    org_id: parseInt(organization.id, 10),
-    project: String(project.id),
-  });
-
 /**
  * When no event has been received this will be set to null or false.
  * Otherwise it will be the Group of the issue that was received.
@@ -131,26 +116,10 @@ class EventWaiter extends Component<EventWaiterProps, EventWaiterState> {
 
       // The event may have expired, default to true
       firstIssue = issues.find((issue: Group) => issue.firstSeen === firstEvent) || true;
-
-      recordAnalyticsFirstEvent({
-        key: 'first_event_recieved',
-        organization,
-        project,
-      });
     } else if (eventType === 'transaction') {
       firstIssue = Boolean(firstEvent);
-      recordAnalyticsFirstEvent({
-        key: 'first_transaction_recieved',
-        organization,
-        project,
-      });
     } else if (eventType === 'replay') {
       firstIssue = Boolean(firstEvent);
-      recordAnalyticsFirstEvent({
-        key: 'first_replay_recieved',
-        organization,
-        project,
-      });
     }
 
     if (onIssueReceived) {

+ 0 - 13
static/app/views/projectDetail/projectLatestReleases.tsx

@@ -16,8 +16,6 @@ import {IconOpen} from 'sentry/icons';
 import {t} from 'sentry/locale';
 import {space} from 'sentry/styles/space';
 import {Organization, Release} from 'sentry/types';
-import {analytics} from 'sentry/utils/analytics';
-import {RELEASES_TOUR_STEPS} from 'sentry/views/releases/list/releasesPromo';
 
 import MissingReleasesButtons from './missingFeatureButtons/missingReleasesButtons';
 import {SectionHeadingLink, SectionHeadingWrapper, SidebarSection} from './styles';
@@ -109,17 +107,6 @@ class ProjectLatestReleases extends AsyncComponent<Props, State> {
     this.setState({hasOlderReleases, loading: false});
   }
 
-  handleTourAdvance = (index: number) => {
-    const {organization, projectId} = this.props;
-
-    analytics('releases.landing_card_clicked', {
-      org_id: parseInt(organization.id, 10),
-      project_id: projectId && parseInt(projectId, 10),
-      step_id: index,
-      step_title: RELEASES_TOUR_STEPS[index].title,
-    });
-  };
-
   get releasesLink() {
     const {organization} = this.props;