Tempo: Remove traceQLStreaming feature toggle (#103619)

Remove traceQLStreaming feature toggle and migration
This commit is contained in:
Andre Pereira
2025-04-09 13:57:07 +01:00
committed by GitHub
parent 24474dcb9c
commit ec2cd53b1a
9 changed files with 2 additions and 95 deletions
@@ -39,7 +39,6 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general-
| `recordedQueriesMulti` | Enables writing multiple items from a single query within Recorded Queries | Yes |
| `logsExploreTableVisualisation` | A table visualisation for logs in Explore | Yes |
| `transformationsRedesign` | Enables the transformations redesign | Yes |
| `traceQLStreaming` | Enables response streaming of TraceQL queries of the Tempo data source | |
| `awsAsyncQueryCaching` | Enable caching for async queries for Redshift and Athena. Requires that the datasource has caching and async query support enabled | Yes |
| `angularDeprecationUI` | Display Angular warnings in dashboards and panels | Yes |
| `dashgpt` | Enable AI powered features in dashboards | Yes |
@@ -219,11 +219,6 @@ export interface FeatureToggles {
*/
mlExpressions?: boolean;
/**
* Enables response streaming of TraceQL queries of the Tempo data source
* @default false
*/
traceQLStreaming?: boolean;
/**
* Expose some datasources as apiservers.
*/
datasourceAPIServers?: boolean;
-8
View File
@@ -352,14 +352,6 @@ var (
FrontendOnly: false,
Owner: grafanaAlertingSquad,
},
{
Name: "traceQLStreaming",
Description: "Enables response streaming of TraceQL queries of the Tempo data source",
Stage: FeatureStageGeneralAvailability,
FrontendOnly: true,
Owner: grafanaObservabilityTracesAndProfilingSquad,
Expression: "false",
},
{
Name: "datasourceAPIServers",
Description: "Expose some datasources as apiservers.",
-1
View File
@@ -45,7 +45,6 @@ logsExploreTableVisualisation,GA,@grafana/observability-logs,false,false,true
awsDatasourcesTempCredentials,experimental,@grafana/aws-datasources,false,false,false
transformationsRedesign,GA,@grafana/observability-metrics,false,false,true
mlExpressions,experimental,@grafana/alerting-squad,false,false,false
traceQLStreaming,GA,@grafana/observability-traces-and-profiling,false,false,true
datasourceAPIServers,experimental,@grafana/grafana-app-platform-squad,false,true,false
grafanaAPIServerWithExperimentalAPIs,experimental,@grafana/grafana-app-platform-squad,true,true,false
provisioning,experimental,@grafana/grafana-app-platform-squad,false,true,false
1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
45 awsDatasourcesTempCredentials experimental @grafana/aws-datasources false false false
46 transformationsRedesign GA @grafana/observability-metrics false false true
47 mlExpressions experimental @grafana/alerting-squad false false false
traceQLStreaming GA @grafana/observability-traces-and-profiling false false true
48 datasourceAPIServers experimental @grafana/grafana-app-platform-squad false true false
49 grafanaAPIServerWithExperimentalAPIs experimental @grafana/grafana-app-platform-squad true true false
50 provisioning experimental @grafana/grafana-app-platform-squad false true false
-4
View File
@@ -191,10 +191,6 @@ const (
// Enable support for Machine Learning in server-side expressions
FlagMlExpressions = "mlExpressions"
// FlagTraceQLStreaming
// Enables response streaming of TraceQL queries of the Tempo data source
FlagTraceQLStreaming = "traceQLStreaming"
// FlagDatasourceAPIServers
// Expose some datasources as apiservers.
FlagDatasourceAPIServers = "datasourceAPIServers"
+2 -1
View File
@@ -3031,7 +3031,8 @@
"metadata": {
"name": "traceQLStreaming",
"resourceVersion": "1743693517832",
"creationTimestamp": "2023-07-26T13:33:16Z"
"creationTimestamp": "2023-07-26T13:33:16Z",
"deletionTimestamp": "2025-04-08T12:39:36Z"
},
"spec": {
"description": "Enables response streaming of TraceQL queries of the Tempo data source",
@@ -128,8 +128,6 @@ func (oss *OSSMigrations) AddMigration(mg *Migrator) {
ualert.AddStateResolvedAtColumns(mg)
enableTraceQLStreaming(mg, oss.features != nil && oss.features.IsEnabledGlobally(featuremgmt.FlagTraceQLStreaming))
ualert.AddReceiverActionScopesMigration(mg)
ualert.AddRuleMetadata(mg)
@@ -1,72 +0,0 @@
package migrations
import (
"encoding/json"
"xorm.io/xorm"
. "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
)
func enableTraceQLStreaming(mg *Migrator, enable bool) {
mg.AddMigration("Enable traceQL streaming for all Tempo datasources", &AddTraceQLStreamingToJsonData{Enable: enable})
}
var _ CodeMigration = new(AddTraceQLStreamingToJsonData)
type AddTraceQLStreamingToJsonData struct {
MigrationBase
Enable bool
}
func (m *AddTraceQLStreamingToJsonData) SQL(dialect Dialect) string {
return "code migration"
}
type TempoIdJsonDataDTO struct {
Id int64
JsonData string
}
func (m *AddTraceQLStreamingToJsonData) Exec(sess *xorm.Session, mg *Migrator) error {
datasources := make([]*TempoIdJsonDataDTO, 0)
// Skip update if the feature flag is not enabled but mark the migration as completed
if !m.Enable {
return nil
}
err := sess.SQL("SELECT id, json_data FROM data_source WHERE type = 'tempo'").Find(&datasources)
if err != nil {
return err
}
enabledStreamingMap := map[string]interface{}{
"search": true,
}
for _, ds := range datasources {
var parsedMap map[string]interface{}
if err := json.Unmarshal([]byte(ds.JsonData), &parsedMap); err != nil {
continue
}
// skip datasource if streamingEnabled is already set
if parsedMap["streamingEnabled"] != nil {
continue
}
parsedMap["streamingEnabled"] = enabledStreamingMap
newJsonData, err := json.Marshal(parsedMap)
if err != nil {
return err
}
_, err = sess.Exec("UPDATE data_source SET json_data = ? WHERE id = ?", newJsonData, ds.Id)
if err != nil {
return err
}
}
return err
}
@@ -68,7 +68,6 @@ describe('Tempo data source', () => {
beforeEach(() => (console.error = consoleErrorMock));
describe('runs correctly', () => {
config.featureToggles.traceQLStreaming = true;
jest.spyOn(TempoDatasource.prototype, 'isFeatureAvailable').mockImplementation(() => true);
const handleStreamingQuery = jest.spyOn(TempoDatasource.prototype, 'handleStreamingQuery');
const request = jest.spyOn(TempoDatasource.prototype, '_request');