|
@@ -5,7 +5,7 @@ import {
|
|
|
SORTABLE_INDEXED_INTERACTION_FIELDS,
|
|
|
} from 'sentry/views/performance/browser/webVitals/utils/types';
|
|
|
import {useWebVitalsSort} from 'sentry/views/performance/browser/webVitals/utils/useWebVitalsSort';
|
|
|
-import {useIndexedSpans} from 'sentry/views/starfish/queries/useIndexedSpans';
|
|
|
+import {useSpansIndexed} from 'sentry/views/starfish/queries/useDiscover';
|
|
|
import {SpanIndexedField} from 'sentry/views/starfish/types';
|
|
|
|
|
|
export function useInpSpanSamplesWebVitalsQuery({
|
|
@@ -27,36 +27,38 @@ export function useInpSpanSamplesWebVitalsQuery({
|
|
|
defaultSort: DEFAULT_INDEXED_INTERACTION_SORT,
|
|
|
sortableFields: filteredSortableFields as unknown as string[],
|
|
|
});
|
|
|
- const {data, isLoading, ...rest} = useIndexedSpans({
|
|
|
- search: MutableSearch.fromQueryObject({
|
|
|
- 'span.op': 'ui.interaction.click',
|
|
|
- 'measurements.score.weight.inp': '>0',
|
|
|
- ...(transaction !== undefined
|
|
|
- ? {[SpanIndexedField.ORIGIN_TRANSACTION]: transaction}
|
|
|
- : {}),
|
|
|
- ...filters,
|
|
|
- }),
|
|
|
- sorts: [sort],
|
|
|
- fields: [
|
|
|
- SpanIndexedField.INP,
|
|
|
- SpanIndexedField.INP_SCORE,
|
|
|
- SpanIndexedField.INP_SCORE_WEIGHT,
|
|
|
- SpanIndexedField.TOTAL_SCORE,
|
|
|
- SpanIndexedField.ID,
|
|
|
- SpanIndexedField.TIMESTAMP,
|
|
|
- SpanIndexedField.PROFILE_ID,
|
|
|
- SpanIndexedField.REPLAY_ID,
|
|
|
- SpanIndexedField.USER,
|
|
|
- SpanIndexedField.ORIGIN_TRANSACTION,
|
|
|
- SpanIndexedField.PROJECT,
|
|
|
- SpanIndexedField.BROWSER_NAME,
|
|
|
- SpanIndexedField.SPAN_SELF_TIME,
|
|
|
- SpanIndexedField.SPAN_DESCRIPTION,
|
|
|
- ],
|
|
|
- enabled,
|
|
|
- limit,
|
|
|
- referrer: 'api.performance.browser.web-vitals.spans',
|
|
|
- });
|
|
|
+ const {data, isLoading, ...rest} = useSpansIndexed(
|
|
|
+ {
|
|
|
+ search: MutableSearch.fromQueryObject({
|
|
|
+ 'span.op': 'ui.interaction.click',
|
|
|
+ 'measurements.score.weight.inp': '>0',
|
|
|
+ ...(transaction !== undefined
|
|
|
+ ? {[SpanIndexedField.ORIGIN_TRANSACTION]: transaction}
|
|
|
+ : {}),
|
|
|
+ ...filters,
|
|
|
+ }),
|
|
|
+ sorts: [sort],
|
|
|
+ fields: [
|
|
|
+ SpanIndexedField.INP,
|
|
|
+ SpanIndexedField.INP_SCORE,
|
|
|
+ SpanIndexedField.INP_SCORE_WEIGHT,
|
|
|
+ SpanIndexedField.TOTAL_SCORE,
|
|
|
+ SpanIndexedField.ID,
|
|
|
+ SpanIndexedField.TIMESTAMP,
|
|
|
+ SpanIndexedField.PROFILE_ID,
|
|
|
+ SpanIndexedField.REPLAY_ID,
|
|
|
+ SpanIndexedField.USER,
|
|
|
+ SpanIndexedField.ORIGIN_TRANSACTION,
|
|
|
+ SpanIndexedField.PROJECT,
|
|
|
+ SpanIndexedField.BROWSER_NAME,
|
|
|
+ SpanIndexedField.SPAN_SELF_TIME,
|
|
|
+ SpanIndexedField.SPAN_DESCRIPTION,
|
|
|
+ ],
|
|
|
+ enabled,
|
|
|
+ limit,
|
|
|
+ },
|
|
|
+ 'api.performance.browser.web-vitals.spans'
|
|
|
+ );
|
|
|
const tableData: InteractionSpanSampleRowWithScore[] =
|
|
|
!isLoading && data?.length
|
|
|
? data.map(row => {
|