Skip to content

Commit c4030a9

Browse files
feat(dashboards): Adds a feature flag to enable synchronizing all prebuilt dashboards (#105429)
We already have an existing `dashboards.prebuilt-dashboard-ids` that controls which prebuilt dashboards are synced for all orgs across each region. However, we often want to test new prebuilt dashboards internally before releasing to all regions. Adds a `organizations:dashboards-sync-all-registered-prebuilt-dashboard` feature flag that enables syncing all registered prebuilt dashboards for this purpose.
1 parent 5b46705 commit c4030a9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/sentry/dashboards/endpoints/organization_dashboards.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ def sync_prebuilt_dashboards(organization: Organization) -> None:
136136
dashboard
137137
for dashboard in PREBUILT_DASHBOARDS
138138
if dashboard["prebuilt_id"] in enabled_prebuilt_dashboard_ids
139+
or features.has(
140+
"organizations:dashboards-sync-all-registered-prebuilt-dashboards",
141+
organization,
142+
)
139143
]
140144

141145
saved_prebuilt_dashboards = Dashboard.objects.filter(

src/sentry/features/temporary.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ def register_temporary_features(manager: FeatureManager) -> None:
288288
manager.add("organizations:insights-http-dashboard-migration", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
289289
# Enable Mobile Vitals Insights module on dashboards platform
290290
manager.add("organizations:insights-mobile-vitals-dashboard-migration", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
291+
# Enable all registered prebuilt dashboards to be synced to the database
292+
manager.add("organizations:dashboards-sync-all-registered-prebuilt-dashboards", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
291293
# Enable sentry convention fields
292294
manager.add("organizations:performance-sentry-conventions-fields", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
293295
# Enable querying spans fields stats from comparative workflows project

0 commit comments

Comments
 (0)