mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Elasticsearch: Change feature toggle for backend migration to enableElasticsearchBackendQuerying (#66500)
* Elasticsearch: Change feature toggle for backend migration to enableElasticsearchBackendQuerying * Update logic in data source * Run test to re-genartate toggle
This commit is contained in:
parent
cab3ba519a
commit
f48c858ca2
@ -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.
|
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 |
|
| Feature toggle name | Description | Enabled by default |
|
||||||
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
| ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||||
| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | |
|
| `disableEnvelopeEncryption` | Disable envelope encryption (emergency only) | |
|
||||||
| `database_metrics` | Add Prometheus metrics for database tables | |
|
| `database_metrics` | Add Prometheus metrics for database tables | |
|
||||||
| `featureHighlights` | Highlight Grafana Enterprise features | |
|
| `featureHighlights` | Highlight Grafana Enterprise features | |
|
||||||
| `cloudWatchDynamicLabels` | Use dynamic labels instead of alias patterns in CloudWatch datasource | Yes |
|
| `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 |
|
| `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 |
|
| `internationalization` | Enables internationalization | Yes |
|
||||||
| `topnav` | Enables new top navigation and page layouts | Yes |
|
| `topnav` | Enables new top navigation and page layouts | Yes |
|
||||||
| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | 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 |
|
| `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 | |
|
| `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 |
|
| `emptyDashboardPage` | Enable the redesigned user interface of a dashboard page that includes no panels | Yes |
|
||||||
| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | |
|
| `disablePrometheusExemplarSampling` | Disable Prometheus exemplar sampling | |
|
||||||
| `logsSampleInExplore` | Enables access to the logs sample feature in Explore | Yes |
|
| `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 | |
|
| `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 | |
|
|
||||||
|
|
||||||
## Beta feature toggles
|
## Beta feature toggles
|
||||||
|
|
||||||
| Feature toggle name | Description |
|
| Feature toggle name | Description |
|
||||||
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `trimDefaults` | Use cue schema to remove values that will be applied automatically |
|
| `trimDefaults` | Use cue schema to remove values that will be applied automatically |
|
||||||
| `panelTitleSearch` | Search for dashboards using panel title |
|
| `panelTitleSearch` | Search for dashboards using panel title |
|
||||||
| `prometheusAzureOverrideAudience` | Experimental. Allow override default AAD audience for Azure Prometheus endpoint |
|
| `prometheusAzureOverrideAudience` | Experimental. Allow override default AAD audience for Azure Prometheus endpoint |
|
||||||
| `migrationLocking` | Lock database during migrations |
|
| `migrationLocking` | Lock database during migrations |
|
||||||
| `correlations` | Correlations page |
|
| `correlations` | Correlations page |
|
||||||
| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services |
|
| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services |
|
||||||
| `validateDashboardsOnSave` | Validate dashboard JSON POSTed to api/dashboards/db |
|
| `validateDashboardsOnSave` | Validate dashboard JSON POSTed to api/dashboards/db |
|
||||||
| `autoMigrateOldPanels` | Migrate old angular panels to supported versions (graph, table-old, worldmap, etc) |
|
| `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. |
|
| `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 |
|
| `grpcServer` | Run the GRPC server |
|
||||||
| `accessControlOnCall` | Access control primitives for OnCall |
|
| `accessControlOnCall` | Access control primitives for OnCall |
|
||||||
| `alertingNoNormalState` | Stop maintaining state of alerts that are not firing |
|
| `alertingNoNormalState` | Stop maintaining state of alerts that are not firing |
|
||||||
| `renderAuthJWT` | Uses JWT-based auth for rendering instead of relying on remote cache |
|
| `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
|
## Alpha feature toggles
|
||||||
|
|
||||||
|
@ -95,6 +95,6 @@ export interface FeatureToggles {
|
|||||||
externalServiceAuth?: boolean;
|
externalServiceAuth?: boolean;
|
||||||
dataplaneFrontendFallback?: boolean;
|
dataplaneFrontendFallback?: boolean;
|
||||||
useCachingService?: boolean;
|
useCachingService?: boolean;
|
||||||
disableElasticsearchBackendQuerying?: boolean;
|
enableElasticsearchBackendQuerying?: boolean;
|
||||||
authenticationConfigUI?: boolean;
|
authenticationConfigUI?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -515,9 +515,9 @@ var (
|
|||||||
RequiresRestart: true,
|
RequiresRestart: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "disableElasticsearchBackendQuerying",
|
Name: "enableElasticsearchBackendQuerying",
|
||||||
Description: "Disable the processing of queries and responses in the Elasticsearch data source through backend",
|
Description: "Enable the processing of queries and responses in the Elasticsearch data source through backend",
|
||||||
State: FeatureStateStable,
|
State: FeatureStateBeta,
|
||||||
Owner: grafanaObservabilityLogsSquad,
|
Owner: grafanaObservabilityLogsSquad,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -76,5 +76,5 @@ pyroscopeFlameGraph,alpha,@grafana/observability-traces-and-profiling,false,fals
|
|||||||
externalServiceAuth,alpha,@grafana/grafana-authnz-team,true,false,false,false
|
externalServiceAuth,alpha,@grafana/grafana-authnz-team,true,false,false,false
|
||||||
dataplaneFrontendFallback,alpha,@grafana/observability-metrics,false,false,false,true
|
dataplaneFrontendFallback,alpha,@grafana/observability-metrics,false,false,false,true
|
||||||
useCachingService,stable,@grafana/grafana-operator-experience-squad,false,false,true,false
|
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
|
authenticationConfigUI,alpha,@grafana/grafana-authnz-team,false,false,false,false
|
||||||
|
|
@ -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
|
// 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"
|
FlagUseCachingService = "useCachingService"
|
||||||
|
|
||||||
// FlagDisableElasticsearchBackendQuerying
|
// FlagEnableElasticsearchBackendQuerying
|
||||||
// Disable the processing of queries and responses in the Elasticsearch data source through backend
|
// Enable the processing of queries and responses in the Elasticsearch data source through backend
|
||||||
FlagDisableElasticsearchBackendQuerying = "disableElasticsearchBackendQuerying"
|
FlagEnableElasticsearchBackendQuerying = "enableElasticsearchBackendQuerying"
|
||||||
|
|
||||||
// FlagAuthenticationConfigUI
|
// FlagAuthenticationConfigUI
|
||||||
// Enables authentication configuration UI
|
// Enables authentication configuration UI
|
||||||
|
@ -43,12 +43,6 @@ jest.mock('@grafana/runtime', () => ({
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
config: {
|
|
||||||
buildInfo: {},
|
|
||||||
featureToggles: {
|
|
||||||
disableElasticsearchBackendQuerying: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const TIMESRV_START = [2022, 8, 21, 6, 10, 10];
|
const TIMESRV_START = [2022, 8, 21, 6, 10, 10];
|
||||||
|
@ -502,8 +502,8 @@ export class ElasticDatasource
|
|||||||
}
|
}
|
||||||
|
|
||||||
getLogRowContext = async (row: LogRowModel, options?: LogRowContextOptions): Promise<{ data: DataFrame[] }> => {
|
getLogRowContext = async (row: LogRowModel, options?: LogRowContextOptions): Promise<{ data: DataFrame[] }> => {
|
||||||
const { disableElasticsearchBackendQuerying } = config.featureToggles;
|
const { enableElasticsearchBackendQuerying } = config.featureToggles;
|
||||||
if (!disableElasticsearchBackendQuerying) {
|
if (enableElasticsearchBackendQuerying) {
|
||||||
const contextRequest = this.makeLogContextDataRequest(row, options);
|
const contextRequest = this.makeLogContextDataRequest(row, options);
|
||||||
|
|
||||||
return lastValueFrom(
|
return lastValueFrom(
|
||||||
@ -680,8 +680,8 @@ export class ElasticDatasource
|
|||||||
}
|
}
|
||||||
|
|
||||||
query(request: DataQueryRequest<ElasticsearchQuery>): Observable<DataQueryResponse> {
|
query(request: DataQueryRequest<ElasticsearchQuery>): Observable<DataQueryResponse> {
|
||||||
const { disableElasticsearchBackendQuerying } = config.featureToggles;
|
const { enableElasticsearchBackendQuerying } = config.featureToggles;
|
||||||
if (!disableElasticsearchBackendQuerying) {
|
if (enableElasticsearchBackendQuerying) {
|
||||||
const start = new Date();
|
const start = new Date();
|
||||||
return super.query(request).pipe(tap((response) => trackQuery(response, request, start)));
|
return super.query(request).pipe(tap((response) => trackQuery(response, request, start)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user