@@ -7,6 +7,7 @@ import {Button} from 'sentry/components/button';
7
7
import Link from 'sentry/components/links/link' ;
8
8
import { t } from 'sentry/locale' ;
9
9
import { space } from 'sentry/styles/space' ;
10
+ import { trackAnalytics } from 'sentry/utils/analytics' ;
10
11
import { DurationUnit , SizeUnit } from 'sentry/utils/discover/fields' ;
11
12
import { PageAlertProvider } from 'sentry/utils/performance/contexts/pageAlert' ;
12
13
import { decodeScalar } from 'sentry/utils/queryString' ;
@@ -33,7 +34,11 @@ import {Subtitle} from 'sentry/views/profiling/landing/styles';
33
34
import { computeAxisMax } from 'sentry/views/starfish/components/chart' ;
34
35
import DetailPanel from 'sentry/views/starfish/components/detailPanel' ;
35
36
import { useSpanMetricsSeries } from 'sentry/views/starfish/queries/useDiscoverSeries' ;
36
- import { SpanIndexedField , type SpanMetricsResponse } from 'sentry/views/starfish/types' ;
37
+ import {
38
+ ModuleName ,
39
+ SpanIndexedField ,
40
+ type SpanMetricsResponse ,
41
+ } from 'sentry/views/starfish/types' ;
37
42
import { useSampleScatterPlotSeries } from 'sentry/views/starfish/views/spanSummaryPage/sampleList/durationChart/useSampleScatterPlotSeries' ;
38
43
39
44
export function MessageSamplesPanel ( ) {
@@ -254,7 +259,15 @@ export function MessageSamplesPanel() {
254
259
</ ModuleLayout . Full >
255
260
256
261
< ModuleLayout . Full >
257
- < Button onClick = { ( ) => refetchDurationSpanSamples ( ) } >
262
+ < Button
263
+ onClick = { ( ) => {
264
+ trackAnalytics (
265
+ 'performance_views.sample_spans.try_different_samples_clicked' ,
266
+ { organization, source : ModuleName . QUEUE }
267
+ ) ;
268
+ refetchDurationSpanSamples ( ) ;
269
+ } }
270
+ >
258
271
{ t ( 'Try Different Samples' ) }
259
272
</ Button >
260
273
</ ModuleLayout . Full >
0 commit comments