From 29502636197c8596321346caf2424c5a05aedb7b Mon Sep 17 00:00:00 2001 From: KevinL10 Date: Tue, 14 May 2024 16:26:41 -0400 Subject: [PATCH] add analytics to screen load sample panel --- .../mobile/screenload/screenLoadSpans/table.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/static/app/views/performance/mobile/screenload/screenLoadSpans/table.tsx b/static/app/views/performance/mobile/screenload/screenLoadSpans/table.tsx index 68b67d6b96ac6f..26bcefdcc63c43 100644 --- a/static/app/views/performance/mobile/screenload/screenLoadSpans/table.tsx +++ b/static/app/views/performance/mobile/screenload/screenLoadSpans/table.tsx @@ -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'; @@ -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'; @@ -180,7 +181,15 @@ export function ScreenLoadSpansTable({ }; return ( - + + trackAnalytics('performance_views.sample_spans.opened', { + organization, + source: ModuleName.SCREEN, + }) + } + to={`${pathname}?${qs.stringify(query)}`} + > {label} );