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

@ -20,7 +20,7 @@ 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 | |
@ -35,6 +35,8 @@ Some stable features are enabled by default. You can disable a stable feature by
| `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 |
| `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 | | | `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
@ -65,7 +67,7 @@ These features are early in their development lifecycle and so are not yet suppo
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 |
@ -99,15 +101,13 @@ Alpha features might be changed or removed without prior notice.
| `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 |
| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different |
| `authenticationConfigUI` | Enables authentication configuration UI | | `authenticationConfigUI` | Enables authentication configuration UI |
| `pluginsAPIManifestKey` | Use grafana.com API to retrieve the public manifest key | | `pluginsAPIManifestKey` | Use grafana.com API to retrieve the public manifest key |
| `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order, CSV upload and advanced mode | | `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order, CSV upload and advanced mode |

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"