Browse Source

chore(insights): Move insights code out of performance folder (#73027)

We are moving on out! Taking almost all (within reason) insights helpers
and components out of performance, and into our own folder, where
everything lives together.
George Gritsouk 8 months ago
parent
commit
d7b2119f81

+ 2 - 2
static/app/components/events/interfaces/llm-monitoring/llmMonitoringSection.tsx

@@ -7,14 +7,14 @@ import {t} from 'sentry/locale';
 import type {Event} from 'sentry/types/event';
 import type {Organization} from 'sentry/types/organization';
 import {MutableSearch} from 'sentry/utils/tokenizeSearch';
+import * as ModuleLayout from 'sentry/views/insights/common/components/moduleLayout';
 import {useSpansIndexed} from 'sentry/views/insights/common/queries/useDiscover';
+import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL';
 import {
   NumberOfPipelinesChart,
   TotalTokensUsedChart,
 } from 'sentry/views/insights/llmMonitoring/components/charts/llmMonitoringCharts';
 import {SpanIndexedField, type SpanIndexedResponse} from 'sentry/views/insights/types';
-import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
-import {useModuleURL} from 'sentry/views/performance/utils/useModuleURL';
 
 interface Props {
   event: Event;

+ 1 - 1
static/app/components/events/interfaces/spans/spanSummaryButton.tsx

@@ -6,12 +6,12 @@ import {trackAnalytics} from 'sentry/utils/analytics';
 import {useLocation} from 'sentry/utils/useLocation';
 import {DATA_TYPE} from 'sentry/views/insights/browser/resources/settings';
 import {resolveSpanModule} from 'sentry/views/insights/common/utils/resolveSpanModule';
+import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL';
 import {ModuleName} from 'sentry/views/insights/types';
 import {
   querySummaryRouteWithQuery,
   resourceSummaryRouteWithQuery,
 } from 'sentry/views/performance/transactionSummary/transactionSpans/spanDetails/utils';
-import {useModuleURL} from 'sentry/views/performance/utils/useModuleURL';
 
 interface Props {
   event: Readonly<EventTransaction>;

+ 5 - 5
static/app/components/sidebar/index.tsx

@@ -52,15 +52,15 @@ import useOrganization from 'sentry/utils/useOrganization';
 import useProjects from 'sentry/utils/useProjects';
 import {normalizeUrl} from 'sentry/utils/withDomainRequired';
 import {releaseLevelAsBadgeProps as CacheModuleBadgeProps} from 'sentry/views/insights/cache/settings';
+import {
+  MODULE_TITLES,
+  useModuleTitle,
+} from 'sentry/views/insights/common/utils/useModuleTitle';
+import {useModuleURLBuilder} from 'sentry/views/insights/common/utils/useModuleURL';
 import {releaseLevelAsBadgeProps as LLMModuleBadgeProps} from 'sentry/views/insights/llmMonitoring/settings';
 import {releaseLevelAsBadgeProps as QueuesModuleBadgeProps} from 'sentry/views/insights/queues/settings';
 import {ModuleName} from 'sentry/views/insights/types';
 import MetricsOnboardingSidebar from 'sentry/views/metrics/ddmOnboarding/sidebar';
-import {
-  MODULE_TITLES,
-  useModuleTitle,
-} from 'sentry/views/performance/utils/useModuleTitle';
-import {useModuleURLBuilder} from 'sentry/views/performance/utils/useModuleURL';
 
 import {ProfilingOnboardingSidebar} from '../profiling/ProfilingOnboarding/profilingOnboardingSidebar';
 

+ 2 - 2
static/app/routes.tsx

@@ -13,6 +13,8 @@ import withDomainRedirect from 'sentry/utils/withDomainRedirect';
 import withDomainRequired from 'sentry/utils/withDomainRequired';
 import App from 'sentry/views/app';
 import AuthLayout from 'sentry/views/auth/layout';
+import {MODULE_BASE_URLS} from 'sentry/views/insights/common/utils/useModuleURL';
+import {INSIGHTS_BASE_URL} from 'sentry/views/insights/settings';
 import {ModuleName} from 'sentry/views/insights/types';
 import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
 import IssueListContainer from 'sentry/views/issueList';
@@ -20,8 +22,6 @@ import IssueListOverview from 'sentry/views/issueList/overview';
 import OrganizationContainer from 'sentry/views/organizationContainer';
 import OrganizationLayout from 'sentry/views/organizationLayout';
 import OrganizationRoot from 'sentry/views/organizationRoot';
-import {INSIGHTS_BASE_URL} from 'sentry/views/performance/settings';
-import {MODULE_BASE_URLS} from 'sentry/views/performance/utils/useModuleURL';
 import ProjectEventRedirect from 'sentry/views/projectEventRedirect';
 import redirectDeprecatedProjectRoute from 'sentry/views/projects/redirectDeprecatedProjectRoute';
 import RouteNotFound from 'sentry/views/routeNotFound';

+ 1 - 1
static/app/views/insights/browser/resources/components/resourceInfo.tsx

@@ -8,12 +8,12 @@ import {formatBytesBase2} from 'sentry/utils/bytes/formatBytesBase2';
 import {DurationUnit, SizeUnit} from 'sentry/utils/discover/fields';
 import getDynamicText from 'sentry/utils/getDynamicText';
 import {RESOURCE_THROUGHPUT_UNIT} from 'sentry/views/insights/browser/resources/settings';
+import {MetricReadout} from 'sentry/views/insights/common/components/metricReadout';
 import {getTimeSpentExplanation} from 'sentry/views/insights/common/components/tableCells/timeSpentCell';
 import {
   DataTitles,
   getThroughputTitle,
 } from 'sentry/views/insights/common/views/spans/types';
-import {MetricReadout} from 'sentry/views/performance/metricReadout';
 
 type Props = {
   avgContentLength: number;

+ 1 - 1
static/app/views/insights/browser/resources/components/resourceView.tsx

@@ -29,11 +29,11 @@ import {
   useResourceModuleFilters,
 } from 'sentry/views/insights/browser/resources/utils/useResourceFilters';
 import {useResourceSort} from 'sentry/views/insights/browser/resources/utils/useResourceSort';
+import {useHasDataTrackAnalytics} from 'sentry/views/insights/common/utils/useHasDataTrackAnalytics';
 import {QueryParameterNames} from 'sentry/views/insights/common/views/queryParameters';
 import {SpanTimeCharts} from 'sentry/views/insights/common/views/spans/spanTimeCharts';
 import type {ModuleFilters} from 'sentry/views/insights/common/views/spans/useModuleFilters';
 import {ModuleName} from 'sentry/views/insights/types';
-import {useHasDataTrackAnalytics} from 'sentry/views/performance/utils/analytics/useHasDataTrackAnalytics';
 
 const {
   SPAN_OP: RESOURCE_TYPE,

+ 3 - 3
static/app/views/insights/browser/resources/views/resourceSummaryPage.tsx

@@ -24,13 +24,13 @@ import {Referrer} from 'sentry/views/insights/browser/resources/referrer';
 import {DATA_TYPE} from 'sentry/views/insights/browser/resources/settings';
 import {ResourceSpanOps} from 'sentry/views/insights/browser/resources/types';
 import {useResourceModuleFilters} from 'sentry/views/insights/browser/resources/utils/useResourceFilters';
+import {ModulePageProviders} from 'sentry/views/insights/common/components/modulePageProviders';
 import {useSpanMetrics} from 'sentry/views/insights/common/queries/useDiscover';
+import {useModuleBreadcrumbs} from 'sentry/views/insights/common/utils/useModuleBreadcrumbs';
+import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL';
 import {SampleList} from 'sentry/views/insights/common/views/spanSummaryPage/sampleList';
 import {ModuleName, SpanMetricsField} from 'sentry/views/insights/types';
-import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
 import {TraceViewSources} from 'sentry/views/performance/newTraceDetails/traceMetadataHeader';
-import {useModuleBreadcrumbs} from 'sentry/views/performance/utils/useModuleBreadcrumbs';
-import {useModuleURL} from 'sentry/views/performance/utils/useModuleURL';
 
 const {
   SPAN_SELF_TIME,

+ 3 - 3
static/app/views/insights/browser/resources/views/resourcesLandingPage.tsx

@@ -25,11 +25,11 @@ import {
   BrowserStarfishFields,
   useResourceModuleFilters,
 } from 'sentry/views/insights/browser/resources/utils/useResourceFilters';
+import {ModulePageProviders} from 'sentry/views/insights/common/components/modulePageProviders';
+import {useModuleBreadcrumbs} from 'sentry/views/insights/common/utils/useModuleBreadcrumbs';
+import {useModuleTitle} from 'sentry/views/insights/common/utils/useModuleTitle';
 import {DomainSelector} from 'sentry/views/insights/common/views/spans/selectors/domainSelector';
 import {ModuleName} from 'sentry/views/insights/types';
-import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
-import {useModuleBreadcrumbs} from 'sentry/views/performance/utils/useModuleBreadcrumbs';
-import {useModuleTitle} from 'sentry/views/performance/utils/useModuleTitle';
 
 const {SPAN_OP, SPAN_DOMAIN} = BrowserStarfishFields;
 

+ 1 - 1
static/app/views/insights/browser/webVitals/components/performanceScoreRingWithTooltips.tsx

@@ -17,7 +17,7 @@ import type {
   ProjectScore,
   WebVitals,
 } from 'sentry/views/insights/browser/webVitals/types';
-import {useModuleURL} from 'sentry/views/performance/utils/useModuleURL';
+import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL';
 
 import {getFormattedDuration} from './webVitalMeters';
 

+ 3 - 3
static/app/views/insights/browser/webVitals/views/pageOverview.tsx

@@ -34,10 +34,10 @@ import {useProjectRawWebVitalsQuery} from 'sentry/views/insights/browser/webVita
 import {calculatePerformanceScoreFromStoredTableDataRow} from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/calculatePerformanceScoreFromStored';
 import {useProjectWebVitalsScoresQuery} from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/useProjectWebVitalsScoresQuery';
 import type {WebVitals} from 'sentry/views/insights/browser/webVitals/types';
-import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
+import {ModulePageProviders} from 'sentry/views/insights/common/components/modulePageProviders';
+import {useModuleBreadcrumbs} from 'sentry/views/insights/common/utils/useModuleBreadcrumbs';
+import {useModuleURL} from 'sentry/views/insights/common/utils/useModuleURL';
 import {transactionSummaryRouteWithQuery} from 'sentry/views/performance/transactionSummary/utils';
-import {useModuleBreadcrumbs} from 'sentry/views/performance/utils/useModuleBreadcrumbs';
-import {useModuleURL} from 'sentry/views/performance/utils/useModuleURL';
 
 export enum LandingDisplayField {
   OVERVIEW = 'overview',

Some files were not shown because too many files changed in this diff