Skip to content

Commit 0dfc654

Browse files
authored
ref(insights): remove insights-domain-view flag part 1 (#81241)
Now that domain views have been in GA for about a week, we can remove the flag that controls it. This is part 1 of the flag removal, i'm splitting this up to make it easier to review. In this part we remove the flag in all the associated utils and the domain view landing pages. In the domain view landing pages, we also replace the flag from `insights-domain-view` to `performance-view`, as performance view is a pre-requisite of the insights views.
1 parent 98db829 commit 0dfc654

File tree

17 files changed

+30
-60
lines changed

17 files changed

+30
-60
lines changed

static/app/views/insights/browser/webVitals/components/tables/pagePerformanceTable.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe('PagePerformanceTable', function () {
147147
expect(screen.getByRole('cell', {name: '/insights/browser/'})).toBeInTheDocument();
148148
expect(screen.getByRole('link', {name: '/insights/browser/'})).toHaveAttribute(
149149
'href',
150-
'/organizations/org-slug/insights/pageloads/overview/?project=11276&transaction=%2Finsights%2Fbrowser%2F'
150+
'/organizations/org-slug/insights/frontend/pageloads/overview/?project=11276&transaction=%2Finsights%2Fbrowser%2F'
151151
);
152152

153153
expect(screen.getByRole('cell', {name: 'View Project Details'})).toBeInTheDocument();

static/app/views/insights/cache/views/cacheLandingPage.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ describe('CacheLandingPage', function () {
253253
expect(screen.getByRole('cell', {name: 'my-transaction'})).toBeInTheDocument();
254254
expect(screen.getByRole('link', {name: 'my-transaction'})).toHaveAttribute(
255255
'href',
256-
'/organizations/org-slug/insights/caches/?project=123&statsPeriod=10d&transaction=my-transaction'
256+
'/organizations/org-slug/insights/backend/caches/?project=123&statsPeriod=10d&transaction=my-transaction'
257257
);
258258

259259
expect(screen.getByRole('columnheader', {name: 'Project'})).toBeInTheDocument();

static/app/views/insights/common/utils/useModuleURL.tsx

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
} from 'sentry/views/insights/pages/useFilters';
1919
import {getModuleView} from 'sentry/views/insights/pages/utils';
2020
import {BASE_URL as QUEUE_BASE_URL} from 'sentry/views/insights/queues/settings';
21-
import {INSIGHTS_BASE_URL} from 'sentry/views/insights/settings';
2221
import {ModuleName} from 'sentry/views/insights/types';
2322

2423
export const MODULE_BASE_URLS: Record<ModuleName, string> = {
@@ -66,7 +65,6 @@ export function useModuleURLBuilder(
6665
detectDomainView: boolean = true
6766
): URLBuilder {
6867
const organization = useOrganization({allowNull: true}); // Some parts of the app, like the main sidebar, render even if the organization isn't available (during loading, or at all).
69-
const hasDomainViewFeature = organization?.features.includes('insights-domain-view');
7068
const {view: currentView} = useDomainViewFilters();
7169

7270
if (!organization) {
@@ -76,28 +74,17 @@ export function useModuleURLBuilder(
7674

7775
const {slug} = organization;
7876

79-
if (hasDomainViewFeature) {
80-
return function (moduleName: RoutableModuleNames, domainView?: DomainView) {
81-
let view = detectDomainView ? currentView : currentView ?? domainView;
77+
return function (moduleName: RoutableModuleNames, domainView?: DomainView) {
78+
let view = detectDomainView ? currentView : currentView ?? domainView;
8279

83-
if (!view) {
84-
view = getModuleView(moduleName as ModuleName);
85-
}
80+
if (!view) {
81+
view = getModuleView(moduleName as ModuleName);
82+
}
8683

87-
return bare
88-
? `${DOMAIN_VIEW_BASE_URL}/${view}/${MODULE_BASE_URLS[moduleName]}`
89-
: normalizeUrl(
90-
`/organizations/${slug}/${DOMAIN_VIEW_BASE_URL}/${view}/${MODULE_BASE_URLS[moduleName]}`
91-
);
92-
};
93-
}
94-
95-
// TODO - delete this block once the domain view feature is fully rolled out
96-
return function (moduleName: RoutableModuleNames) {
9784
return bare
98-
? `${INSIGHTS_BASE_URL}/${MODULE_BASE_URLS[moduleName]}`
85+
? `${DOMAIN_VIEW_BASE_URL}/${view}/${MODULE_BASE_URLS[moduleName]}`
9986
: normalizeUrl(
100-
`/organizations/${slug}/${INSIGHTS_BASE_URL}/${MODULE_BASE_URLS[moduleName]}`
87+
`/organizations/${slug}/${DOMAIN_VIEW_BASE_URL}/${view}/${MODULE_BASE_URLS[moduleName]}`
10188
);
10289
};
10390
}

static/app/views/insights/database/views/databaseSpanSummaryPage.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ describe('DatabaseSpanSummaryPage', function () {
348348
expect(screen.getByRole('cell', {name: 'GET /api/users'})).toBeInTheDocument();
349349
expect(screen.getByRole('link', {name: 'GET /api/users'})).toHaveAttribute(
350350
'href',
351-
'/organizations/org-slug/insights/database/spans/span/1756baf8fd19c116?statsPeriod=10d&transaction=%2Fapi%2Fusers&transactionMethod=GET&transactionsCursor=0%3A25%3A0'
351+
'/organizations/org-slug/insights/backend/database/spans/span/1756baf8fd19c116?statsPeriod=10d&transaction=%2Fapi%2Fusers&transactionMethod=GET&transactionsCursor=0%3A25%3A0'
352352
);
353353
expect(screen.getByRole('cell', {name: '17.9/s'})).toBeInTheDocument();
354354
expect(screen.getByRole('cell', {name: '204.50ms'})).toBeInTheDocument();

static/app/views/insights/http/views/httpDomainSummaryPage.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ describe('HTTPSummaryPage', function () {
275275
expect(screen.getByRole('cell', {name: 'GET /api/users'})).toBeInTheDocument();
276276
expect(screen.getByRole('link', {name: 'GET /api/users'})).toHaveAttribute(
277277
'href',
278-
'/organizations/org-slug/insights/http/domains/?domain=%2A.sentry.dev&project=8&statsPeriod=10d&transaction=%2Fapi%2Fusers&transactionMethod=GET&transactionsCursor=0%3A20%3A0'
278+
'/organizations/org-slug/insights/backend/http/domains/?domain=%2A.sentry.dev&project=8&statsPeriod=10d&transaction=%2Fapi%2Fusers&transactionMethod=GET&transactionsCursor=0%3A20%3A0'
279279
);
280280
expect(screen.getByRole('cell', {name: '17.9/s'})).toBeInTheDocument();
281281
expect(screen.getByRole('cell', {name: '97%'})).toBeInTheDocument();

static/app/views/insights/http/views/httpLandingPage.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ describe('HTTPLandingPage', function () {
300300
expect(screen.getByRole('cell', {name: '*.sentry.io'})).toBeInTheDocument();
301301
expect(screen.getByRole('link', {name: '*.sentry.io'})).toHaveAttribute(
302302
'href',
303-
'/organizations/org-slug/insights/http/domains/?domain=%2A.sentry.io&project=1&statsPeriod=10d'
303+
'/organizations/org-slug/insights/backend/http/domains/?domain=%2A.sentry.io&project=1&statsPeriod=10d'
304304
);
305305
expect(
306306
screen.getAllByRole('cell', {name: 'View Project Details'})[0]

static/app/views/insights/mobile/appStarts/components/tables/spanOperationTable.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('SpanOpSelector', function () {
9494

9595
expect(screen.getByRole('link', {name: 'Application Init'})).toHaveAttribute(
9696
'href',
97-
'/organizations/org-slug/insights/app-startup/spans/?spanDescription=Application%20Init&spanGroup=7f4be68f08c0455f&spanOp=app.start.warm&transaction=foo-bar'
97+
'/organizations/org-slug/insights/mobile/app-startup/spans/?spanDescription=Application%20Init&spanGroup=7f4be68f08c0455f&spanOp=app.start.warm&transaction=foo-bar'
9898
);
9999
});
100100

static/app/views/insights/mobile/screenRendering/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export const SUMMARY_PAGE_BASE_URL = 'details';
1414

1515
export const SUMMARY_PAGE_TITLE = t('Render Summary');
1616

17-
export const MODULE_FEATURES = ['insights-addon-modules', 'insights-domain-view'];
17+
export const MODULE_FEATURES = ['insights-addon-modules'];

static/app/views/insights/pages/ai/aiOverviewPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function AiOverviewPage() {
134134

135135
return (
136136
<Feature
137-
features="insights-domain-view"
137+
features="performance-view"
138138
organization={organization}
139139
renderDisabled={NoAccess}
140140
>

static/app/views/insights/pages/backend/backendOverviewPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function BackendOverviewPage() {
166166

167167
return (
168168
<Feature
169-
features="insights-domain-view"
169+
features="performance-view"
170170
organization={organization}
171171
renderDisabled={NoAccess}
172172
>

0 commit comments

Comments
 (0)