Skip to content

Commit

Permalink
filter mobile transctions
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikB2014 committed Oct 9, 2024
1 parent 29b24ac commit 488a7a7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
13 changes: 12 additions & 1 deletion static/app/views/insights/pages/mobile/mobileOverviewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ 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 {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 @@ -87,6 +88,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 @@ -193,7 +200,11 @@ function MobileOverviewPage() {
<PerformanceDisplayProvider
value={{performanceType: ProjectPerformanceType.MOBILE}}
>
<DoubleChartRow allowedCharts={doubleChartRowCharts} {...sharedProps} />
<DoubleChartRow
allowedCharts={doubleChartRowCharts}
{...sharedProps}
eventView={doubleChartRowEventView}
/>
<TripleChartRow allowedCharts={tripleChartRowCharts} {...sharedProps} />
<Table
projects={projects}
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 488a7a7

Please sign in to comment.