Browse Source

chore(insights): Move `/starfish/` code into `/insights/` (#72969)

Starting the process of moving all Insights code into the same
directory. Starting by moving all the "starfish" code into `/insights/`
since that's what it is. This start establishing the `common` directory.
If you're interested in the final desired folder structure see
[Notion](https://www.notion.so/sentry/Insights-Folder-Structure-Proposal-4543ac88497e4a548ed9d39605b6629d?pvs=4)

File moves only, no behaviour changes. Lots more cleanup to come. I'll
move all the actual modules in there, and so on.
George Gritsouk 8 months ago
parent
commit
c35548ec07

+ 1 - 1
static/app/components/events/eventStatisticalDetector/aggregateSpanDiff.tsx

@@ -10,8 +10,8 @@ import {useApiQuery} from 'sentry/utils/queryClient';
 import {MutableSearch} from 'sentry/utils/tokenizeSearch';
 import {useLocation} from 'sentry/utils/useLocation';
 import useOrganization from 'sentry/utils/useOrganization';
+import {useSpanMetrics} from 'sentry/views/insights/common/queries/useDiscover';
 import {spanDetailsRouteWithQuery} from 'sentry/views/performance/transactionSummary/transactionSpans/spanDetails/utils';
-import {useSpanMetrics} from 'sentry/views/starfish/queries/useDiscover';
 
 import {EventRegressionTable} from './eventRegressionTable';
 

+ 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 {useSpansIndexed} from 'sentry/views/insights/common/queries/useDiscover';
+import {SpanIndexedField, type SpanIndexedResponse} from 'sentry/views/insights/types';
 import {
   NumberOfPipelinesChart,
   TotalTokensUsedChart,
 } from 'sentry/views/llmMonitoring/llmMonitoringCharts';
 import * as ModuleLayout from 'sentry/views/performance/moduleLayout';
 import {useModuleURL} from 'sentry/views/performance/utils/useModuleURL';
-import {useSpansIndexed} from 'sentry/views/starfish/queries/useDiscover';
-import {SpanIndexedField, type SpanIndexedResponse} from 'sentry/views/starfish/types';
 
 interface Props {
   event: Event;

+ 7 - 4
static/app/components/events/interfaces/spans/newTraceDetailsSpanDetails.tsx

@@ -30,6 +30,13 @@ import getDynamicText from 'sentry/utils/getDynamicText';
 import {safeURL} from 'sentry/utils/url/safeURL';
 import {useLocation} from 'sentry/utils/useLocation';
 import useProjects from 'sentry/utils/useProjects';
+import {
+  Frame,
+  SpanDescription,
+} from 'sentry/views/insights/common/components/spanDescription';
+import {FrameContainer} from 'sentry/views/insights/common/components/stackTraceMiniFrame';
+import {resolveSpanModule} from 'sentry/views/insights/common/utils/resolveSpanModule';
+import {ModuleName} from 'sentry/views/insights/types';
 import {IssueList} from 'sentry/views/performance/newTraceDetails/traceDrawer/details/issues/issues';
 import {TraceDrawerComponents} from 'sentry/views/performance/newTraceDetails/traceDrawer/details/styles';
 import type {
@@ -41,10 +48,6 @@ import {GeneralSpanDetailsValue} from 'sentry/views/performance/traceDetails/new
 import {spanDetailsRouteWithQuery} from 'sentry/views/performance/transactionSummary/transactionSpans/spanDetails/utils';
 import {transactionSummaryRouteWithQuery} from 'sentry/views/performance/transactionSummary/utils';
 import {getPerformanceDuration} from 'sentry/views/performance/utils/getPerformanceDuration';
-import {Frame, SpanDescription} from 'sentry/views/starfish/components/spanDescription';
-import {FrameContainer} from 'sentry/views/starfish/components/stackTraceMiniFrame';
-import {ModuleName} from 'sentry/views/starfish/types';
-import {resolveSpanModule} from 'sentry/views/starfish/utils/resolveSpanModule';
 
 import {OpsDot} from '../../opsBreakdown';
 

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

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

+ 1 - 1
static/app/components/metrics/customMetricsEventData.tsx

@@ -31,12 +31,12 @@ import {useMetricsQuery} from 'sentry/utils/metrics/useMetricsQuery';
 import {middleEllipsis} from 'sentry/utils/string/middleEllipsis';
 import type {Color} from 'sentry/utils/theme';
 import useOrganization from 'sentry/utils/useOrganization';
+import {getSampleChartSymbol} from 'sentry/views/insights/common/views/spanSummaryPage/sampleList/durationChart/getSampleChartSymbol';
 import {getChartTimeseries} from 'sentry/views/metrics/widget';
 import {
   type SectionCardKeyValueList,
   TraceDrawerComponents,
 } from 'sentry/views/performance/newTraceDetails/traceDrawer/details/styles';
-import {getSampleChartSymbol} from 'sentry/views/starfish/views/spanSummaryPage/sampleList/durationChart/getSampleChartSymbol';
 
 function flattenMetricsSummary(
   metricsSummary: MetricsSummary

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

@@ -51,6 +51,7 @@ import useMedia from 'sentry/utils/useMedia';
 import useOrganization from 'sentry/utils/useOrganization';
 import useProjects from 'sentry/utils/useProjects';
 import {normalizeUrl} from 'sentry/utils/withDomainRequired';
+import {ModuleName} from 'sentry/views/insights/types';
 import {releaseLevelAsBadgeProps as LLMModuleBadgeProps} from 'sentry/views/llmMonitoring/settings';
 import MetricsOnboardingSidebar from 'sentry/views/metrics/ddmOnboarding/sidebar';
 import {releaseLevelAsBadgeProps as CacheModuleBadgeProps} from 'sentry/views/performance/cache/settings';
@@ -60,7 +61,6 @@ import {
   useModuleTitle,
 } from 'sentry/views/performance/utils/useModuleTitle';
 import {useModuleURLBuilder} from 'sentry/views/performance/utils/useModuleURL';
-import {ModuleName} from 'sentry/views/starfish/types';
 
 import {ProfilingOnboardingSidebar} from '../profiling/ProfilingOnboarding/profilingOnboardingSidebar';
 

+ 1 - 1
static/app/routes.tsx

@@ -13,6 +13,7 @@ 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 {ModuleName} from 'sentry/views/insights/types';
 import {Tab, TabPaths} from 'sentry/views/issueDetails/types';
 import IssueListContainer from 'sentry/views/issueList';
 import IssueListOverview from 'sentry/views/issueList/overview';
@@ -25,7 +26,6 @@ import ProjectEventRedirect from 'sentry/views/projectEventRedirect';
 import redirectDeprecatedProjectRoute from 'sentry/views/projects/redirectDeprecatedProjectRoute';
 import RouteNotFound from 'sentry/views/routeNotFound';
 import SettingsWrapper from 'sentry/views/settings/components/settingsWrapper';
-import {ModuleName} from 'sentry/views/starfish/types';
 
 import {IndexRoute, Route} from './components/route';
 

+ 4 - 4
static/app/utils/discover/fieldRenderers.tsx

@@ -50,15 +50,15 @@ import Projects from 'sentry/utils/projects';
 import {isUrl} from 'sentry/utils/string/isUrl';
 import {QuickContextHoverWrapper} from 'sentry/views/discover/table/quickContext/quickContextWrapper';
 import {ContextType} from 'sentry/views/discover/table/quickContext/utils';
+import {PercentChangeCell} from 'sentry/views/insights/common/components/tableCells/percentChangeCell';
+import {ResponseStatusCodeCell} from 'sentry/views/insights/common/components/tableCells/responseStatusCodeCell';
+import {TimeSpentCell} from 'sentry/views/insights/common/components/tableCells/timeSpentCell';
+import {SpanMetricsField} from 'sentry/views/insights/types';
 import {
   filterToLocationQuery,
   SpanOperationBreakdownFilter,
   stringToFilter,
 } from 'sentry/views/performance/transactionSummary/filter';
-import {PercentChangeCell} from 'sentry/views/starfish/components/tableCells/percentChangeCell';
-import {ResponseStatusCodeCell} from 'sentry/views/starfish/components/tableCells/responseStatusCodeCell';
-import {TimeSpentCell} from 'sentry/views/starfish/components/tableCells/timeSpentCell';
-import {SpanMetricsField} from 'sentry/views/starfish/types';
 
 import {decodeScalar} from '../queryString';
 

+ 2 - 2
static/app/utils/discover/fields.tsx

@@ -10,8 +10,8 @@ import {
   SESSIONS_FIELDS,
   SESSIONS_OPERATIONS,
 } from 'sentry/views/dashboards/widgetBuilder/releaseWidget/fields';
-import {STARFISH_AGGREGATION_FIELDS} from 'sentry/views/starfish/types';
-import {STARFISH_FIELDS} from 'sentry/views/starfish/utils/constants';
+import {STARFISH_FIELDS} from 'sentry/views/insights/common/utils/constants';
+import {STARFISH_AGGREGATION_FIELDS} from 'sentry/views/insights/types';
 
 import {
   AGGREGATION_FIELDS,

+ 1 - 1
static/app/views/dashboards/metrics/table.tsx

@@ -16,7 +16,7 @@ import {
   type MetricsQueryApiRequestQuery,
 } from 'sentry/utils/metrics/useMetricsQuery';
 import type {Order} from 'sentry/views/dashboards/metrics/types';
-import {LoadingScreen} from 'sentry/views/starfish/components/chart';
+import {LoadingScreen} from 'sentry/views/insights/common/components/chart';
 
 interface MetricTableContainerProps {
   isLoading: boolean;

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