From 3013332e4162dfd6081917ace5f0d21ef9edabdd Mon Sep 17 00:00:00 2001 From: ismail simsek Date: Sat, 12 Apr 2025 00:11:19 +0200 Subject: [PATCH] Prometheus: Remove prometheusRunQueriesInParallel feature toggle (#103824) * remove prometheusRunQueriesInParallel feature toggle * fix the unit test --- .../feature-toggles/index.md | 1 - .../src/types/featureToggles.gen.ts | 5 - pkg/promlib/healthcheck_test.go | 2 + pkg/promlib/querydata/framing_test.go | 39 +- pkg/promlib/querydata/request.go | 107 +- pkg/promlib/querydata/request_test.go | 69 +- .../testdata/exemplar.result.golden.jsonc | 1044 +++++++++++++++++ pkg/services/featuremgmt/registry.go | 8 - pkg/services/featuremgmt/toggles_gen.csv | 1 - pkg/services/featuremgmt/toggles_gen.go | 4 - pkg/services/featuremgmt/toggles_gen.json | 3 +- 11 files changed, 1181 insertions(+), 102 deletions(-) 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 9c35f1b9483..0eeb066d7b7 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -32,7 +32,6 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general- | `logsContextDatasourceUi` | Allow datasource to provide custom UI for context view | Yes | | `lokiQuerySplitting` | Split large interval queries into subqueries with smaller time intervals | Yes | | `influxdbBackendMigration` | Query InfluxDB InfluxQL without the proxy | Yes | -| `prometheusRunQueriesInParallel` | Enables running Prometheus queries in parallel | Yes | | `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | Yes | | `unifiedRequestLog` | Writes error logs to the request logger | Yes | | `pluginsDetailsRightPanel` | Enables right panel for the plugins details page | Yes | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 80f8acf7db7..2ae9255e961 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -132,11 +132,6 @@ export interface FeatureToggles { */ influxdbRunQueriesInParallel?: boolean; /** - * Enables running Prometheus queries in parallel - * @default true - */ - prometheusRunQueriesInParallel?: boolean; - /** * Changes logs responses from Loki to be compliant with the dataplane specification. */ lokiLogsDataplane?: boolean; diff --git a/pkg/promlib/healthcheck_test.go b/pkg/promlib/healthcheck_test.go index bb8746f5a0a..a58b98e37a2 100644 --- a/pkg/promlib/healthcheck_test.go +++ b/pkg/promlib/healthcheck_test.go @@ -124,8 +124,10 @@ func getPluginContext() backend.PluginContext { User: nil, AppInstanceSettings: nil, DataSourceInstanceSettings: getPromInstanceSettings(), + GrafanaConfig: backend.NewGrafanaCfg(map[string]string{"concurrent_query_count": "10"}), } } + func getPromInstanceSettings() *backend.DataSourceInstanceSettings { return &backend.DataSourceInstanceSettings{ ID: 0, diff --git a/pkg/promlib/querydata/framing_test.go b/pkg/promlib/querydata/framing_test.go index 3fa48bca92b..be84733ab98 100644 --- a/pkg/promlib/querydata/framing_test.go +++ b/pkg/promlib/querydata/framing_test.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "net/http" + "net/url" "os" "path/filepath" "testing" @@ -20,7 +21,7 @@ import ( "github.com/grafana/grafana/pkg/promlib/models" ) -var update = true +var update = false func TestRangeResponses(t *testing.T) { tt := []struct { @@ -145,10 +146,42 @@ func runQuery(response []byte, q *backend.QueryDataRequest) (*backend.QueryDataR if err != nil { return nil, err } + + // Create initial response res := &http.Response{ StatusCode: 200, Body: io.NopCloser(bytes.NewReader(response)), + Request: &http.Request{ + URL: &url.URL{ + Path: "api/v1/query_range", + }, + }, + } + + // Create a proper clone for the exemplar response with a different path + exemplarRes := &http.Response{ + StatusCode: 200, + Body: io.NopCloser(bytes.NewReader(response)), + Request: &http.Request{ + URL: &url.URL{ + Path: "api/v1/query_exemplars", + }, + }, } - tCtx.httpProvider.setResponse(res, res) - return tCtx.queryData.Execute(context.Background(), q) + + tCtx.httpProvider.setResponse(res, exemplarRes) + + // Add GrafanaConfig to the context to prevent nil pointer dereference + ctx := backend.WithGrafanaConfig(context.Background(), backend.NewGrafanaCfg(map[string]string{ + "concurrent_query_count": "10", + })) + + // Add a PluginContext with GrafanaConfig to the request + q.PluginContext = backend.PluginContext{ + GrafanaConfig: backend.NewGrafanaCfg(map[string]string{ + "concurrent_query_count": "10", + }), + } + + return tCtx.queryData.Execute(ctx, q) } diff --git a/pkg/promlib/querydata/request.go b/pkg/promlib/querydata/request.go index 7739bf46222..5f3f9556648 100644 --- a/pkg/promlib/querydata/request.go +++ b/pkg/promlib/querydata/request.go @@ -101,45 +101,32 @@ func (s *QueryData) Execute(ctx context.Context, req *backend.QueryDataRequest) } var ( - hasPromQLScopeFeatureFlag = s.featureToggles.IsEnabled("promQLScope") - hasPrometheusRunQueriesInParallel = s.featureToggles.IsEnabled("prometheusRunQueriesInParallel") + hasPromQLScopeFeatureFlag = s.featureToggles.IsEnabled("promQLScope") + m sync.Mutex ) - if hasPrometheusRunQueriesInParallel { - var ( - m sync.Mutex - ) - - concurrentQueryCount, err := req.PluginContext.GrafanaConfig.ConcurrentQueryCount() - if err != nil { - logger.Debug(fmt.Sprintf("Concurrent Query Count read/parse error: %v", err), "prometheusRunQueriesInParallel") - concurrentQueryCount = 10 - } + concurrentQueryCount, err := req.PluginContext.GrafanaConfig.ConcurrentQueryCount() + if err != nil { + logger.Debug(fmt.Sprintf("Concurrent Query Count read/parse error: %v", err), "prometheusRunQueriesInParallel") + concurrentQueryCount = 10 + } - _ = concurrency.ForEachJob(ctx, len(req.Queries), concurrentQueryCount, func(ctx context.Context, idx int) error { - query := req.Queries[idx] - r := s.handleQuery(ctx, query, fromAlert, hasPromQLScopeFeatureFlag, true) - if r != nil { - m.Lock() - result.Responses[query.RefID] = *r - m.Unlock() - } - return nil - }) - } else { - for _, q := range req.Queries { - r := s.handleQuery(ctx, q, fromAlert, hasPromQLScopeFeatureFlag, false) - if r != nil { - result.Responses[q.RefID] = *r - } + _ = concurrency.ForEachJob(ctx, len(req.Queries), concurrentQueryCount, func(ctx context.Context, idx int) error { + query := req.Queries[idx] + r := s.handleQuery(ctx, query, fromAlert, hasPromQLScopeFeatureFlag) + if r != nil { + m.Lock() + result.Responses[query.RefID] = *r + m.Unlock() } - } + return nil + }) return &result, nil } func (s *QueryData) handleQuery(ctx context.Context, bq backend.DataQuery, fromAlert, - hasPromQLScopeFeatureFlag, hasPrometheusRunQueriesInParallel bool) *backend.DataResponse { + hasPromQLScopeFeatureFlag bool) *backend.DataResponse { traceCtx, span := s.tracer.Start(ctx, "datasource.prometheus") defer span.End() query, err := models.Parse(span, bq, s.TimeInterval, s.intervalCalculator, fromAlert, hasPromQLScopeFeatureFlag) @@ -149,14 +136,14 @@ func (s *QueryData) handleQuery(ctx context.Context, bq backend.DataQuery, fromA } } - r := s.fetch(traceCtx, s.client, query, hasPrometheusRunQueriesInParallel) + r := s.fetch(traceCtx, s.client, query) if r == nil { s.log.FromContext(ctx).Debug("Received nil response from runQuery", "query", query.Expr) } return r } -func (s *QueryData) fetch(traceCtx context.Context, client *client.Client, q *models.Query, hasPrometheusRunQueriesInParallel bool) *backend.DataResponse { +func (s *QueryData) fetch(traceCtx context.Context, client *client.Client, q *models.Query) *backend.DataResponse { logger := s.log.FromContext(traceCtx) logger.Debug("Sending query", "start", q.Start, "end", q.End, "step", q.Step, "query", q.Expr /*, "queryTimeout", s.QueryTimeout*/) @@ -171,61 +158,41 @@ func (s *QueryData) fetch(traceCtx context.Context, client *client.Client, q *mo ) if q.InstantQuery { - if hasPrometheusRunQueriesInParallel { - wg.Add(1) - go func() { - defer wg.Done() - res := s.instantQuery(traceCtx, client, q) - m.Lock() - addDataResponse(&res, dr) - m.Unlock() - }() - } else { + wg.Add(1) + go func() { + defer wg.Done() res := s.instantQuery(traceCtx, client, q) + m.Lock() addDataResponse(&res, dr) - } + m.Unlock() + }() } if q.RangeQuery { - if hasPrometheusRunQueriesInParallel { - wg.Add(1) - go func() { - defer wg.Done() - res := s.rangeQuery(traceCtx, client, q) - m.Lock() - addDataResponse(&res, dr) - m.Unlock() - }() - } else { + wg.Add(1) + go func() { + defer wg.Done() res := s.rangeQuery(traceCtx, client, q) + m.Lock() addDataResponse(&res, dr) - } + m.Unlock() + }() } if q.ExemplarQuery { - if hasPrometheusRunQueriesInParallel { - wg.Add(1) - go func() { - defer wg.Done() - res := s.exemplarQuery(traceCtx, client, q) - m.Lock() - if res.Error != nil { - // If exemplar query returns error, we want to only log it and - // continue with other results processing - logger.Error("Exemplar query failed", "query", q.Expr, "err", res.Error) - } - dr.Frames = append(dr.Frames, res.Frames...) - m.Unlock() - }() - } else { + wg.Add(1) + go func() { + defer wg.Done() res := s.exemplarQuery(traceCtx, client, q) + m.Lock() if res.Error != nil { // If exemplar query returns error, we want to only log it and // continue with other results processing logger.Error("Exemplar query failed", "query", q.Expr, "err", res.Error) } dr.Frames = append(dr.Frames, res.Frames...) - } + m.Unlock() + }() } wg.Wait() diff --git a/pkg/promlib/querydata/request_test.go b/pkg/promlib/querydata/request_test.go index d462b82d693..64797c18873 100644 --- a/pkg/promlib/querydata/request_test.go +++ b/pkg/promlib/querydata/request_test.go @@ -96,15 +96,26 @@ func TestPrometheus_parseTimeSeriesResponse(t *testing.T) { // Test fields require.Len(t, res, 2) - require.Equal(t, res[0].Name, "exemplar") - require.Equal(t, res[0].Fields[0].Name, "Time") - require.Equal(t, res[0].Fields[1].Name, "Value") - require.Len(t, res[0].Fields, 6) + // Find the exemplar frame + var exemplarFrame *data.Frame + var rangeFrame *data.Frame + for _, frame := range res { + if frame.Name == "exemplar" { + exemplarFrame = frame + } else { + rangeFrame = frame + } + } + require.NotNil(t, exemplarFrame) + require.NotNil(t, rangeFrame) + require.Equal(t, "Time", exemplarFrame.Fields[0].Name) + require.Equal(t, "Value", exemplarFrame.Fields[1].Name) + require.Len(t, exemplarFrame.Fields, 6) // Test correct values (sampled to 2) - require.Equal(t, res[0].Fields[1].Len(), 4) - require.Equal(t, res[0].Fields[1].At(0), 0.009545445) - require.Equal(t, res[0].Fields[1].At(3), 0.003535405) + require.Equal(t, 4, exemplarFrame.Fields[1].Len()) + require.Equal(t, 0.009545445, exemplarFrame.Fields[1].At(0)) + require.Equal(t, 0.003535405, exemplarFrame.Fields[1].At(3)) }) t.Run("matrix response should be parsed normally", func(t *testing.T) { @@ -379,6 +390,11 @@ func executeWithHeaders(tctx *testContext, query backend.DataQuery, rqr any, eqr req := backend.QueryDataRequest{ Queries: []backend.DataQuery{query}, Headers: headers, + PluginContext: backend.PluginContext{ + GrafanaConfig: backend.NewGrafanaCfg(map[string]string{ + "concurrent_query_count": "10", + }), + }, } rangeRes, err := toAPIResponse(rqr) @@ -399,7 +415,12 @@ func executeWithHeaders(tctx *testContext, query backend.DataQuery, rqr any, eqr }() tctx.httpProvider.setResponse(rangeRes, exemplarRes) - res, err := tctx.queryData.Execute(context.Background(), &req) + // Create context with GrafanaConfig + ctx := backend.WithGrafanaConfig(context.Background(), backend.NewGrafanaCfg(map[string]string{ + "concurrent_query_count": "10", + })) + + res, err := tctx.queryData.Execute(ctx, &req) if err != nil { return nil, err } @@ -505,7 +526,37 @@ func (p *fakeHttpClientProvider) GetTransport(opts ...httpclient.Options) (http. func (p *fakeHttpClientProvider) setResponse(rangeRes *http.Response, exemplarRes *http.Response) { p.rangeRes = rangeRes - p.exemplarRes = exemplarRes + + // Create a proper clone manually ensuring we have a fresh response + if exemplarRes != nil { + bodyBytes, _ := io.ReadAll(exemplarRes.Body) + err := exemplarRes.Body.Close() // Close the original + if err != nil { + fmt.Println(fmt.Errorf("exemplarRes body close error: %v", err)) + return + } + + // Create a new request if the original has one + var newRequest *http.Request + if exemplarRes.Request != nil { + newRequest = &http.Request{ + Method: exemplarRes.Request.Method, + URL: exemplarRes.Request.URL, + Header: exemplarRes.Request.Header.Clone(), + } + } + + // Create a new response with the same data but new body + p.exemplarRes = &http.Response{ + StatusCode: exemplarRes.StatusCode, + Body: io.NopCloser(bytes.NewReader(bodyBytes)), + Request: newRequest, + Header: exemplarRes.Header.Clone(), + } + + // Reset the original body with a new reader + exemplarRes.Body = io.NopCloser(bytes.NewReader(bodyBytes)) + } } func (p *fakeHttpClientProvider) RoundTrip(req *http.Request) (*http.Response, error) { diff --git a/pkg/promlib/testdata/exemplar.result.golden.jsonc b/pkg/promlib/testdata/exemplar.result.golden.jsonc index 3cb50356f90..4430212d03e 100644 --- a/pkg/promlib/testdata/exemplar.result.golden.jsonc +++ b/pkg/promlib/testdata/exemplar.result.golden.jsonc @@ -29,6 +29,36 @@ // +-----------------------------------+-----------------+--------------------------------------------+----------------+-------------------+-------------------+----------------+----------------+--------------------+----------------+------------------+-----------------+-------------------+----------------------------------+ // // +// +// Frame[1] { +// "typeVersion": [ +// 0, +// 0 +// ], +// "custom": { +// "resultType": "exemplar" +// } +// } +// Name: exemplar +// Dimensions: 14 Fields by 62 Rows +// +-----------------------------------+-----------------+--------------------------------------------+----------------+-------------------+-------------------+----------------+----------------+--------------------+----------------+------------------+-----------------+-------------------+----------------------------------+ +// | Name: Time | Name: Value | Name: __name__ | Name: group | Name: http_method | Name: http_target | Name: instance | Name: le | Name: service | Name: source | Name: span_kind | Name: span_name | Name: span_status | Name: traceID | +// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | +// | Type: []time.Time | Type: []float64 | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | Type: []string | +// +-----------------------------------+-----------------+--------------------------------------------+----------------+-------------------+-------------------+----------------+----------------+--------------------+----------------+------------------+-----------------+-------------------+----------------------------------+ +// | 2022-06-01 12:28:31.809 +0000 UTC | 0.001162 | traces_spanmetrics_duration_seconds_bucket | mythical | | | f1c32fe505c3 | 0.002 | mythical-server | tempo | SPAN_KIND_CLIENT | pg.query:INSERT | STATUS_CODE_ERROR | 94809f37ec6cc984f2eb2b14a9f8036e | +// | 2022-06-01 12:28:36.81 +0000 UTC | 0.134971 | traces_spanmetrics_duration_seconds_bucket | mythical | | | f1c32fe505c3 | 0.256 | mythical-requester | tempo | SPAN_KIND_CLIENT | requester | STATUS_CODE_OK | 46e15ae41852149068aeb26c64643c29 | +// | 2022-06-01 12:28:36.81 +0000 UTC | 0.090381 | traces_spanmetrics_duration_seconds_bucket | mythical | POST | /loki/api/v1/push | f1c32fe505c3 | 0.128 | mythical-server | tempo | SPAN_KIND_CLIENT | HTTP POST | STATUS_CODE_OK | 46e15ae41852149068aeb26c64643c29 | +// | 2022-06-01 12:28:36.81 +0000 UTC | 0.029188 | traces_spanmetrics_duration_seconds_bucket | mythical | GET | /manticore | f1c32fe505c3 | 0.032 | mythical-server | tempo | SPAN_KIND_SERVER | GET /:endpoint | STATUS_CODE_OK | 1e58dc2083eceb454846f9ab343a79ff | +// | 2022-06-01 12:28:41.809 +0000 UTC | 0.05719 | traces_spanmetrics_duration_seconds_bucket | mythical | | | f1c32fe505c3 | 0.064 | mythical-requester | tempo | SPAN_KIND_CLIENT | requester | STATUS_CODE_OK | d6ff032e85e6e5719a1f6b923042765f | +// | 2022-06-01 12:28:46.809 +0000 UTC | 0.071953 | traces_spanmetrics_duration_seconds_bucket | mythical | | | f1c32fe505c3 | 0.128 | mythical-requester | tempo | SPAN_KIND_CLIENT | requester | STATUS_CODE_OK | b12280a11924d98f7001f9b03779c6bc | +// | 2022-06-01 12:28:46.809 +0000 UTC | 0.041812 | traces_spanmetrics_duration_seconds_bucket | mythical | GET | /unicorn | f1c32fe505c3 | 0.064 | mythical-server | tempo | SPAN_KIND_SERVER | GET /:endpoint | STATUS_CODE_OK | b12280a11924d98f7001f9b03779c6bc | +// | 2022-06-01 12:28:56.809 +0000 UTC | 0.013244 | traces_spanmetrics_duration_seconds_bucket | mythical | | | f1c32fe505c3 | 0.016 | mythical-requester | tempo | SPAN_KIND_CLIENT | log_to_loki | STATUS_CODE_OK | 43cd491719146ad9c706d73b4870512c | +// | 2022-06-01 12:29:06.809 +0000 UTC | 0.070504 | traces_spanmetrics_duration_seconds_bucket | mythical | | | f1c32fe505c3 | 0.128 | mythical-requester | tempo | SPAN_KIND_CLIENT | requester | STATUS_CODE_OK | e08c737b2dc96959a8dda2cb76c91de7 | +// | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | +// +-----------------------------------+-----------------+--------------------------------------------+----------------+-------------------+-------------------+----------------+----------------+--------------------+----------------+------------------+-----------------+-------------------+----------------------------------+ +// +// // 🌟 This was machine generated. Do not edit. 🌟 { "status": 200, @@ -1046,6 +1076,1020 @@ ] ] } + }, + { + "schema": { + "name": "exemplar", + "meta": { + "typeVersion": [ + 0, + 0 + ], + "custom": { + "resultType": "exemplar" + } + }, + "fields": [ + { + "name": "Time", + "type": "time", + "typeInfo": { + "frame": "time.Time" + } + }, + { + "name": "Value", + "type": "number", + "typeInfo": { + "frame": "float64" + } + }, + { + "name": "__name__", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "group", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "http_method", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "http_target", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "instance", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "le", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "service", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "source", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "span_kind", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "span_name", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "span_status", + "type": "string", + "typeInfo": { + "frame": "string" + } + }, + { + "name": "traceID", + "type": "string", + "typeInfo": { + "frame": "string" + } + } + ] + }, + "data": { + "values": [ + [ + 1654086511809, + 1654086516810, + 1654086516810, + 1654086516810, + 1654086521809, + 1654086526809, + 1654086526809, + 1654086536809, + 1654086546809, + 1654086546809, + 1654086546809, + 1654086561810, + 1654086566809, + 1654086566809, + 1654086571809, + 1654086576810, + 1654086576810, + 1654086586809, + 1654086591809, + 1654086591809, + 1654086601809, + 1654086606809, + 1654086616810, + 1654086621809, + 1654086626810, + 1654086631809, + 1654086636809, + 1654086641809, + 1654086646809, + 1654086651809, + 1654086651809, + 1654086661809, + 1654086666809, + 1654086666809, + 1654086676809, + 1654086676809, + 1654086686809, + 1654086696809, + 1654086701809, + 1654086701809, + 1654086706809, + 1654086716809, + 1654086716809, + 1654086721809, + 1654086721809, + 1654086731809, + 1654086731809, + 1654086741809, + 1654086741809, + 1654086746809, + 1654086751809, + 1654086761809, + 1654086761809, + 1654086766809, + 1654086766809, + 1654086776809, + 1654086786809, + 1654086786809, + 1654086791809, + 1654086796809, + 1654086801809, + 1654086801809 + ], + [ + 0.001162, + 0.134971, + 0.090381, + 0.029188, + 0.05719, + 0.071953, + 0.041812, + 0.013244, + 0.070504, + 0.038753, + 0.010491, + 0.01785, + 0.074616, + 0.046192, + 0.067413, + 0.038985, + 0.010387, + 0.055778, + 0.090068, + 0.026474, + 0.020916, + 0.051105, + 0.010103, + 0.038904, + 0.069116, + 0.036012, + 0.06704, + 0.007759, + 0.046809, + 0.076668, + 0.01864, + 0.037142, + 0.066299, + 0.008877, + 0.072569, + 0.038946, + 0.010457, + 0.021391, + 0.089991, + 0.049446, + 0.011579, + 0.068599, + 0.039792, + 0.067805, + 0.010759, + 0.099291, + 0.039441, + 0.06673, + 0.03671, + 0.008554, + 0.039395, + 0.071128, + 0.010549, + 0.043282, + 0.014027, + 0.072983, + 0.070787, + 0.009928, + 0.037937, + 0.010333, + 0.067877, + 0.038846 + ], + [ + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket", + "traces_spanmetrics_duration_seconds_bucket" + ], + [ + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical", + "mythical" + ], + [ + "", + "", + "POST", + "GET", + "", + "", + "GET", + "", + "", + "GET", + "", + "", + "", + "", + "", + "GET", + "", + "", + "", + "GET", + "", + "", + "", + "GET", + "", + "GET", + "", + "", + "GET", + "", + "", + "", + "", + "", + "", + "POST", + "", + "POST", + "", + "", + "POST", + "", + "GET", + "", + "", + "", + "", + "", + "GET", + "POST", + "GET", + "", + "", + "POST", + "", + "", + "", + "", + "GET", + "", + "", + "" + ], + [ + "", + "", + "/loki/api/v1/push", + "/manticore", + "", + "", + "/unicorn", + "", + "", + "/manticore", + "", + "", + "", + "", + "", + "/manticore", + "", + "", + "", + "/manticore", + "", + "", + "", + "/manticore", + "", + "/unicorn", + "", + "", + "/unicorn", + "", + "", + "", + "", + "", + "", + "/loki/api/v1/push", + "", + "/loki/api/v1/push", + "", + "", + "/beholder", + "", + "/manticore", + "", + "", + "", + "", + "", + "/manticore", + "/loki/api/v1/push", + "/manticore", + "", + "", + "/loki/api/v1/push", + "", + "", + "", + "", + "/manticore", + "", + "", + "" + ], + [ + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3", + "f1c32fe505c3" + ], + [ + "0.002", + "0.256", + "0.128", + "0.032", + "0.064", + "0.128", + "0.064", + "0.016", + "0.128", + "0.064", + "0.016", + "0.032", + "0.128", + "0.064", + "0.128", + "0.064", + "0.016", + "0.064", + "0.128", + "0.032", + "0.032", + "0.064", + "0.016", + "0.064", + "0.128", + "0.064", + "0.128", + "0.008", + "0.064", + "0.128", + "0.032", + "0.064", + "0.128", + "0.016", + "0.128", + "0.064", + "0.016", + "0.032", + "0.128", + "0.064", + "0.016", + "0.128", + "0.064", + "0.128", + "0.016", + "0.128", + "0.064", + "0.128", + "0.064", + "0.016", + "0.064", + "0.128", + "0.016", + "0.064", + "0.016", + "0.128", + "0.128", + "0.016", + "0.064", + "0.016", + "0.128", + "0.064" + ], + [ + "mythical-server", + "mythical-requester", + "mythical-server", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-server", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-server", + "mythical-server", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-server", + "mythical-server", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-server", + "mythical-server", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-requester", + "mythical-requester", + "mythical-requester", + "mythical-server", + "mythical-server", + "mythical-server", + "mythical-requester", + "mythical-server" + ], + [ + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo", + "tempo" + ], + [ + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_UNSPECIFIED", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + "SPAN_KIND_CLIENT", + "SPAN_KIND_UNSPECIFIED" + ], + [ + "pg.query:INSERT", + "requester", + "HTTP POST", + "GET /:endpoint", + "requester", + "requester", + "GET /:endpoint", + "log_to_loki", + "requester", + "GET /:endpoint", + "pg.query:INSERT", + "log_to_loki", + "requester", + "dns.lookup", + "requester", + "GET /:endpoint", + "pg.query:DELETE", + "requester", + "requester", + "GET /:endpoint", + "requester", + "requester", + "log_to_loki", + "GET /:endpoint", + "requester", + "GET /:endpoint", + "requester", + "log_to_loki", + "GET /:endpoint", + "requester", + "dns.lookup", + "pg.query:INSERT", + "requester", + "tcp.connect", + "requester", + "HTTP POST", + "pg.query:INSERT", + "HTTP POST", + "requester", + "requester", + "POST /:endpoint", + "requester", + "GET /:endpoint", + "requester", + "requester", + "requester", + "pg.query:SELECT", + "requester", + "GET /:endpoint", + "HTTP POST", + "GET /:endpoint", + "requester", + "requester", + "HTTP POST", + "log_to_loki", + "requester", + "requester", + "pg.query:SELECT", + "GET /:endpoint", + "pg.query:DELETE", + "requester", + "tcp.connect" + ], + [ + "STATUS_CODE_ERROR", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET", + "STATUS_CODE_OK", + "STATUS_CODE_UNSET" + ], + [ + "94809f37ec6cc984f2eb2b14a9f8036e", + "46e15ae41852149068aeb26c64643c29", + "46e15ae41852149068aeb26c64643c29", + "1e58dc2083eceb454846f9ab343a79ff", + "d6ff032e85e6e5719a1f6b923042765f", + "b12280a11924d98f7001f9b03779c6bc", + "b12280a11924d98f7001f9b03779c6bc", + "43cd491719146ad9c706d73b4870512c", + "e08c737b2dc96959a8dda2cb76c91de7", + "654d578991bcc53c7de88912a8660488", + "8dec2e77ca64f1cc665afc43b3b1623f", + "e5f765faeb401c335355e0bb79e33b83", + "68d98aae947863f11a7863cd92421038", + "61386de633427db6bb2e5fd216518b3c", + "a17f9f61386f57e7ef85acedc120f82", + "3b4e33abe16c115448759924138cc775", + "ccfb65171f9957871c792f9e7ba4caf0", + "62110ace7888d4e116a0d6182e3ef880", + "1c5d32e0675734a7d86c6146cfef54e1", + "ee885d6d0fa1949978667532d7b50b40", + "45128087f18fb412c24394ed10826446", + "3855df04789862c55b23ca3726fd700a", + "ff6a99aa5fd60f6fbcf0f838164f87ea", + "ca2f23783ee1c390e446f02f7a27cf4", + "2699255777b784b20c8e42bb7889f607", + "72c7ff318a7bb17b6e38aa0f4e94c955", + "78b31a3856158fb296920170f15b2663", + "e81a28f6ee9b468cdac757b825b17623", + "a5277cb54e46140aa3ae489109e1ebc8", + "9ed79aa36a4c6b4c53c7f54e77e6489c", + "9ed79aa36a4c6b4c53c7f54e77e6489c", + "5ec0bc7cc644f654c04190b1cc16d39", + "2d6bde392e5b69cb55588219ce605cbc", + "7c42490bd4361a83bb8ee827b89387ae", + "1b9024f2c2042d52b82d22c36597ec3f", + "1b9024f2c2042d52b82d22c36597ec3f", + "da0d4ef26ef65b5d9c446a51b8662895", + "b1a28a72cc2a4991b2cec793530d605", + "c642d0d7df516be0390080402991b79f", + "a05d1517c61ea0c4ab76b39ab645c9b6", + "2dc68b746bbd6c6958f25c3dbb1ea110", + "ec7dc9dd4096d36ebf564427bf30abc8", + "da805bfda5683c80b9a5538c17346217", + "3835f629b97ac7869de9a839b1e2bf2a", + "1f2e6add2566d120c876e5e4f4602432", + "efa3c8aa7380ae77e734f6f655d9c782", + "312e6ef8f9d9b4ffbb4470e772f43660", + "135989a5bb785b94d339caf672590634", + "a58a30a5caee0a451e7b1ae24bc1e33e", + "d4c096aa222e1016b67de881f80978d8", + "3eefbe3d5fb80a96325688a69c5597e3", + "5384591d9cd576d73f86cbe1803d2a46", + "4f1660168b2dcf5a40474d08a587e8dd", + "bd11e06766d5a045d69b201a9c442258", + "60d05233bc4ccb745055ef19af359686", + "a3374ca45cd256cc5bdb6f482c0a2856", + "a30c5021f274710636e84eca64343b4", + "54b4e0377ac7c101278b68134853562a", + "32dfe6e357ffbb98e7148104e2d660a4", + "a11a727138a3de7ca030687340bd19b0", + "a11c1d3d300f07b1e5d688e96069f76b", + "83bf586cc62842c3187106bb40a6793d" + ] + ] + } } ] } \ No newline at end of file diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index d129dfcb25e..821263fdab0 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -206,14 +206,6 @@ var ( FrontendOnly: false, Owner: grafanaPartnerPluginsSquad, }, - { - Name: "prometheusRunQueriesInParallel", - Description: "Enables running Prometheus queries in parallel", - Stage: FeatureStageGeneralAvailability, - FrontendOnly: false, - Owner: grafanaOSSBigTent, - Expression: "true", // enabled by default - }, { Name: "lokiLogsDataplane", Description: "Changes logs responses from Loki to be compliant with the dataplane specification.", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 5621690738b..d78da54546c 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -25,7 +25,6 @@ individualCookiePreferences,experimental,@grafana/grafana-backend-group,false,fa influxdbBackendMigration,GA,@grafana/partner-datasources,false,false,true influxqlStreamingParser,experimental,@grafana/partner-datasources,false,false,false influxdbRunQueriesInParallel,privatePreview,@grafana/partner-datasources,false,false,false -prometheusRunQueriesInParallel,GA,@grafana/oss-big-tent,false,false,false lokiLogsDataplane,experimental,@grafana/observability-logs,false,false,false dataplaneFrontendFallback,GA,@grafana/observability-metrics,false,false,true disableSSEDataplane,experimental,@grafana/observability-metrics,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 24e7598742a..43fba29d483 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -111,10 +111,6 @@ const ( // Enables running InfluxDB Influxql queries in parallel FlagInfluxdbRunQueriesInParallel = "influxdbRunQueriesInParallel" - // FlagPrometheusRunQueriesInParallel - // Enables running Prometheus queries in parallel - FlagPrometheusRunQueriesInParallel = "prometheusRunQueriesInParallel" - // FlagLokiLogsDataplane // Changes logs responses from Loki to be compliant with the dataplane specification. FlagLokiLogsDataplane = "lokiLogsDataplane" diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 730b65d2e3b..554e5686297 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -2583,7 +2583,8 @@ "metadata": { "name": "prometheusRunQueriesInParallel", "resourceVersion": "1743693517832", - "creationTimestamp": "2024-08-12T12:31:39Z" + "creationTimestamp": "2024-08-12T12:31:39Z", + "deletionTimestamp": "2025-04-10T18:16:18Z" }, "spec": { "description": "Enables running Prometheus queries in parallel",