@@ -29,7 +29,6 @@ import {useProjectRawWebVitalsQuery} from 'sentry/views/insights/browser/webVita
29
29
import { getWebVitalScoresFromTableDataRow } from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/getWebVitalScoresFromTableDataRow' ;
30
30
import { useProjectWebVitalsScoresQuery } from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/useProjectWebVitalsScoresQuery' ;
31
31
import { useSpanSamplesCategorizedQuery } from 'sentry/views/insights/browser/webVitals/queries/useSpanSamplesCategorizedQuery' ;
32
- import { useTransactionSamplesCategorizedQuery } from 'sentry/views/insights/browser/webVitals/queries/useTransactionSamplesCategorizedQuery' ;
33
32
import type {
34
33
SpanSampleRowWithScore ,
35
34
TransactionSampleRowWithScore ,
@@ -38,7 +37,6 @@ import type {
38
37
import decodeBrowserTypes from 'sentry/views/insights/browser/webVitals/utils/queryParameterDecoders/browserType' ;
39
38
import useProfileExists from 'sentry/views/insights/browser/webVitals/utils/useProfileExists' ;
40
39
import { SampleDrawerBody } from 'sentry/views/insights/common/components/sampleDrawerBody' ;
41
- import { useInsightsEap } from 'sentry/views/insights/common/utils/useEap' ;
42
40
import { useDomainViewFilters } from 'sentry/views/insights/pages/useFilters' ;
43
41
import { SpanIndexedField , type SubregionCode } from 'sentry/views/insights/types' ;
44
42
import { TraceViewSources } from 'sentry/views/performance/newTraceDetails/traceHeader/breadcrumbs' ;
@@ -85,7 +83,6 @@ export function PageOverviewWebVitalsDetailPanel({
85
83
const routes = useRoutes ( ) ;
86
84
const { replayExists} = useReplayExists ( ) ;
87
85
const domainViewFilters = useDomainViewFilters ( ) ;
88
- const useEap = useInsightsEap ( ) ;
89
86
90
87
const browserTypes = decodeBrowserTypes ( location . query [ SpanIndexedField . BROWSER_NAME ] ) ;
91
88
const subregions = location . query [
@@ -124,24 +121,11 @@ export function PageOverviewWebVitalsDetailPanel({
124
121
125
122
const projectScore = getWebVitalScoresFromTableDataRow ( projectScoresData ?. [ 0 ] ) ;
126
123
127
- const { data : transactionsTableData , isLoading : isTransactionWebVitalsQueryLoading } =
128
- useTransactionSamplesCategorizedQuery ( {
129
- transaction : transaction ?? '' ,
130
- webVital,
131
- enabled :
132
- Boolean ( webVital ) &&
133
- ! useEap &&
134
- ( ! isInp || ( ! isSpansWebVital && useSpansWebVitals ) ) ,
135
- browserTypes,
136
- subregions,
137
- } ) ;
138
-
139
124
const { data : spansTableData , isLoading : isSpansLoading } =
140
125
useSpanSamplesCategorizedQuery ( {
141
126
transaction : transaction ?? '' ,
142
127
webVital,
143
- enabled :
144
- Boolean ( webVital ) && ( useEap || isInp || ( isSpansWebVital && useSpansWebVitals ) ) ,
128
+ enabled : Boolean ( webVital ) ,
145
129
browserTypes,
146
130
subregions,
147
131
} ) ;
@@ -150,10 +134,6 @@ export function PageOverviewWebVitalsDetailPanel({
150
134
spansTableData . filter ( row => row [ 'profile.id' ] ) . map ( row => row [ 'profile.id' ] )
151
135
) ;
152
136
153
- const getProjectSlug = ( row : TransactionSampleRowWithScore ) : string => {
154
- return project && ! Array . isArray ( location . query . project ) ? project . slug : row . project ;
155
- } ;
156
-
157
137
const renderHeadCell = ( col : Column ) => {
158
138
if ( col . key === 'transaction' ) {
159
139
return < NoOverflow > { col . name } </ NoOverflow > ;
@@ -192,99 +172,6 @@ export function PageOverviewWebVitalsDetailPanel({
192
172
return getDuration ( value / 1000 , 2 , true ) ;
193
173
} ;
194
174
195
- const renderBodyCell = ( col : Column , row : TransactionSampleRowWithScore ) => {
196
- const { key} = col ;
197
- const projectSlug = getProjectSlug ( row ) ;
198
- if ( key === 'score' ) {
199
- if ( row [ `measurements.${ webVital } ` as keyof typeof row ] !== undefined ) {
200
- return (
201
- < AlignCenter >
202
- < PerformanceBadge
203
- score = { row [ `${ webVital } Score` as keyof typeof row ] as number }
204
- />
205
- </ AlignCenter >
206
- ) ;
207
- }
208
- return null ;
209
- }
210
- if ( col . key === 'webVital' ) {
211
- // @ts -expect-error TS(2551): Property 'measurements.null' does not exist on typ... Remove this comment to see the full error message
212
- const value = row [ `measurements.${ webVital } ` ] ;
213
- if ( value === undefined ) {
214
- return (
215
- < AlignRight >
216
- < NoValue > { t ( '(no value)' ) } </ NoValue >
217
- </ AlignRight >
218
- ) ;
219
- }
220
- const formattedValue =
221
- webVital === 'cls' ? value ?. toFixed ( 2 ) : getFormattedDuration ( value ) ;
222
- return < AlignRight > { formattedValue } </ AlignRight > ;
223
- }
224
- if ( key === 'id' ) {
225
- const eventTarget = generateLinkToEventInTraceView ( {
226
- eventId : row . id ,
227
- traceSlug : row . trace ,
228
- timestamp : row . timestamp ,
229
- organization,
230
- location,
231
- view : domainViewFilters . view ,
232
- source : TraceViewSources . WEB_VITALS_MODULE ,
233
- } ) ;
234
- return (
235
- < NoOverflow >
236
- < Link to = { eventTarget } > { getShortEventId ( row . id ) } </ Link >
237
- </ NoOverflow >
238
- ) ;
239
- }
240
- if ( key === 'replayId' ) {
241
- const replayTarget =
242
- row [ 'transaction.duration' ] !== undefined &&
243
- replayLinkGenerator (
244
- organization ,
245
- {
246
- replayId : row . replayId ,
247
- id : row . id ,
248
- 'transaction.duration' : row [ 'transaction.duration' ] ,
249
- timestamp : row . timestamp ,
250
- } ,
251
- undefined
252
- ) ;
253
-
254
- return row . replayId && replayTarget && replayExists ( row [ key ] ) ? (
255
- < AlignCenter >
256
- < Link to = { replayTarget } > { getShortEventId ( row . replayId ) } </ Link >
257
- </ AlignCenter >
258
- ) : (
259
- < AlignCenter >
260
- < NoValue > { t ( '(no value)' ) } </ NoValue >
261
- </ AlignCenter >
262
- ) ;
263
- }
264
- if ( key === 'profile.id' ) {
265
- if ( ! defined ( project ) || ! defined ( row [ 'profile.id' ] ) ) {
266
- return (
267
- < AlignCenter >
268
- < NoValue > { t ( '(no value)' ) } </ NoValue >
269
- </ AlignCenter >
270
- ) ;
271
- }
272
- const target = generateProfileFlamechartRoute ( {
273
- organization,
274
- projectSlug,
275
- profileId : String ( row [ 'profile.id' ] ) ,
276
- } ) ;
277
-
278
- return (
279
- < AlignCenter >
280
- < Link to = { target } > { getShortEventId ( row [ 'profile.id' ] ) } </ Link >
281
- </ AlignCenter >
282
- ) ;
283
- }
284
- // @ts -expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
285
- return < AlignRight > { row [ key ] } </ AlignRight > ;
286
- } ;
287
-
288
175
const renderSpansBodyCell = ( col : Column , row : SpanSampleRowWithScore ) => {
289
176
const { key} = col ;
290
177
if ( key === 'score' ) {
@@ -319,11 +206,7 @@ export function PageOverviewWebVitalsDetailPanel({
319
206
{
320
207
replayId : row . replayId ,
321
208
id : '' , // id doesn't actually matter here. Just to satisfy type.
322
- 'transaction.duration' :
323
- useEap || isInp || ( isSpansWebVital && useSpansWebVitals )
324
- ? row [ SpanIndexedField . SPAN_SELF_TIME ]
325
- : // @ts -expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
326
- row [ 'transaction.duration' ] ,
209
+ 'transaction.duration' : row [ SpanIndexedField . SPAN_SELF_TIME ] ,
327
210
timestamp : row . timestamp ,
328
211
} ,
329
212
undefined
@@ -381,13 +264,6 @@ export function PageOverviewWebVitalsDetailPanel({
381
264
}
382
265
return < NoOverflow > { NO_VALUE } </ NoOverflow > ;
383
266
}
384
- if ( key === SpanIndexedField . SPAN_DESCRIPTION ) {
385
- return (
386
- < NoOverflow >
387
- < Tooltip title = { row [ key ] } > { row [ key ] } </ Tooltip >
388
- </ NoOverflow >
389
- ) ;
390
- }
391
267
if ( key === 'id' ) {
392
268
const eventTarget =
393
269
project ?. slug &&
@@ -460,7 +336,7 @@ export function PageOverviewWebVitalsDetailPanel({
460
336
renderBodyCell : renderSpansBodyCell ,
461
337
} }
462
338
/>
463
- ) : useEap || ( isSpansWebVital && useSpansWebVitals ) ? (
339
+ ) : (
464
340
< GridEditable
465
341
data = { spansTableData }
466
342
isLoading = { isSpansLoading }
@@ -475,17 +351,6 @@ export function PageOverviewWebVitalsDetailPanel({
475
351
renderBodyCell : renderSpansBodyCell ,
476
352
} }
477
353
/>
478
- ) : (
479
- < GridEditable
480
- data = { transactionsTableData as any as TransactionSampleRowWithScore [ ] } // TODO: fix typing
481
- isLoading = { isTransactionWebVitalsQueryLoading }
482
- columnOrder = { PAGELOADS_COLUMN_ORDER }
483
- columnSortBy = { [ sort ] }
484
- grid = { {
485
- renderHeadCell,
486
- renderBodyCell,
487
- } }
488
- />
489
354
) }
490
355
</ TableContainer >
491
356
< PageAlert />
0 commit comments