Skip to content

Commit 4acc527

Browse files
authored
feat(insights): Extend mobile mobile vitals queries to include navigation ops (#91859)
For React Native and Jetpack Compose on Android, not only `transaction.op:ui.load` transaction are considered screens, but also `transaction.op:navigation` is relevant. Fixes #80215
1 parent 9374a8e commit 4acc527

File tree

12 files changed

+15
-14
lines changed

12 files changed

+15
-14
lines changed

static/app/views/insights/common/queries/useHasTtfdConfigured.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function useTTFDConfigured(additionalFilters?: string[]) {
1616

1717
const query = new MutableSearch([
1818
useEap ? 'is_transaction:true' : 'event.type:transaction',
19-
'transaction.op:ui.load',
19+
'transaction.op:[ui.load,navigation]',
2020
...(additionalFilters ?? []),
2121
]);
2222

static/app/views/insights/common/queries/useReleases.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function useReleases(
5656
const newQuery: NewQuery = {
5757
name: '',
5858
fields: ['release', 'count()'],
59-
query: `transaction.op:ui.load ${escapeFilterValue(
59+
query: `transaction.op:[ui.load,navigation] ${escapeFilterValue(
6060
`release:[${releases.map(r => `"${r.version}"`).join()}]`
6161
)}`,
6262
dataset: useEap ? DiscoverDatasets.SPANS_EAP_RPC : DiscoverDatasets.METRICS,

static/app/views/insights/mobile/appStarts/components/spanOpSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function SpanOpSelector({transaction, primaryRelease, secondaryRelease}:
4949
// Exclude this span because we can get TTID contributing spans instead
5050
'!span.description:"Initial Frame Render"',
5151
'has:span.description',
52-
'transaction.op:ui.load',
52+
'transaction.op:[ui.load,navigation]',
5353
`transaction:${transaction}`,
5454
`has:ttid`,
5555
`span.op:[${APP_START_SPANS.join(',')}]`,

static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function SpanOperationTable({
8585
// Exclude this span because we can get TTID contributing spans instead
8686
'!span.description:"Initial Frame Render"',
8787
'has:span.description',
88-
'transaction.op:ui.load',
88+
'transaction.op:[ui.load,navigation]',
8989
`transaction:${transaction}`,
9090
'has:ttid',
9191
`${SpanMetricsField.APP_START_TYPE}:${

static/app/views/insights/mobile/screenload/components/charts/screenCharts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function ScreenCharts({additionalFilters}: Props) {
6666
const queryString = useMemo(() => {
6767
const query = new MutableSearch([
6868
useEap ? 'is_transaction:true' : 'event.type:transaction',
69-
'transaction.op:ui.load',
69+
'transaction.op:[ui.load,navigation]',
7070
...(additionalFilters ?? []),
7171
]);
7272

static/app/views/insights/mobile/screenload/components/eventSamples.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ export function ScreenLoadEventSamples({
5353
const searchQuery = useMemo(() => {
5454
const mutableQuery = useEap
5555
? new MutableSearch([
56-
'span.op:ui.load',
56+
'span.op:[ui.load,navigation]',
5757
`is_transaction:true`,
5858
`transaction:${transaction}`,
5959
`release:${release}`,
6060
])
6161
: new MutableSearch([
62-
'transaction.op:ui.load',
62+
'transaction.op:[ui.load,navigation]',
6363
`transaction:${transaction}`,
6464
`release:${release}`,
6565
]);

static/app/views/insights/mobile/screenload/components/spanOpSelector.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export const TTID_CONTRIBUTING_SPAN_OPS = [
1818
'file.read',
1919
'file.write',
2020
'ui.load',
21+
'navigation',
2122
'http.client',
2223
'db',
2324
'db.sql.room',
@@ -38,7 +39,7 @@ export function SpanOpSelector({transaction, primaryRelease, secondaryRelease}:
3839
const value = decodeScalar(location.query[SpanMetricsField.SPAN_OP]) ?? '';
3940

4041
const searchQuery = new MutableSearch([
41-
'transaction.op:ui.load',
42+
'transaction.op:[ui.load,navigation]',
4243
`transaction:${transaction}`,
4344
`span.op:[${TTID_CONTRIBUTING_SPAN_OPS.join(',')}]`,
4445
'has:span.description',

static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('ScreenLoadSpansTable', function () {
6161
per_page: 25,
6262
project: [],
6363
query:
64-
'transaction.op:ui.load transaction:MainActivity span.op:[file.read,file.write,ui.load,http.client,db,db.sql.room,db.sql.query,db.sql.transaction] has:span.description ( release:io.sentry.samples.android@7.0.0+2 OR release:io.sentry.samples.android@6.27.0+2 )',
64+
'transaction.op:[ui.load,navigation] transaction:MainActivity span.op:[file.read,file.write,ui.load,navigation,http.client,db,db.sql.room,db.sql.query,db.sql.transaction] has:span.description ( release:io.sentry.samples.android@7.0.0+2 OR release:io.sentry.samples.android@6.27.0+2 )',
6565
referrer: 'api.starfish.get-span-operations',
6666
statsPeriod: '14d',
6767
}),
@@ -91,7 +91,7 @@ describe('ScreenLoadSpansTable', function () {
9191
per_page: 25,
9292
project: [],
9393
query:
94-
'transaction.op:ui.load transaction:MainActivity has:span.description span.op:[file.read,file.write,ui.load,http.client,db,db.sql.room,db.sql.query,db.sql.transaction] ( release:io.sentry.samples.android@7.0.0+2 OR release:io.sentry.samples.android@6.27.0+2 )',
94+
'transaction.op:[ui.load,navigation] transaction:MainActivity has:span.description span.op:[file.read,file.write,ui.load,navigation,http.client,db,db.sql.room,db.sql.query,db.sql.transaction] ( release:io.sentry.samples.android@7.0.0+2 OR release:io.sentry.samples.android@6.27.0+2 )',
9595
referrer: 'api.starfish.mobile-span-table',
9696
sort: '-sum(span.self_time)',
9797
statsPeriod: '14d',

static/app/views/insights/mobile/screenload/components/tables/screenLoadSpansTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function ScreenLoadSpansTable({
7272

7373
const queryStringPrimary = useMemo(() => {
7474
const searchQuery = new MutableSearch([
75-
'transaction.op:ui.load',
75+
'transaction.op:[ui.load,navigation]',
7676
`transaction:${transaction}`,
7777
'has:span.description',
7878
...(spanOp

static/app/views/insights/mobile/screenload/views/screenLoadSpansPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function ScreenLoadSpansContent() {
7878
dataset={DiscoverDatasets.METRICS}
7979
filters={[
8080
useEap ? 'is_transaction:true' : 'event.type:transaction',
81-
'transaction.op:ui.load',
81+
'transaction.op:[ui.load,navigation]',
8282
`transaction:${transactionName}`,
8383
]}
8484
fields={[

static/app/views/insights/mobile/screens/components/screensOverview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const getQueryString = (
3636
selectedPlatform: string | undefined
3737
) => {
3838
const {query: locationQuery} = location;
39-
const query = new MutableSearch(['transaction.op:ui.load']);
39+
const query = new MutableSearch(['transaction.op:[ui.load,navigation]']);
4040

4141
const searchQuery = decodeScalar(locationQuery.query, '');
4242

static/app/views/insights/mobile/screens/views/screensLandingPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function ScreensLandingPage() {
211211
vital: VitalItem | undefined;
212212
}>({status: undefined, vital: undefined});
213213

214-
const query = new MutableSearch(['transaction.op:ui.load']);
214+
const query = new MutableSearch(['transaction.op:[ui.load,navigation]']);
215215
if (isProjectCrossPlatform) {
216216
query.addFilterValue('os.name', selectedPlatform);
217217
}

0 commit comments

Comments
 (0)