Skip to content

Commit

Permalink
add analytics to screen load sample panel
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinL10 committed May 15, 2024
1 parent bc70678 commit 168d3af
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {Tooltip} from 'sentry/components/tooltip';
import {t, tct} from 'sentry/locale';
import type {NewQuery} from 'sentry/types/organization';
import type {Project} from 'sentry/types/project';
import {trackAnalytics} from 'sentry/utils/analytics';
import {browserHistory} from 'sentry/utils/browserHistory';
import type {TableDataRow} from 'sentry/utils/discover/discoverQuery';
import type {MetaType} from 'sentry/utils/discover/eventView';
Expand Down Expand Up @@ -46,7 +47,7 @@ import {
} from 'sentry/views/starfish/components/releaseSelector';
import {OverflowEllipsisTextContainer} from 'sentry/views/starfish/components/textAlign';
import {useTTFDConfigured} from 'sentry/views/starfish/queries/useHasTtfdConfigured';
import {SpanMetricsField} from 'sentry/views/starfish/types';
import {ModuleName, SpanMetricsField} from 'sentry/views/starfish/types';
import {STARFISH_CHART_INTERVAL_FIDELITY} from 'sentry/views/starfish/utils/constants';
import {appendReleaseFilters} from 'sentry/views/starfish/utils/releaseComparison';
import {QueryParameterNames} from 'sentry/views/starfish/views/queryParameters';
Expand Down Expand Up @@ -180,7 +181,15 @@ export function ScreenLoadSpansTable({
};

return (
<Link to={`${pathname}?${qs.stringify(query)}`}>
<Link
onClick={() =>
trackAnalytics('performance_views.sample_spans.opened', {
organization,
source: ModuleName.SCREEN,
})
}
to={`${pathname}?${qs.stringify(query)}`}
>
<OverflowEllipsisTextContainer>{label}</OverflowEllipsisTextContainer>
</Link>
);
Expand Down

0 comments on commit 168d3af

Please sign in to comment.