Skip to content

Commit

Permalink
feat(insights): filter mobile transactions (#78855)
Browse files Browse the repository at this point in the history
Work for #77572

Filter mobile overview page by relevant transaction ops. This does not
apply to the double chart rows, as some of them use span metrics, which
means we cant filter them the same way due to missing tags.

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
  • Loading branch information
DominikB2014 and getsantry[bot] authored Oct 17, 2024
1 parent f4d7b1d commit 5b09442
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
12 changes: 11 additions & 1 deletion static/app/views/insights/pages/mobile/mobileOverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ import {ToolRibbon} from 'sentry/views/insights/common/components/ribbon';
import {useOnboardingProject} from 'sentry/views/insights/common/queries/useOnboardingProject';
import {ViewTrendsButton} from 'sentry/views/insights/common/viewTrendsButton';
import {MobileHeader} from 'sentry/views/insights/pages/mobile/mobilePageHeader';
import {MOBILE_LANDING_TITLE} from 'sentry/views/insights/pages/mobile/settings';
import {
MOBILE_LANDING_TITLE,
OVERVIEW_PAGE_ALLOWED_OPS,
} from 'sentry/views/insights/pages/mobile/settings';
import {OVERVIEW_PAGE_TITLE} from 'sentry/views/insights/pages/settings';
import {
generateGenericPerformanceEventView,
Expand Down Expand Up @@ -96,6 +99,12 @@ function MobileOverviewPage() {
? REACT_NATIVE_COLUMN_TITLES
: MOBILE_COLUMN_TITLES;

const doubleChartRowEventView = eventView.clone(); // some of the double chart rows rely on span metrics, so they can't be queried the same way

const existingQuery = new MutableSearch(eventView.query);
existingQuery.addDisjunctionFilterValues('transaction.op', OVERVIEW_PAGE_ALLOWED_OPS);
eventView.query = existingQuery.formatString();

const showOnboarding = onboardingProject !== undefined;

const doubleChartRowCharts = [
Expand Down Expand Up @@ -218,6 +227,7 @@ function MobileOverviewPage() {
<DoubleChartRow
allowedCharts={doubleChartRowCharts}
{...sharedProps}
eventView={doubleChartRowEventView}
/>
<TripleChartRow
allowedCharts={tripleChartRowCharts}
Expand Down
11 changes: 11 additions & 0 deletions static/app/views/insights/pages/mobile/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,14 @@ import {t} from 'sentry/locale';

export const MOBILE_LANDING_SUB_PATH = 'mobile';
export const MOBILE_LANDING_TITLE = t('Mobile');

export const OVERVIEW_PAGE_ALLOWED_OPS = [
'ui.action.swipe',
'ui.action.scroll',
'ui.action.click',
'ui.load',
'app.lifecycle',
// navigation and pageload are seen in react-native
'navigation',
'pageload',
];

0 comments on commit 5b09442

Please sign in to comment.