Skip to content

Commit

Permalink
feat(new-trace): Removed unwanted analytics and updated analytics con… (
Browse files Browse the repository at this point in the history
#67443)

We don't want to be sending the wrong source for analytics from the new
view. Will be adding new analytics seperately.

Co-authored-by: Abdullah Khan <abdullahkhan@PG9Y57YDXQ.local>
  • Loading branch information
Abdkhan14 and Abdullah Khan committed Mar 21, 2024
1 parent 96a5851 commit 6330cb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
Expand Up @@ -22,7 +22,6 @@ import type {Organization} from 'sentry/types';
import type {EventTransaction} from 'sentry/types/event';
import {assert} from 'sentry/types/utils';
import {defined} from 'sentry/utils';
import {trackAnalytics} from 'sentry/utils/analytics';
import EventView from 'sentry/utils/discover/eventView';
import {generateEventSlug} from 'sentry/utils/discover/urls';
import getDynamicText from 'sentry/utils/getDynamicText';
Expand Down Expand Up @@ -105,19 +104,10 @@ function NewTraceDetailsSpanDetail(props: SpanDetailProps) {
);

useLayoutEffect(() => {
const {span, organization, event} = props;
if (!('op' in span)) {
if (!('op' in props.span)) {
return;
}

trackAnalytics('performance_views.event_details.open_span_details', {
organization,
operation: span.op ?? 'undefined',
origin: span.origin ?? 'undefined',
project_platform: event.platform ?? 'undefined',
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [props.span]);

function renderTraversalButton(): React.ReactNode {
if (!props.childTransactions) {
Expand Down
Expand Up @@ -181,14 +181,14 @@ function ReplaySection({
<ReplaySectionContainer>
<ReplaySectionTitle>{t('Session Replay')}</ReplaySectionTitle>
<ReplayClipPreview
analyticsContext="issue_details"
analyticsContext="trace-view"
replaySlug={replayId}
orgSlug={organization.slug}
eventTimestampMs={eventTimestampMs}
clipOffsets={REPLAY_CLIP_OFFSETS}
fullReplayButtonProps={{
analyticsEventKey: 'issue_details.open_replay_details_clicked',
analyticsEventName: 'Issue Details: Open Replay Details Clicked',
analyticsEventKey: 'trace-view.drawer-open-replay-details-clicked',
analyticsEventName: 'Trace View: Open Replay Details Clicked',
analyticsParams: {
...getAnalyticsDataForEvent(event),
organization,
Expand Down Expand Up @@ -300,11 +300,6 @@ export function TransactionNodeDetails({
icon={<IconOpen />}
href={`/api/0/projects/${organization.slug}/${node.value.project_slug}/events/${node.value.event_id}/json/`}
external
onClick={() =>
trackAnalytics('performance_views.event_details.json_button_click', {
organization,
})
}
>
{t('JSON')} (<FileSize bytes={event?.size} />)
</Button>
Expand Down

0 comments on commit 6330cb9

Please sign in to comment.