diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index 30374f38aa3..ab8dad22ef3 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -189,6 +189,7 @@ Experimental features might be changed or removed without prior notice. | `newFolderPicker` | Enables the nested folder picker without having nested folders enabled | | `onPremToCloudMigrationsAlerts` | Enables the migration of alerts and its child resources to your Grafana Cloud stack. Requires `onPremToCloudMigrations` to be enabled in conjunction. | | `onPremToCloudMigrationsAuthApiMig` | Enables the use of auth api instead of gcom for internal token services. Requires `onPremToCloudMigrations` to be enabled in conjunction. | +| `scopeApi` | In-development feature flag for the scope api using the app platform. | | `sqlExpressions` | Enables using SQL and DuckDB functions as Expressions. | | `nodeGraphDotLayout` | Changed the layout algorithm for the node graph | | `kubernetesAggregator` | Enable grafana's embedded kube-aggregator | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 2d78e294e6c..9c23ab2d47a 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -160,6 +160,7 @@ export interface FeatureToggles { onPremToCloudMigrationsAlerts?: boolean; onPremToCloudMigrationsAuthApiMig?: boolean; alertingSaveStatePeriodic?: boolean; + scopeApi?: boolean; promQLScope?: boolean; logQLScope?: boolean; sqlExpressions?: boolean; diff --git a/pkg/registry/apis/scope/register.go b/pkg/registry/apis/scope/register.go index 8e4965666d3..afe6eca4cfd 100644 --- a/pkg/registry/apis/scope/register.go +++ b/pkg/registry/apis/scope/register.go @@ -29,7 +29,8 @@ func NewScopeAPIBuilder() *ScopeAPIBuilder { } func RegisterAPIService(features featuremgmt.FeatureToggles, apiregistration builder.APIRegistrar, reg prometheus.Registerer) *ScopeAPIBuilder { - if !features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs) { + if !(features.IsEnabledGlobally(featuremgmt.FlagScopeApi) || + features.IsEnabledGlobally(featuremgmt.FlagGrafanaAPIServerWithExperimentalAPIs)) { return nil // skip registration unless opting into experimental apis } builder := NewScopeAPIBuilder() diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index c8542eaea61..2c9b654252c 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1070,6 +1070,14 @@ var ( FrontendOnly: false, Owner: grafanaAlertingSquad, }, + { + Name: "scopeApi", + Description: "In-development feature flag for the scope api using the app platform.", + Stage: FeatureStageExperimental, + Owner: grafanaAppPlatformSquad, + HideFromAdminPage: true, + Expression: "false", + }, { Name: "promQLScope", Description: "In-development feature that will allow injection of labels into prometheus queries.", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 43c5d1b9170..2896b4d9eea 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -141,6 +141,7 @@ onPremToCloudMigrations,preview,@grafana/grafana-operator-experience-squad,false onPremToCloudMigrationsAlerts,experimental,@grafana/grafana-operator-experience-squad,false,false,false onPremToCloudMigrationsAuthApiMig,experimental,@grafana/grafana-operator-experience-squad,false,false,false alertingSaveStatePeriodic,privatePreview,@grafana/alerting-squad,false,false,false +scopeApi,experimental,@grafana/grafana-app-platform-squad,false,false,false promQLScope,GA,@grafana/observability-metrics,false,false,false logQLScope,privatePreview,@grafana/observability-logs,false,false,false sqlExpressions,experimental,@grafana/grafana-app-platform-squad,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 2f912caa947..588d9c5ff60 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -575,6 +575,10 @@ const ( // Writes the state periodically to the database, asynchronous to rule evaluation FlagAlertingSaveStatePeriodic = "alertingSaveStatePeriodic" + // FlagScopeApi + // In-development feature flag for the scope api using the app platform. + FlagScopeApi = "scopeApi" + // FlagPromQLScope // In-development feature that will allow injection of labels into prometheus queries. FlagPromQLScope = "promQLScope" diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 0f692b83d5a..e8ecedb79fb 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -3130,6 +3130,20 @@ "frontend": true } }, + { + "metadata": { + "name": "scopeApi", + "resourceVersion": "1732690644377", + "creationTimestamp": "2024-11-27T06:57:24Z" + }, + "spec": { + "description": "In-development feature flag for the scope api using the app platform.", + "stage": "experimental", + "codeowner": "@grafana/grafana-app-platform-squad", + "hideFromAdminPage": true, + "expression": "false" + } + }, { "metadata": { "name": "scopeFilters",