Skip to content

Commit f4a4ebe

Browse files
wedamijaclaudeDan Fuller
committed
chore: Remove graduated feature flag performance-mep-bannerless-ui (#111147)
This flag is fully rolled out. Remove the flag registration and simplify all gated code paths: MEP banners, indexed events warnings, and metrics cardinality threshold checks now use the graduated behavior directly. <!-- Describe your PR here. --> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Dan Fuller <danfuller@H3FG21463J.local>
1 parent 64a09ce commit f4a4ebe

File tree

17 files changed

+22
-563
lines changed

17 files changed

+22
-563
lines changed

src/sentry/features/temporary.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
223223
manager.add("organizations:performance-issues-search", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=False)
224224
# Detect performance issues in the new standalone spans pipeline instead of on transactions
225225
manager.add("organizations:performance-issues-spans", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=False, api_expose=False)
226-
# Enable internal view for bannerless MEP view
227-
manager.add("organizations:performance-mep-bannerless-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
228226
# Re-enable histograms for Metrics Enhanced Performance Views
229227
manager.add("organizations:performance-mep-reintroduce-histograms", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
230228
# Enable MongoDB support for the Queries module

static/app/components/modals/dashboardWidgetQuerySelectorModal.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export type DashboardWidgetQuerySelectorModalOptions = {
2323
dashboardFilters: DashboardFilters | undefined;
2424
organization: Organization;
2525
widget: Widget;
26-
isMetricsData?: boolean;
2726
};
2827

2928
type Props = ModalRenderProps &
@@ -34,8 +33,7 @@ type Props = ModalRenderProps &
3433
};
3534

3635
function DashboardWidgetQuerySelectorModal(props: Props) {
37-
const {organization, widget, selection, isMetricsData, Body, Header, dashboardFilters} =
38-
props;
36+
const {organization, widget, selection, Body, Header, dashboardFilters} = props;
3937

4038
const renderQueries = () => {
4139
const querySearchBars = widget.queries.map((query, index) => {
@@ -46,9 +44,7 @@ function DashboardWidgetQuerySelectorModal(props: Props) {
4644
},
4745
dashboardFilters,
4846
selection,
49-
organization,
50-
0,
51-
isMetricsData
47+
organization
5248
);
5349
return (
5450
<Fragment key={index}>

static/app/components/modals/dataWidgetViewerModal.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ import {
9898
SESSION_DURATION_ALERT,
9999
WidgetDescription,
100100
} from 'sentry/views/dashboards/widgetCard';
101-
import {
102-
DashboardsMEPProvider,
103-
useDashboardsMEPContext,
104-
} from 'sentry/views/dashboards/widgetCard/dashboardsMEPContext';
101+
import {DashboardsMEPProvider} from 'sentry/views/dashboards/widgetCard/dashboardsMEPContext';
105102
import type {GenericWidgetQueriesResult} from 'sentry/views/dashboards/widgetCard/genericWidgetQueries';
106103
import {IssueWidgetQueries} from 'sentry/views/dashboards/widgetCard/issueWidgetQueries';
107104
import {ReleaseWidgetQueries} from 'sentry/views/dashboards/widgetCard/releaseWidgetQueries';
@@ -907,8 +904,6 @@ function OpenButton({
907904
}: OpenButtonProps) {
908905
let openLabel: string;
909906
let path: string;
910-
const {isMetricsData} = useDashboardsMEPContext();
911-
912907
switch (widget.widgetType) {
913908
case WidgetType.ISSUE:
914909
openLabel = t('Open in Issues');
@@ -940,9 +935,7 @@ function OpenButton({
940935
{...widget, queries: [widget.queries[selectedQueryIndex]!]},
941936
dashboardFilters,
942937
selection,
943-
organization,
944-
0,
945-
isMetricsData
938+
organization
946939
);
947940
break;
948941
}

static/app/components/modals/widgetBuilder/addToDashboardModal.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import {useApi} from 'sentry/utils/useApi';
3333
import {useNavigate} from 'sentry/utils/useNavigate';
3434
import {useParams} from 'sentry/utils/useParams';
3535
import {DashboardCreateLimitWrapper} from 'sentry/views/dashboards/createLimitWrapper';
36-
import {IndexedEventsSelectionAlert} from 'sentry/views/dashboards/indexedEventsSelectionAlert';
3736
import {
3837
assignDefaultLayout,
3938
assignTempId,
@@ -539,7 +538,6 @@ function AddToDashboardModal({
539538
disableTableActions
540539
/>
541540
</WidgetCardWrapper>
542-
<IndexedEventsSelectionAlert widget={widget} />
543541
</MEPSettingProvider>
544542
</DashboardsMEPProvider>
545543
)}

static/app/utils/performance/contexts/metricsCardinality.tsx

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ export function MetricsCardinalityProvider(props: {
112112
...sumsResult.tableData,
113113
}
114114
: null,
115-
!!compatabilityResult.error && !!sumsResult.error,
116-
props.organization
115+
!!compatabilityResult.error && !!sumsResult.error
117116
);
118117

119118
return (
@@ -173,18 +172,14 @@ export const useMetricsCardinalityContext = _useContext;
173172
*/
174173
function getMetricsOutcome(
175174
dataCounts: MergedMetricsData | null,
176-
hasOtherFallbackCondition: boolean,
177-
organization: Organization
175+
hasOtherFallbackCondition: boolean
178176
) {
179177
const fallbackOutcome: MetricDataSwitcherOutcome = {
180178
forceTransactionsOnly: true,
181179
};
182180
const successOutcome: MetricDataSwitcherOutcome = {
183181
forceTransactionsOnly: false,
184182
};
185-
const isOnFallbackThresolds = organization.features.includes(
186-
'performance-mep-bannerless-ui'
187-
);
188183

189184
if (!dataCounts) {
190185
return fallbackOutcome;
@@ -195,15 +190,11 @@ function getMetricsOutcome(
195190
return fallbackOutcome;
196191
}
197192

198-
if (!dataCounts) {
199-
return fallbackOutcome;
200-
}
201-
202193
if (checkNoDataFallback(dataCounts)) {
203194
return fallbackOutcome;
204195
}
205196

206-
if (checkIncompatibleData(dataCounts, isOnFallbackThresolds)) {
197+
if (checkIncompatibleData(dataCounts)) {
207198
return {
208199
shouldWarnIncompatibleSDK: true,
209200
forceTransactionsOnly: true,
@@ -219,7 +210,7 @@ function getMetricsOutcome(
219210
};
220211
}
221212

222-
if (checkIfPartialOtherData(dataCounts, isOnFallbackThresolds)) {
213+
if (checkIfPartialOtherData(dataCounts)) {
223214
return {
224215
shouldNotifyUnnamedTransactions: true,
225216
compatibleProjects,
@@ -241,16 +232,10 @@ function checkNoDataFallback(dataCounts: MergedMetricsData) {
241232
/**
242233
* Fallback and warn if incompatible data found (old specific SDKs).
243234
*/
244-
function checkIncompatibleData(
245-
dataCounts: MergedMetricsData,
246-
isOnFallbackThresolds: boolean
247-
) {
235+
function checkIncompatibleData(dataCounts: MergedMetricsData) {
248236
const counts = normalizeCounts(dataCounts);
249-
if (isOnFallbackThresolds) {
250-
const ratio = counts.nullCount / counts.metricsCount;
251-
return ratio > NULL_THRESHOLD;
252-
}
253-
return counts.nullCount > 0;
237+
const ratio = counts.nullCount / counts.metricsCount;
238+
return ratio > NULL_THRESHOLD;
254239
}
255240

256241
/**
@@ -264,16 +249,10 @@ function checkIfAllOtherData(dataCounts: MergedMetricsData) {
264249
/**
265250
* Show metrics but warn about unnamed transactions.
266251
*/
267-
function checkIfPartialOtherData(
268-
dataCounts: MergedMetricsData,
269-
isOnFallbackThresolds: boolean
270-
) {
252+
function checkIfPartialOtherData(dataCounts: MergedMetricsData) {
271253
const counts = normalizeCounts(dataCounts);
272-
if (isOnFallbackThresolds) {
273-
const ratio = counts.unparamCount / counts.metricsCount;
274-
return ratio > UNPARAM_THRESHOLD;
275-
}
276-
return counts.unparamCount > 0;
254+
const ratio = counts.unparamCount / counts.metricsCount;
255+
return ratio > UNPARAM_THRESHOLD;
277256
}
278257

279258
/**

static/app/views/dashboards/detail.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ import {
6666
getCurrentPageFilters,
6767
getMergedDashboardFilters,
6868
hasUnsavedFilterChanges,
69-
isWidgetUsingTransactionName,
7069
resetPageFilters,
7170
} from 'sentry/views/dashboards/utils';
7271
import {WidgetQueryQueueProvider} from 'sentry/views/dashboards/utils/widgetQueryQueue';
@@ -83,8 +82,6 @@ import {TopBar} from 'sentry/views/navigation/topBar';
8382
import {useHasPageFrameFeature} from 'sentry/views/navigation/useHasPageFrameFeature';
8483
import {generatePerformanceEventView} from 'sentry/views/performance/data';
8584
import {MetricsDataSwitcher} from 'sentry/views/performance/landing/metricsDataSwitcher';
86-
import {MetricsDataSwitcherAlert} from 'sentry/views/performance/landing/metricsDataSwitcherAlert';
87-
import {DiscoverQueryPageSource} from 'sentry/views/performance/utils';
8885

8986
import {PrebuiltDashboardOnboardingGate} from './components/prebuiltDashboardOnboardingGate';
9087
import {Controls} from './controls';
@@ -1176,10 +1173,6 @@ class DashboardDetail extends Component<Props, State> {
11761173

11771174
const eventView = generatePerformanceEventView(location, projects, {});
11781175

1179-
const isDashboardUsingTransaction = dashboard.widgets.some(
1180-
isWidgetUsingTransactionName
1181-
);
1182-
11831176
const pageContent = (
11841177
<Stack flex={1}>
11851178
<OnDemandControlProvider location={location}>
@@ -1263,15 +1256,6 @@ class DashboardDetail extends Component<Props, State> {
12631256
location={location}
12641257
forceTransactions={metricsDataSide.forceTransactionsOnly}
12651258
>
1266-
{isDashboardUsingTransaction ? (
1267-
<MetricsDataSwitcherAlert
1268-
organization={organization}
1269-
eventView={eventView}
1270-
projects={projects}
1271-
source={DiscoverQueryPageSource.DISCOVER}
1272-
{...metricsDataSide}
1273-
/>
1274-
) : null}
12751259
<FiltersBar
12761260
dashboard={modifiedDashboard ?? dashboard}
12771261
filters={(modifiedDashboard ?? dashboard).filters}

static/app/views/dashboards/indexedEventsSelectionAlert.spec.tsx

Lines changed: 0 additions & 41 deletions
This file was deleted.

static/app/views/dashboards/indexedEventsSelectionAlert.tsx

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)