Prometheus: Add support to make parallel queries (#90316)

* Add support for prometheus datasource to make parallel queries

* Incorporate review comments

* Update pkg/promlib/querydata/request.go

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>

* Fix lint

* Add parallel queries behind feature flag

* Fixing lint issue

* Update go.mod

* Update pkg/promlib/querydata/request.go

* Update pkg/promlib/querydata/request.go

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Charandas <542168+charandas@users.noreply.github.com>
This commit is contained in:
Vijay Samuel
2024-08-12 14:31:39 +02:00
committed by GitHub
co-authored by ismail simsek Charandas
parent 369cd6f81e
commit c9ddc688a2
9 changed files with 168 additions and 105 deletions
+7
View File
@@ -319,6 +319,13 @@ var (
FrontendOnly: false,
Owner: grafanaObservabilityMetricsSquad,
},
{
Name: "prometheusRunQueriesInParallel",
Description: "Enables running Prometheus queries in parallel",
Stage: FeatureStagePrivatePreview,
FrontendOnly: false,
Owner: grafanaObservabilityMetricsSquad,
},
{
Name: "prometheusDataplane",
Description: "Changes responses to from Prometheus to be compliant with the dataplane specification. In particular, when this feature toggle is active, the numeric `Field.Name` is set from 'Value' to the value of the `__name__` label.",
+1
View File
@@ -40,6 +40,7 @@ prometheusMetricEncyclopedia,GA,@grafana/observability-metrics,false,false,true
influxdbBackendMigration,GA,@grafana/observability-metrics,false,false,true
influxqlStreamingParser,experimental,@grafana/observability-metrics,false,false,false
influxdbRunQueriesInParallel,privatePreview,@grafana/observability-metrics,false,false,false
prometheusRunQueriesInParallel,privatePreview,@grafana/observability-metrics,false,false,false
prometheusDataplane,GA,@grafana/observability-metrics,false,false,false
lokiMetricDataplane,GA,@grafana/observability-logs,false,false,false
lokiLogsDataplane,experimental,@grafana/observability-logs,false,false,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
40 influxdbBackendMigration GA @grafana/observability-metrics false false true
41 influxqlStreamingParser experimental @grafana/observability-metrics false false false
42 influxdbRunQueriesInParallel privatePreview @grafana/observability-metrics false false false
43 prometheusRunQueriesInParallel privatePreview @grafana/observability-metrics false false false
44 prometheusDataplane GA @grafana/observability-metrics false false false
45 lokiMetricDataplane GA @grafana/observability-logs false false false
46 lokiLogsDataplane experimental @grafana/observability-logs false false false
+4
View File
@@ -171,6 +171,10 @@ const (
// Enables running InfluxDB Influxql queries in parallel
FlagInfluxdbRunQueriesInParallel = "influxdbRunQueriesInParallel"
// FlagPrometheusRunQueriesInParallel
// Enables running Prometheus queries in parallel
FlagPrometheusRunQueriesInParallel = "prometheusRunQueriesInParallel"
// FlagPrometheusDataplane
// Changes responses to from Prometheus to be compliant with the dataplane specification. In particular, when this feature toggle is active, the numeric `Field.Name` is set from &#39;Value&#39; to the value of the `__name__` label.
FlagPrometheusDataplane = "prometheusDataplane"
+12
View File
@@ -2183,6 +2183,18 @@
"frontend": true
}
},
{
"metadata": {
"name": "prometheusRunQueriesInParallel",
"resourceVersion": "1720677541862",
"creationTimestamp": "2024-07-11T05:59:01Z"
},
"spec": {
"description": "Enables running Prometheus queries in parallel",
"stage": "privatePreview",
"codeowner": "@grafana/observability-metrics"
}
},
{
"metadata": {
"name": "publicDashboards",