Prometheus: Enable prometheusDataplane by default (#67100)

* Prometheus: Enable prometheusDataplane by default
and related mitigation toggle dataplaneFrontendFallback
original PRs with the toggles:
 - https://github.com/grafana/grafana/pull/65237
 - https://github.com/grafana/grafana/pull/62694
This commit is contained in:
Kyle Brandt 2023-04-24 13:29:54 -04:00 committed by GitHub
parent dcf53dbb3b
commit e57e0769ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 94 additions and 92 deletions

View File

@ -19,23 +19,25 @@ 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 |
| `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes | | `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | 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 | | | `prometheusDataplane` | Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present. | Yes |
| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | 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 ## Beta feature toggles
@ -64,54 +66,52 @@ Some stable features are enabled by default. You can disable a stable feature by
These features are early in their development lifecycle and so are not yet supported in Grafana Cloud. These features are early in their development lifecycle and so are not yet supported in Grafana Cloud.
Alpha features might be changed or removed without prior notice. Alpha features might be changed or removed without prior notice.
| Feature toggle name | Description | | Feature toggle name | Description |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ---------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `live-service-web-worker` | This will use a webworker thread to processes events rather than the main thread | | `live-service-web-worker` | This will use a webworker thread to processes events rather than the main thread |
| `queryOverLive` | Use Grafana Live WebSocket to execute backend queries | | `queryOverLive` | Use Grafana Live WebSocket to execute backend queries |
| `publicDashboards` | Enables public access to dashboards | | `publicDashboards` | Enables public access to dashboards |
| `publicDashboardsEmailSharing` | Enables public dashboard sharing to be restricted to only allowed emails | | `publicDashboardsEmailSharing` | Enables public dashboard sharing to be restricted to only allowed emails |
| `lokiLive` | Support WebSocket streaming for loki (early prototype) | | `lokiLive` | Support WebSocket streaming for loki (early prototype) |
| `storage` | Configurable storage for dashboards, datasources, and resources | | `storage` | Configurable storage for dashboards, datasources, and resources |
| `newTraceViewHeader` | Shows the new trace view header | | `newTraceViewHeader` | Shows the new trace view header |
| `datasourceQueryMultiStatus` | Introduce HTTP 207 Multi Status for api/ds/query | | `datasourceQueryMultiStatus` | Introduce HTTP 207 Multi Status for api/ds/query |
| `traceToMetrics` | Enable trace to metrics links | | `traceToMetrics` | Enable trace to metrics links |
| `prometheusWideSeries` | Enable wide series responses in the Prometheus datasource | | `prometheusWideSeries` | Enable wide series responses in the Prometheus datasource |
| `canvasPanelNesting` | Allow elements nesting | | `canvasPanelNesting` | Allow elements nesting |
| `scenes` | Experimental framework to build interactive dashboards | | `scenes` | Experimental framework to build interactive dashboards |
| `disableSecretsCompatibility` | Disable duplicated secret storage in legacy tables | | `disableSecretsCompatibility` | Disable duplicated secret storage in legacy tables |
| `logRequestsInstrumentedAsUnknown` | Logs the path for requests that are instrumented as unknown | | `logRequestsInstrumentedAsUnknown` | Logs the path for requests that are instrumented as unknown |
| `redshiftAsyncQueryDataSupport` | Enable async query data support for Redshift | | `redshiftAsyncQueryDataSupport` | Enable async query data support for Redshift |
| `athenaAsyncQueryDataSupport` | Enable async query data support for Athena | | `athenaAsyncQueryDataSupport` | Enable async query data support for Athena |
| `showDashboardValidationWarnings` | Show warnings when dashboards do not validate against the schema | | `showDashboardValidationWarnings` | Show warnings when dashboards do not validate against the schema |
| `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query | | `mysqlAnsiQuotes` | Use double quotes to escape keyword in a MySQL query |
| `showTraceId` | Show trace ids for requests | | `showTraceId` | Show trace ids for requests |
| `datasourceOnboarding` | Enable data source onboarding page | | `datasourceOnboarding` | Enable data source onboarding page |
| `authnService` | Use new auth service to perform authentication | | `authnService` | Use new auth service to perform authentication |
| `alertingBacktesting` | Rule backtesting API for alerting | | `alertingBacktesting` | Rule backtesting API for alerting |
| `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files | | `editPanelCSVDragAndDrop` | Enables drag and drop for CSV and Excel files |
| `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | | `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals |
| `lokiQuerySplittingConfig` | Give users the option to configure split durations for Loki queries | | `lokiQuerySplittingConfig` | Give users the option to configure split durations for Loki queries |
| `individualCookiePreferences` | Support overriding cookie preferences per user | | `individualCookiePreferences` | Support overriding cookie preferences per user |
| `onlyExternalOrgRoleSync` | Prohibits a user from changing organization roles synced with external auth providers | | `onlyExternalOrgRoleSync` | Prohibits a user from changing organization roles synced with external auth providers |
| `traceqlSearch` | Enables the 'TraceQL Search' tab for the Tempo datasource which provides a UI to generate TraceQL queries | | `traceqlSearch` | Enables the 'TraceQL Search' tab for the Tempo datasource which provides a UI to generate TraceQL queries |
| `prometheusMetricEncyclopedia` | Replaces the Prometheus query builder metric select option with a paginated and filterable component | | `prometheusMetricEncyclopedia` | Replaces the Prometheus query builder metric select option with a paginated and filterable component |
| `timeSeriesTable` | Enable time series table transformer & sparkline cell type | | `timeSeriesTable` | Enable time series table transformer & sparkline cell type |
| `prometheusResourceBrowserCache` | Displays browser caching options in Prometheus data source configuration | | `prometheusResourceBrowserCache` | Displays browser caching options in Prometheus data source configuration |
| `influxdbBackendMigration` | Query InfluxDB InfluxQL without the proxy | | `influxdbBackendMigration` | Query InfluxDB InfluxQL without the proxy |
| `clientTokenRotation` | Replaces the current in-request token rotation so that the client initiates the rotation | | `clientTokenRotation` | Replaces the current in-request token rotation so that the client initiates the rotation |
| `prometheusDataplane` | Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present. | | `lokiMetricDataplane` | Changes responses from Loki to be compliant with the dataplane specification. |
| `lokiMetricDataplane` | Changes responses from Loki to be compliant with the dataplane specification. | | `disableSSEDataplane` | Disables dataplane specific processing in server side expressions. |
| `alertStateHistoryLokiSecondary` | Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations. | | `alertStateHistoryLokiSecondary` | Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations. |
| `alertStateHistoryLokiPrimary` | Enable a remote Loki instance as the primary source for state history reads. | | `alertStateHistoryLokiPrimary` | Enable a remote Loki instance as the primary source for state history reads. |
| `alertStateHistoryLokiOnly` | Disable Grafana alerts from emitting annotations when a remote Loki instance is available. | | `alertStateHistoryLokiOnly` | Disable Grafana alerts from emitting annotations when a remote Loki instance is available. |
| `disableSSEDataplane` | Disables dataplane specific processing in server side expressions. | | `unifiedRequestLog` | Writes error logs to the request logger |
| `unifiedRequestLog` | Writes error logs to the request logger | | `pyroscopeFlameGraph` | Changes flame graph to pyroscope one |
| `pyroscopeFlameGraph` | Changes flame graph to pyroscope one | | `authenticationConfigUI` | Enables authentication configuration UI |
| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | | `pluginsAPIManifestKey` | Use grafana.com API to retrieve the public manifest key |
| `authenticationConfigUI` | Enables authentication configuration UI | | `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order, CSV upload and advanced mode |
| `pluginsAPIManifestKey` | Use grafana.com API to retrieve the public manifest key | | `opensearchDetectVersion` | Enable version detection in OpenSearch |
| `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order, CSV upload and advanced mode |
| `opensearchDetectVersion` | Enable version detection in OpenSearch |
## Development feature toggles ## Development feature toggles

View File

@ -83,15 +83,15 @@ export interface FeatureToggles {
clientTokenRotation?: boolean; clientTokenRotation?: boolean;
prometheusDataplane?: boolean; prometheusDataplane?: boolean;
lokiMetricDataplane?: boolean; lokiMetricDataplane?: boolean;
dataplaneFrontendFallback?: boolean;
disableSSEDataplane?: boolean;
alertStateHistoryLokiSecondary?: boolean; alertStateHistoryLokiSecondary?: boolean;
alertStateHistoryLokiPrimary?: boolean; alertStateHistoryLokiPrimary?: boolean;
alertStateHistoryLokiOnly?: boolean; alertStateHistoryLokiOnly?: boolean;
disableSSEDataplane?: boolean;
unifiedRequestLog?: boolean; unifiedRequestLog?: boolean;
renderAuthJWT?: boolean; renderAuthJWT?: boolean;
pyroscopeFlameGraph?: boolean; pyroscopeFlameGraph?: boolean;
externalServiceAuth?: boolean; externalServiceAuth?: boolean;
dataplaneFrontendFallback?: boolean;
useCachingService?: boolean; useCachingService?: boolean;
enableElasticsearchBackendQuerying?: boolean; enableElasticsearchBackendQuerying?: boolean;
authenticationConfigUI?: boolean; authenticationConfigUI?: boolean;

View File

@ -429,7 +429,8 @@ var (
{ {
Name: "prometheusDataplane", Name: "prometheusDataplane",
Description: "Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present.", Description: "Changes responses to from Prometheus to be compliant with the dataplane specification. In particular it sets the numeric Field.Name from 'Value' to the value of the `__name__` label when present.",
State: FeatureStateAlpha, Expression: "true",
State: FeatureStateStable,
Owner: grafanaObservabilityMetricsSquad, Owner: grafanaObservabilityMetricsSquad,
}, },
{ {
@ -438,6 +439,20 @@ var (
State: FeatureStateAlpha, State: FeatureStateAlpha,
Owner: grafanaObservabilityLogsSquad, Owner: grafanaObservabilityLogsSquad,
}, },
{
Name: "dataplaneFrontendFallback",
Description: "Support dataplane contract field name change for transformations and field name matchers where the name is different",
State: FeatureStateStable,
FrontendOnly: true,
Expression: "true",
Owner: grafanaObservabilityMetricsSquad,
},
{
Name: "disableSSEDataplane",
Description: "Disables dataplane specific processing in server side expressions.",
State: FeatureStateAlpha,
Owner: grafanaObservabilityMetricsSquad,
},
{ {
Name: "alertStateHistoryLokiSecondary", Name: "alertStateHistoryLokiSecondary",
Description: "Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations.", Description: "Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations.",
@ -456,12 +471,6 @@ var (
State: FeatureStateAlpha, State: FeatureStateAlpha,
Owner: grafanaAlertingSquad, Owner: grafanaAlertingSquad,
}, },
{
Name: "disableSSEDataplane",
Description: "Disables dataplane specific processing in server side expressions.",
State: FeatureStateAlpha,
Owner: grafanaObservabilityMetricsSquad,
},
{ {
Name: "unifiedRequestLog", Name: "unifiedRequestLog",
Description: "Writes error logs to the request logger", Description: "Writes error logs to the request logger",
@ -487,13 +496,6 @@ var (
RequiresDevMode: true, RequiresDevMode: true,
Owner: grafanaAuthnzSquad, Owner: grafanaAuthnzSquad,
}, },
{
Name: "dataplaneFrontendFallback",
Description: "Support dataplane contract field name change for transformations and field name matchers where the name is different",
State: FeatureStateAlpha,
FrontendOnly: true,
Owner: grafanaObservabilityMetricsSquad,
},
{ {
Name: "useCachingService", Name: "useCachingService",
Description: "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", Description: "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",

View File

@ -62,17 +62,17 @@ timeSeriesTable,alpha,@grafana/app-o11y,false,false,false,true
prometheusResourceBrowserCache,alpha,@grafana/observability-metrics,false,false,false,true prometheusResourceBrowserCache,alpha,@grafana/observability-metrics,false,false,false,true
influxdbBackendMigration,alpha,@grafana/observability-metrics,false,false,false,true influxdbBackendMigration,alpha,@grafana/observability-metrics,false,false,false,true
clientTokenRotation,alpha,@grafana/grafana-authnz-team,false,false,false,false clientTokenRotation,alpha,@grafana/grafana-authnz-team,false,false,false,false
prometheusDataplane,alpha,@grafana/observability-metrics,false,false,false,false prometheusDataplane,stable,@grafana/observability-metrics,false,false,false,false
lokiMetricDataplane,alpha,@grafana/observability-logs,false,false,false,false lokiMetricDataplane,alpha,@grafana/observability-logs,false,false,false,false
dataplaneFrontendFallback,stable,@grafana/observability-metrics,false,false,false,true
disableSSEDataplane,alpha,@grafana/observability-metrics,false,false,false,false
alertStateHistoryLokiSecondary,alpha,@grafana/alerting-squad,false,false,false,false alertStateHistoryLokiSecondary,alpha,@grafana/alerting-squad,false,false,false,false
alertStateHistoryLokiPrimary,alpha,@grafana/alerting-squad,false,false,false,false alertStateHistoryLokiPrimary,alpha,@grafana/alerting-squad,false,false,false,false
alertStateHistoryLokiOnly,alpha,@grafana/alerting-squad,false,false,false,false alertStateHistoryLokiOnly,alpha,@grafana/alerting-squad,false,false,false,false
disableSSEDataplane,alpha,@grafana/observability-metrics,false,false,false,false
unifiedRequestLog,alpha,@grafana/backend-platform,false,false,false,false unifiedRequestLog,alpha,@grafana/backend-platform,false,false,false,false
renderAuthJWT,beta,@grafana/grafana-as-code,false,false,false,false renderAuthJWT,beta,@grafana/grafana-as-code,false,false,false,false
pyroscopeFlameGraph,alpha,@grafana/observability-traces-and-profiling,false,false,false,false pyroscopeFlameGraph,alpha,@grafana/observability-traces-and-profiling,false,false,false,false
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
useCachingService,stable,@grafana/grafana-operator-experience-squad,false,false,true,false useCachingService,stable,@grafana/grafana-operator-experience-squad,false,false,true,false
enableElasticsearchBackendQuerying,beta,@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

1 Name State Owner requiresDevMode RequiresLicense RequiresRestart FrontendOnly
62 prometheusResourceBrowserCache alpha @grafana/observability-metrics false false false true
63 influxdbBackendMigration alpha @grafana/observability-metrics false false false true
64 clientTokenRotation alpha @grafana/grafana-authnz-team false false false false
65 prometheusDataplane alpha stable @grafana/observability-metrics false false false false
66 lokiMetricDataplane alpha @grafana/observability-logs false false false false
67 dataplaneFrontendFallback stable @grafana/observability-metrics false false false true
68 disableSSEDataplane alpha @grafana/observability-metrics false false false false
69 alertStateHistoryLokiSecondary alpha @grafana/alerting-squad false false false false
70 alertStateHistoryLokiPrimary alpha @grafana/alerting-squad false false false false
71 alertStateHistoryLokiOnly alpha @grafana/alerting-squad false false false false
disableSSEDataplane alpha @grafana/observability-metrics false false false false
72 unifiedRequestLog alpha @grafana/backend-platform false false false false
73 renderAuthJWT beta @grafana/grafana-as-code false false false false
74 pyroscopeFlameGraph alpha @grafana/observability-traces-and-profiling false false false false
75 externalServiceAuth alpha @grafana/grafana-authnz-team true false false false
dataplaneFrontendFallback alpha @grafana/observability-metrics false false false true
76 useCachingService stable @grafana/grafana-operator-experience-squad false false true false
77 enableElasticsearchBackendQuerying beta @grafana/observability-logs false false false false
78 authenticationConfigUI alpha @grafana/grafana-authnz-team false false false false

View File

@ -267,6 +267,14 @@ const (
// Changes responses from Loki to be compliant with the dataplane specification. // Changes responses from Loki to be compliant with the dataplane specification.
FlagLokiMetricDataplane = "lokiMetricDataplane" FlagLokiMetricDataplane = "lokiMetricDataplane"
// FlagDataplaneFrontendFallback
// Support dataplane contract field name change for transformations and field name matchers where the name is different
FlagDataplaneFrontendFallback = "dataplaneFrontendFallback"
// FlagDisableSSEDataplane
// Disables dataplane specific processing in server side expressions.
FlagDisableSSEDataplane = "disableSSEDataplane"
// FlagAlertStateHistoryLokiSecondary // FlagAlertStateHistoryLokiSecondary
// Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations. // Enable Grafana to write alert state history to an external Loki instance in addition to Grafana annotations.
FlagAlertStateHistoryLokiSecondary = "alertStateHistoryLokiSecondary" FlagAlertStateHistoryLokiSecondary = "alertStateHistoryLokiSecondary"
@ -279,10 +287,6 @@ const (
// Disable Grafana alerts from emitting annotations when a remote Loki instance is available. // Disable Grafana alerts from emitting annotations when a remote Loki instance is available.
FlagAlertStateHistoryLokiOnly = "alertStateHistoryLokiOnly" FlagAlertStateHistoryLokiOnly = "alertStateHistoryLokiOnly"
// FlagDisableSSEDataplane
// Disables dataplane specific processing in server side expressions.
FlagDisableSSEDataplane = "disableSSEDataplane"
// FlagUnifiedRequestLog // FlagUnifiedRequestLog
// Writes error logs to the request logger // Writes error logs to the request logger
FlagUnifiedRequestLog = "unifiedRequestLog" FlagUnifiedRequestLog = "unifiedRequestLog"
@ -299,10 +303,6 @@ const (
// Starts an OAuth2 authentication provider for external services // Starts an OAuth2 authentication provider for external services
FlagExternalServiceAuth = "externalServiceAuth" FlagExternalServiceAuth = "externalServiceAuth"
// FlagDataplaneFrontendFallback
// Support dataplane contract field name change for transformations and field name matchers where the name is different
FlagDataplaneFrontendFallback = "dataplaneFrontendFallback"
// FlagUseCachingService // FlagUseCachingService
// 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"