|
@@ -17,6 +17,7 @@ import {IconArrow, IconProfiling} from 'sentry/icons';
|
|
|
import {t} from 'sentry/locale';
|
|
|
import {space} from 'sentry/styles/space';
|
|
|
import type {MRI} from 'sentry/types';
|
|
|
+import {trackAnalytics} from 'sentry/utils/analytics';
|
|
|
import {getDuration} from 'sentry/utils/formatters';
|
|
|
import {getMetricsCorrelationSpanUrl} from 'sentry/utils/metrics';
|
|
|
import type {MetricCorrelation, SelectionRange} from 'sentry/utils/metrics/types';
|
|
@@ -86,6 +87,13 @@ export function SampleTable({
|
|
|
// We only want to show the first 10 correlations
|
|
|
.slice(0, 10) as MetricCorrelation[];
|
|
|
|
|
|
+ function trackClick(target: 'event-id' | 'transaction' | 'trace-id' | 'profile') {
|
|
|
+ trackAnalytics('ddm.sample-table-interaction', {
|
|
|
+ organization,
|
|
|
+ target,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
function renderHeadCell(col: Column) {
|
|
|
if (col.key === 'profileId') {
|
|
|
return <AlignCenter>{col.name}</AlignCenter>;
|
|
@@ -125,6 +133,7 @@ export function SampleTable({
|
|
|
row.transactionId,
|
|
|
row.transactionSpanId
|
|
|
)}
|
|
|
+ onClick={() => trackClick('event-id')}
|
|
|
target="_blank"
|
|
|
>
|
|
|
{row.transactionId.slice(0, 8)}
|
|
@@ -152,6 +161,7 @@ export function SampleTable({
|
|
|
referrer: 'metrics',
|
|
|
})}`
|
|
|
)}
|
|
|
+ onClick={() => trackClick('transaction')}
|
|
|
>
|
|
|
{row.segmentName}
|
|
|
</Link>
|
|
@@ -182,6 +192,7 @@ export function SampleTable({
|
|
|
to={normalizeUrl(
|
|
|
`/organizations/${organization.slug}/performance/trace/${row.traceId}/`
|
|
|
)}
|
|
|
+ onClick={() => trackClick('trace-id')}
|
|
|
>
|
|
|
{row.traceId.slice(0, 8)}
|
|
|
</Link>
|
|
@@ -251,6 +262,7 @@ export function SampleTable({
|
|
|
to={normalizeUrl(
|
|
|
`/organizations/${organization.slug}/profiling/profile/${project?.slug}/${row.profileId}/flamegraph/`
|
|
|
)}
|
|
|
+ onClick={() => trackClick('profile')}
|
|
|
size="xs"
|
|
|
>
|
|
|
<IconProfiling size="xs" />
|