Skip to content

Commit 0e82be2

Browse files
wedamijaclaude
andcommitted
feat(flags): Remove graduated mep-rollout-flag feature flag (#108810)
## Summary Removes the `organizations:mep-rollout-flag` feature flag that has been enabled at 100% via flagpole with no conditions. This flag has been fully rolled out and its behavior is now the default. ## Test plan - [ ] CI passes - [ ] Corresponding sentry-options-automator PR to remove flagpole config 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent aca2a85 commit 0e82be2

File tree

15 files changed

+40
-102
lines changed

15 files changed

+40
-102
lines changed

src/sentry/api/endpoints/organization_events.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ class OrganizationEventsEndpoint(OrganizationEventsEndpointBase):
106106

107107
def get_features(self, organization: Organization, request: Request) -> Mapping[str, bool]:
108108
feature_names = [
109-
"organizations:mep-rollout-flag",
110109
"organizations:performance-use-metrics",
111110
"organizations:profiling",
112111
"organizations:dynamic-sampling",

src/sentry/api/endpoints/organization_events_stats.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def get_features(
6868
) -> Mapping[str, bool | None]:
6969
feature_names = [
7070
"organizations:performance-use-metrics",
71-
"organizations:mep-rollout-flag",
7271
"organizations:starfish-view",
7372
"organizations:on-demand-metrics-extraction",
7473
"organizations:on-demand-metrics-extraction-widgets",

src/sentry/api/serializers/models/organization.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,6 @@ def get_feature_set(
399399
feature_set.add("open-membership")
400400
if not getattr(obj.flags, "disable_shared_issues"):
401401
feature_set.add("shared-issues")
402-
if "dynamic-sampling" not in feature_set and "mep-rollout-flag" in feature_set:
403-
feature_set.remove("mep-rollout-flag")
404-
if options.get("performance.hide-metrics-ui") and "mep-rollout-flag" in feature_set:
405-
feature_set.remove("mep-rollout-flag")
406402

407403
return sorted(feature_set)
408404

src/sentry/features/temporary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def register_temporary_features(manager: FeatureManager) -> None:
174174
manager.add("organizations:issue-view-ai-title", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
175175
# Enable Large HTTP Payload Detector Improvements
176176
manager.add("organizations:large-http-payload-detector-improvements", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
177-
manager.add("organizations:mep-rollout-flag", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
177+
178178
manager.add("organizations:mep-use-default-tags", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
179179
# Enable Session Stats down to a minute resolution
180180
manager.add("organizations:minute-resolution-sessions", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=True)

src/sentry/snuba/snuba_query_validator.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,6 @@ def _validate_query(self, data):
296296
% sorted(dataset.name.lower() for dataset in valid_datasets)
297297
)
298298

299-
if (
300-
not features.has(
301-
"organizations:mep-rollout-flag",
302-
self.context["organization"],
303-
actor=self.context.get("user", None),
304-
)
305-
and dataset == Dataset.PerformanceMetrics
306-
and query_type == SnubaQuery.Type.PERFORMANCE
307-
):
308-
raise serializers.ValidationError(
309-
"This project does not have access to the `generic_metrics` dataset"
310-
)
311-
312299
projects = data.get("projects")
313300
if not projects:
314301
# We just need a valid project id from the org so that we can verify
@@ -403,10 +390,7 @@ def _validate_performance_dataset(self, dataset):
403390
has_dynamic_sampling = features.has(
404391
"organizations:dynamic-sampling", self.context["organization"]
405392
)
406-
has_performance_metrics_flag = features.has(
407-
"organizations:mep-rollout-flag", self.context["organization"]
408-
)
409-
has_performance_metrics = has_dynamic_sampling and has_performance_metrics_flag
393+
has_performance_metrics = has_dynamic_sampling
410394

411395
has_on_demand_metrics = features.has(
412396
"organizations:on-demand-metrics-extraction",

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ export function canUseMetricsData(organization: Organization) {
5959
const isInternalViewOn = organization.features.includes(
6060
'performance-transaction-name-only-search'
6161
);
62-
const samplingFeatureFlag = organization.features.includes('dynamic-sampling'); // Exists on AM2 plans only.
63-
const isRollingOut =
64-
samplingFeatureFlag && organization.features.includes('mep-rollout-flag');
62+
const isRollingOut = organization.features.includes('dynamic-sampling'); // Exists on AM2 plans only.
6563

6664
// For plans transitioning from AM2 to AM3, we still want to show metrics
6765
// until 90d after 100% transaction ingestion to avoid spikes in charts

static/app/views/alerts/rules/metric/ruleForm.spec.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ describe('Incident Rules Form', () => {
258258
});
259259

260260
it('creates a rule with generic_metrics dataset', async () => {
261-
organization.features = [...organization.features, 'mep-rollout-flag'];
262261
const rule = MetricRuleFixture();
263262
createWrapper({
264263
rule: {
@@ -583,11 +582,7 @@ describe('Incident Rules Form', () => {
583582
});
584583

585584
it('creates a metrics Apdex rule without satisfaction parameter', async () => {
586-
organization.features = [
587-
...organization.features,
588-
'performance-view',
589-
'mep-rollout-flag',
590-
];
585+
organization.features = [...organization.features, 'performance-view'];
591586

592587
const rule = MetricRuleFixture();
593588
createWrapper({

static/app/views/alerts/rules/metric/ruleForm.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,12 +1047,8 @@ class RuleFormContainer extends DeprecatedAsyncComponent<Props, State> {
10471047

10481048
handleMEPAlertDataset = (data: EventsStats | MultiSeriesEventsStats | null) => {
10491049
const {isMetricsData} = data ?? {};
1050-
const {organization} = this.props;
10511050

1052-
if (
1053-
isMetricsData === undefined ||
1054-
!organization.features.includes('mep-rollout-flag')
1055-
) {
1051+
if (isMetricsData === undefined) {
10561052
return;
10571053
}
10581054

@@ -1213,12 +1209,7 @@ class RuleFormContainer extends DeprecatedAsyncComponent<Props, State> {
12131209
// TODO: once all alerts are migrated to MEP, we can set the default to GENERIC_METRICS and remove this as well as
12141210
// logic in handleMEPDataset, handleTimeSeriesDataFetched and checkOnDemandMetricsDataset
12151211
const {dataset} = this.state;
1216-
const {organization} = this.props;
1217-
const hasMetricsFeatureFlags =
1218-
organization.features.includes('mep-rollout-flag') ||
1219-
hasOnDemandMetricAlertFeature(organization);
1220-
1221-
if (hasMetricsFeatureFlags && dataset === Dataset.TRANSACTIONS) {
1212+
if (dataset === Dataset.TRANSACTIONS) {
12221213
return Dataset.GENERIC_METRICS;
12231214
}
12241215
return dataset;

static/app/views/alerts/rules/metric/utils/getMetricDatasetQueryExtras.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ export function getMetricDatasetQueryExtras({
5757

5858
const hasMetricDataset =
5959
hasOnDemandMetricAlertFeature(organization) ||
60-
organization.features.includes('mep-rollout-flag') ||
6160
organization.features.includes('dashboards-metrics-transition');
6261
const disableMetricDataset =
6362
decodeScalar(location?.query?.disableMetricDataset) === 'true';

static/app/views/detectors/datasetConfig/transactions.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ export const DetectorTransactionsConfig: DetectorDatasetConfig<TransactionsSerie
8787

8888
const hasMetricDataset =
8989
hasOnDemandMetricAlertFeature(options.organization) ||
90-
options.organization.features.includes('mep-rollout-flag') ||
9190
options.organization.features.includes('dashboards-metrics-transition');
9291
const isOnDemandQuery =
9392
options.dataset === Dataset.GENERIC_METRICS &&

0 commit comments

Comments
 (0)