Skip to content

chore(perf-issues): Add a flag and check it to allow customer to disable detectors #91734

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,15 @@ def put(self, request: Request, project) -> Response:
)

body_has_admin_options = any([option in request.data for option in internal_only_settings])
if body_has_admin_options and not superuser_has_permission(request):
if (
body_has_admin_options
and not superuser_has_permission(request)
and not features.has(
"organizations:performance-manage-detectors",
project.organization,
actor=request.user,
)
):
return Response(
{
"detail": {
Expand Down
6 changes: 2 additions & 4 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,14 @@ def register_temporary_features(manager: FeatureManager):
manager.add("organizations:ownership-size-limit-large", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable xlarge ownership rule file size limit
manager.add("organizations:ownership-size-limit-xlarge", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable project admins to enable/disable performance detectors
manager.add("organizations:performance-manage-detectors", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable mobile performance score calculation for transactions in relay
manager.add("organizations:performance-calculate-mobile-perf-score-relay", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, api_expose=False)
# Enable performance change explorer panel on trends page
manager.add("organizations:performance-change-explorer", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable interpolation of null data points in charts instead of zerofilling in performance
manager.add("organizations:performance-chart-interpolation", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable consecutive http performance issue type
manager.add("organizations:performance-consecutive-http-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, api_expose=False)
# Enable Discover Saved Query dataset selector
manager.add("organizations:performance-discover-dataset-selector", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable deprecate discover widget type
Expand All @@ -222,8 +222,6 @@ def register_temporary_features(manager: FeatureManager):
manager.add("organizations:performance-issues-search", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=True, api_expose=False)
# Detect performance issues in the new standalone spans pipeline instead of on transactions
manager.add("organizations:performance-issues-spans", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, default=False, api_expose=False)
# Enable consecutive http performance issue type
manager.add("organizations:performance-large-http-payload-detector", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, api_expose=False)
# Enable internal view for bannerless MEP view
manager.add("organizations:performance-mep-bannerless-ui", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Re-enable histograms for Metrics Enhanced Performance Views
Expand Down
Loading