Skip to content

Commit

Permalink
fix(insights): Remove platform compatibility check (#70786)
Browse files Browse the repository at this point in the history
Currently this queries indexed spans because of my reliance on sdk.name,
but this is proving to be too slow on some projects with lots of data.
I'm removing it temporarily so we don't block fetching data for users
where this request just times out on.

I've also removed the component completely because we can bring it back
when there's a better implementation and we can actually use it. This
compatibility check isn't currently on any other module either, so the
default experience is to do our best to query for that data.
  • Loading branch information
narsaynorath committed May 14, 2024
1 parent e245806 commit ff63150
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 400 deletions.
5 changes: 0 additions & 5 deletions static/app/views/performance/mobile/appStarts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ export default function InitializationModule() {
<Feature features="spans-first-ui" organization={organization}>
<ScreensTemplate
additionalSelectors={<StartTypeSelector />}
compatibilityProps={{
compatibleSDKNames: ['sentry.cocoa', 'sentry.java.android'],
docsUrl:
'https://docs.sentry.io/product/performance/mobile-vitals/app-starts/#minimum-sdk-requirements',
}}
content={<AppStartup chartHeight={200} />}
title={ROUTE_NAMES['app-startup']}
/>
Expand Down
16 changes: 4 additions & 12 deletions static/app/views/performance/mobile/components/screensTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ import useOrganization from 'sentry/utils/useOrganization';
import {normalizeUrl} from 'sentry/utils/withDomainRequired';
import {useOnboardingProject} from 'sentry/views/performance/browser/webVitals/utils/useOnboardingProject';
import Onboarding from 'sentry/views/performance/onboarding';
import {PlatformCompatibilityChecker} from 'sentry/views/performance/platformCompatibilityChecker';
import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector';

type ScreensTemplateProps = {
compatibilityProps: {
compatibleSDKNames: string[];
docsUrl: string;
};
content: ReactNode;
title: string;
additionalSelectors?: ReactNode;
Expand All @@ -38,7 +33,6 @@ type ScreensTemplateProps = {
export default function ScreensTemplate({
title,
additionalSelectors,
compatibilityProps,
content,
}: ScreensTemplateProps) {
const organization = useOrganization();
Expand Down Expand Up @@ -96,12 +90,10 @@ export default function ScreensTemplate({
</PageFiltersContainer>
<PageAlert />
<ErrorBoundary mini>
<PlatformCompatibilityChecker {...compatibilityProps}>
{onboardingProject && (
<Onboarding organization={organization} project={onboardingProject} />
)}
{!onboardingProject && content}
</PlatformCompatibilityChecker>
{onboardingProject && (
<Onboarding organization={organization} project={onboardingProject} />
)}
{!onboardingProject && content}
</ErrorBoundary>
</Layout.Main>
</Layout.Body>
Expand Down
40 changes: 14 additions & 26 deletions static/app/views/performance/mobile/screenload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {ScreensView, YAxis} from 'sentry/views/performance/mobile/screenload/scr
import {PlatformSelector} from 'sentry/views/performance/mobile/screenload/screens/platformSelector';
import {isCrossPlatform} from 'sentry/views/performance/mobile/screenload/screens/utils';
import Onboarding from 'sentry/views/performance/onboarding';
import {PlatformCompatibilityChecker} from 'sentry/views/performance/platformCompatibilityChecker';
import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector';
import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames';

Expand Down Expand Up @@ -86,32 +85,21 @@ export default function PageloadModule() {
</Container>
<PageAlert />
<ErrorBoundary mini>
<PlatformCompatibilityChecker
compatibleSDKNames={[
'sentry.java.android',
'sentry.cocoa',
'sentry.javascript.react-native',
'sentry.dart.flutter',
'sentry.dart',
]}
docsUrl="https://docs.sentry.io/product/performance/mobile-vitals/screen-loads/#minimum-sdk-requirements"
>
{onboardingProject && (
<OnboardingContainer>
<Onboarding
organization={organization}
project={onboardingProject}
/>
</OnboardingContainer>
)}
{!onboardingProject && (
<ScreensView
yAxes={[YAxis.TTID, YAxis.TTFD]}
chartHeight={240}
project={project}
{onboardingProject && (
<OnboardingContainer>
<Onboarding
organization={organization}
project={onboardingProject}
/>
)}
</PlatformCompatibilityChecker>
</OnboardingContainer>
)}
{!onboardingProject && (
<ScreensView
yAxes={[YAxis.TTID, YAxis.TTFD]}
chartHeight={240}
project={project}
/>
)}
</ErrorBoundary>
</PageFiltersContainer>
</Layout.Main>
Expand Down
9 changes: 1 addition & 8 deletions static/app/views/performance/mobile/ui/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ export default function ResponsivenessModule() {
features={['spans-first-ui', 'starfish-mobile-ui-module']}
organization={organization}
>
<ScreensTemplate
content={<UIScreens />}
compatibilityProps={{
compatibleSDKNames: ['sentry.cocoa', 'sentry.java.android'],
docsUrl: 'www.docs.sentry.io', // TODO: Add real docs URL
}}
title={ROUTE_NAMES.mobileUI}
/>
<ScreensTemplate content={<UIScreens />} title={ROUTE_NAMES.mobileUI} />
</Feature>
);
}
213 changes: 0 additions & 213 deletions static/app/views/performance/platformCompatibilityChecker.spec.tsx

This file was deleted.

0 comments on commit ff63150

Please sign in to comment.