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 efb4061cbe2..85771c3b30b 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -19,41 +19,41 @@ This page contains a list of available feature toggles. To learn how to turn on Some stable features are enabled by default. You can disable a stable feature by setting the feature flag to "false" in the configuration. -| Feature toggle name | Description | Enabled by default | -| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | | -| `database_metrics` | Add Prometheus metrics for database tables | | -| `featureHighlights` | Highlight Grafana Enterprise features | | -| `cloudWatchDynamicLabels` | Use dynamic labels instead of alias patterns in CloudWatch datasource | Yes | -| `dataConnectionsConsole` | Enables a new top-level page called Connections. This page is an experiment that provides a better experience when you install and configure data sources and other plugins. | Yes | -| `internationalization` | Enables internationalization | Yes | -| `topnav` | Enables new top navigation and page layouts | Yes | -| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | -| `newPanelChromeUI` | Show updated look and feel of grafana-ui PanelChrome: panel header, icons, and menu | Yes | -| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | | -| `emptyDashboardPage` | Enable the redesigned user interface of a dashboard page that includes no panels | Yes | -| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | | -| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes | -| `useCachingService` | When turned on, the new query and resource caching implementation using a wire service inject will be used in place of the previous middleware implementation | | -| `disableElasticsearchBackendQuerying` | Disable the processing of queries and responses in the Elasticsearch data source through backend | | +| Feature toggle name | Description | Enabled by default | +| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | | +| `database_metrics` | Add Prometheus metrics for database tables | | +| `featureHighlights` | Highlight Grafana Enterprise features | | +| `cloudWatchDynamicLabels` | Use dynamic labels instead of alias patterns in CloudWatch datasource | Yes | +| `dataConnectionsConsole` | Enables a new top-level page called Connections. This page is an experiment that provides a better experience when you install and configure data sources and other plugins. | Yes | +| `internationalization` | Enables internationalization | Yes | +| `topnav` | Enables new top navigation and page layouts | Yes | +| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes | +| `newPanelChromeUI` | Show updated look and feel of grafana-ui PanelChrome: panel header, icons, and menu | Yes | +| `accessTokenExpirationCheck` | Enable OAuth access_token expiration check and token refresh using the refresh_token | | +| `emptyDashboardPage` | Enable the redesigned user interface of a dashboard page that includes no panels | Yes | +| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | | +| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes | +| `useCachingService` | When turned on, the new query and resource caching implementation using a wire service inject will be used in place of the previous middleware implementation | | ## Beta feature toggles -| Feature toggle name | Description | -| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `trimDefaults` | Use cue schema to remove values that will be applied automatically | -| `panelTitleSearch` | Search for dashboards using panel title | -| `prometheusAzureOverrideAudience` | Experimental. Allow override default AAD audience for Azure Prometheus endpoint | -| `migrationLocking` | Lock database during migrations | -| `correlations` | Correlations page | -| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services | -| `validateDashboardsOnSave` | Validate dashboard JSON POSTed to api/dashboards/db | -| `autoMigrateOldPanels` | Migrate old angular panels to supported versions (graph, table-old, worldmap, etc) | -| `disableAngular` | Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime. | -| `grpcServer` | Run the GRPC server | -| `accessControlOnCall` | Access control primitives for OnCall | -| `alertingNoNormalState` | Stop maintaining state of alerts that are not firing | -| `renderAuthJWT` | Uses JWT-based auth for rendering instead of relying on remote cache | +| Feature toggle name | Description | +| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `trimDefaults` | Use cue schema to remove values that will be applied automatically | +| `panelTitleSearch` | Search for dashboards using panel title | +| `prometheusAzureOverrideAudience` | Experimental. Allow override default AAD audience for Azure Prometheus endpoint | +| `migrationLocking` | Lock database during migrations | +| `correlations` | Correlations page | +| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services | +| `validateDashboardsOnSave` | Validate dashboard JSON POSTed to api/dashboards/db | +| `autoMigrateOldPanels` | Migrate old angular panels to supported versions (graph, table-old, worldmap, etc) | +| `disableAngular` | Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime. | +| `grpcServer` | Run the GRPC server | +| `accessControlOnCall` | Access control primitives for OnCall | +| `alertingNoNormalState` | Stop maintaining state of alerts that are not firing | +| `renderAuthJWT` | Uses JWT-based auth for rendering instead of relying on remote cache | +| `enableElasticsearchBackendQuerying` | Enable the processing of queries and responses in the Elasticsearch data source through backend | ## Alpha feature toggles diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 0ff1038aadd..c0f11a0d3a4 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -95,6 +95,6 @@ export interface FeatureToggles { externalServiceAuth?: boolean; dataplaneFrontendFallback?: boolean; useCachingService?: boolean; - disableElasticsearchBackendQuerying?: boolean; + enableElasticsearchBackendQuerying?: boolean; authenticationConfigUI?: boolean; } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index b2232ae0ddb..add101533a4 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -515,9 +515,9 @@ var ( RequiresRestart: true, }, { - Name: "disableElasticsearchBackendQuerying", - Description: "Disable the processing of queries and responses in the Elasticsearch data source through backend", - State: FeatureStateStable, + Name: "enableElasticsearchBackendQuerying", + Description: "Enable the processing of queries and responses in the Elasticsearch data source through backend", + State: FeatureStateBeta, Owner: grafanaObservabilityLogsSquad, }, { diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 125fdde4775..9bc4f460056 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -76,5 +76,5 @@ pyroscopeFlameGraph,alpha,@grafana/observability-traces-and-profiling,false,fals externalServiceAuth,alpha,@grafana/grafana-authnz-team,true,false,false,false dataplaneFrontendFallback,alpha,@grafana/observability-metrics,false,false,false,true useCachingService,stable,@grafana/grafana-operator-experience-squad,false,false,true,false -disableElasticsearchBackendQuerying,stable,@grafana/observability-logs,false,false,false,false +enableElasticsearchBackendQuerying,beta,@grafana/observability-logs,false,false,false,false authenticationConfigUI,alpha,@grafana/grafana-authnz-team,false,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 3758432afa3..ec864dd4e7c 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -315,9 +315,9 @@ const ( // When turned on, the new query and resource caching implementation using a wire service inject will be used in place of the previous middleware implementation FlagUseCachingService = "useCachingService" - // FlagDisableElasticsearchBackendQuerying - // Disable the processing of queries and responses in the Elasticsearch data source through backend - FlagDisableElasticsearchBackendQuerying = "disableElasticsearchBackendQuerying" + // FlagEnableElasticsearchBackendQuerying + // Enable the processing of queries and responses in the Elasticsearch data source through backend + FlagEnableElasticsearchBackendQuerying = "enableElasticsearchBackendQuerying" // FlagAuthenticationConfigUI // Enables authentication configuration UI diff --git a/public/app/plugins/datasource/elasticsearch/datasource.test.ts b/public/app/plugins/datasource/elasticsearch/datasource.test.ts index 4936257d09c..b470338f836 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.test.ts +++ b/public/app/plugins/datasource/elasticsearch/datasource.test.ts @@ -43,12 +43,6 @@ jest.mock('@grafana/runtime', () => ({ }, }; }, - config: { - buildInfo: {}, - featureToggles: { - disableElasticsearchBackendQuerying: true, - }, - }, })); const TIMESRV_START = [2022, 8, 21, 6, 10, 10]; diff --git a/public/app/plugins/datasource/elasticsearch/datasource.ts b/public/app/plugins/datasource/elasticsearch/datasource.ts index 2defa6c8526..38842c63ca4 100644 --- a/public/app/plugins/datasource/elasticsearch/datasource.ts +++ b/public/app/plugins/datasource/elasticsearch/datasource.ts @@ -502,8 +502,8 @@ export class ElasticDatasource } getLogRowContext = async (row: LogRowModel, options?: LogRowContextOptions): Promise<{ data: DataFrame[] }> => { - const { disableElasticsearchBackendQuerying } = config.featureToggles; - if (!disableElasticsearchBackendQuerying) { + const { enableElasticsearchBackendQuerying } = config.featureToggles; + if (enableElasticsearchBackendQuerying) { const contextRequest = this.makeLogContextDataRequest(row, options); return lastValueFrom( @@ -680,8 +680,8 @@ export class ElasticDatasource } query(request: DataQueryRequest): Observable { - const { disableElasticsearchBackendQuerying } = config.featureToggles; - if (!disableElasticsearchBackendQuerying) { + const { enableElasticsearchBackendQuerying } = config.featureToggles; + if (enableElasticsearchBackendQuerying) { const start = new Date(); return super.query(request).pipe(tap((response) => trackQuery(response, request, start))); }