Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(insights): filter mobile transactions #78855

Merged
merged 4 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
Copy link
Member

@mjq mjq Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's anything else we could additionally filter on to get rid of browser navigations and pageloads 🤔 Anyway this PR is an improvement regardless, we can loop back later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that would be great! Also, I think ideally we are able to filter by projects directly.

For example in the frontend view, we only show data for frontend projects. That way we don't have to worry about filtering by the right transaction ops, and custom transactions would work too.

];
Loading