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 fd74f62cce2..2d532682028 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -49,7 +49,6 @@ Some features are enabled by default. You can disable these feature by setting t | `cloudWatchLogsMonacoEditor` | Enables the Monaco editor for CloudWatch Logs queries | Yes | | `recordedQueriesMulti` | Enables writing multiple items from a single query within Recorded Queries | Yes | | `transformationsRedesign` | Enables the transformations redesign | Yes | -| `azureMonitorDataplane` | Adds dataplane compliant frame metadata in the Azure Monitor datasource | Yes | | `prometheusConfigOverhaulAuth` | Update the Prometheus configuration page with the new auth component | Yes | | `dashgpt` | Enable AI powered features in dashboards | Yes | | `newBrowseDashboards` | New browse/manage dashboards UI | Yes | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 7ff2582a88a..d36bdf58eae 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -110,7 +110,6 @@ export interface FeatureToggles { featureToggleAdminPage?: boolean; awsAsyncQueryCaching?: boolean; splitScopes?: boolean; - azureMonitorDataplane?: boolean; traceToProfiles?: boolean; permissionsFilterRemoveSubquery?: boolean; prometheusConfigOverhaulAuth?: boolean; diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index d4d59da8614..26bc1820b36 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -670,14 +670,6 @@ var ( Owner: identityAccessTeam, RequiresRestart: true, }, - { - Name: "azureMonitorDataplane", - Description: "Adds dataplane compliant frame metadata in the Azure Monitor datasource", - Stage: FeatureStageGeneralAvailability, - Owner: grafanaPartnerPluginsSquad, - Expression: "true", // on by default - AllowSelfServe: falsePtr, - }, { Name: "traceToProfiles", Description: "Enables linking between traces and profiles", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 5e0b28750fe..035e80170e6 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -91,7 +91,6 @@ grafanaAPIServerWithExperimentalAPIs,experimental,@grafana/grafana-app-platform- featureToggleAdminPage,experimental,@grafana/grafana-operator-experience-squad,false,false,true,false awsAsyncQueryCaching,preview,@grafana/aws-datasources,false,false,false,false splitScopes,preview,@grafana/identity-access-team,false,false,true,false -azureMonitorDataplane,GA,@grafana/partner-datasources,false,false,false,false traceToProfiles,experimental,@grafana/observability-traces-and-profiling,false,false,false,true permissionsFilterRemoveSubquery,experimental,@grafana/backend-platform,false,false,false,false prometheusConfigOverhaulAuth,GA,@grafana/observability-metrics,false,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index b6dc6a7222a..bc07d86027b 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -375,10 +375,6 @@ const ( // Support faster dashboard and folder search by splitting permission scopes into parts FlagSplitScopes = "splitScopes" - // FlagAzureMonitorDataplane - // Adds dataplane compliant frame metadata in the Azure Monitor datasource - FlagAzureMonitorDataplane = "azureMonitorDataplane" - // FlagTraceToProfiles // Enables linking between traces and profiles FlagTraceToProfiles = "traceToProfiles" diff --git a/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go b/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go index b3c9fcc88d7..86d6aa23e2f 100644 --- a/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go +++ b/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go @@ -393,9 +393,7 @@ func (e *AzureMonitorDatasource) parseResponse(amr types.AzureMonitorResponse, q } frame := data.NewFrameOfFieldTypes("", len(series.Data), data.FieldTypeTime, data.FieldTypeNullableFloat64) - if e.Features.IsEnabled(featuremgmt.FlagAzureMonitorDataplane) { - frame.Meta = &data.FrameMeta{Type: data.FrameTypeTimeSeriesMulti, TypeVersion: data.FrameTypeVersion{0, 1}} - } + frame.Meta = &data.FrameMeta{Type: data.FrameTypeTimeSeriesMulti, TypeVersion: data.FrameTypeVersion{0, 1}} frame.RefID = query.RefID timeField := frame.Fields[0] timeField.Name = data.TimeSeriesTimeFieldName diff --git a/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource_test.go b/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource_test.go index abc82c0b64d..f09fa76c177 100644 --- a/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource_test.go +++ b/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource_test.go @@ -365,20 +365,11 @@ func TestCustomNamespace(t *testing.T) { }) } -type fakeFeatureToggles struct { - flags map[string]bool -} - -func (f *fakeFeatureToggles) IsEnabled(feature string) bool { - return f.flags[feature] -} - func TestAzureMonitorParseResponse(t *testing.T) { resources := map[string]dataquery.AzureMonitorResource{} resources["/subscriptions/12345678-aaaa-bbbb-cccc-123456789abc/resourceGroups/grafanastaging/providers/Microsoft.Compute/virtualMachines/grafana"] = dataquery.AzureMonitorResource{ResourceGroup: strPtr("grafanastaging"), ResourceName: strPtr("grafana")} subscription := "12345678-aaaa-bbbb-cccc-123456789abc" - datasource := &AzureMonitorDatasource{Features: &fakeFeatureToggles{flags: map[string]bool{"azureMonitorDataplane": true}}} tests := []struct { name string @@ -386,7 +377,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { mockQuery *types.AzureMonitorQuery expectedFrames data.Frames queryIntervalMS int64 - datasource *AzureMonitorDatasource }{ { name: "average aggregate time series response", @@ -399,7 +389,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "total aggregate time series response", @@ -412,7 +401,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "maximum aggregate time series response", @@ -425,7 +413,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "minimum aggregate time series response", @@ -438,7 +425,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "count aggregate time series response", @@ -451,7 +437,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "single dimension time series response", @@ -464,7 +449,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "with alias patterns in the query", @@ -478,7 +462,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "single dimension with alias", @@ -492,7 +475,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "multiple dimension time series response with label alias", @@ -506,7 +488,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: map[string]dataquery.AzureMonitorResource{"/subscriptions/12345678-aaaa-bbbb-cccc-123456789abc/resourceGroups/grafanatest/providers/Microsoft.Storage/storageAccounts/testblobaccount/blobServices/default/providers/Microsoft.Insights/metrics": {ResourceGroup: strPtr("grafanatest"), ResourceName: strPtr("testblobaccount")}}, Subscription: subscription, }, - datasource: datasource, }, { name: "unspecified unit with alias should not panic", @@ -520,7 +501,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "with legacy azure monitor query properties and without a resource uri", @@ -534,7 +514,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "with legacy azure monitor query properties and with a resource uri it should use the resource uri", @@ -548,7 +527,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "multiple time series response", @@ -561,7 +539,6 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, }, { name: "multiple time series response with multiple dimensions", @@ -574,27 +551,14 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, - datasource: datasource, - }, - { - name: "non-dataplane compliant response", - responseFile: "azuremonitor/11-azure-monitor-non-dataplane-response.json", - mockQuery: &types.AzureMonitorQuery{ - URL: "/subscriptions/12345678-aaaa-bbbb-cccc-123456789abc/resourceGroups/grafanastaging/providers/Microsoft.Compute/virtualMachines/grafana/providers/microsoft.insights/metrics", - Params: url.Values{ - "aggregation": {"Average"}, - }, - Resources: resources, - Subscription: subscription, - }, - datasource: &AzureMonitorDatasource{Features: &fakeFeatureToggles{flags: map[string]bool{"azureMonitorDataplane": false}}}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { azData := loadTestFile(t, tt.responseFile) - dframes, err := tt.datasource.parseResponse(azData, tt.mockQuery, "http://ds", "") + datasource := &AzureMonitorDatasource{} + dframes, err := datasource.parseResponse(azData, tt.mockQuery, "http://ds", "") require.NoError(t, err) require.NotNil(t, dframes) diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/11-azure-monitor-non-dataplane-response.json b/pkg/tsdb/azuremonitor/testdata/azuremonitor/11-azure-monitor-non-dataplane-response.json deleted file mode 100644 index 5fc84f6afa6..00000000000 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/11-azure-monitor-non-dataplane-response.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "cost": 0, - "timespan": "2019-02-08T10:13:50Z\/2019-02-08T16:13:50Z", - "interval": "PT1M", - "value": [ - { - "id": "\/subscriptions\/xxx\/resourceGroups\/grafanastaging\/providers\/Microsoft.Compute\/virtualMachines\/grafana\/providers\/Microsoft.Insights\/metrics\/Percentage CPU", - "type": "Microsoft.Insights\/metrics", - "name": { - "value": "Percentage CPU", - "localizedValue": "Percentage CPU" - }, - "unit": "Percent", - "timeseries": [ - { - "metadatavalues": [ - - ], - "data": [ - { - "timeStamp": "2019-02-08T10:13:00Z", - "average": 2.0875 - }, - { - "timeStamp": "2019-02-08T10:14:00Z", - "average": 2.1525 - }, - { - "timeStamp": "2019-02-08T10:15:00Z", - "average": 2.155 - }, - { - "timeStamp": "2019-02-08T10:16:00Z", - "average": 3.6925 - }, - { - "timeStamp": "2019-02-08T10:17:00Z", - "average": 2.44 - } - ] - } - ] - } - ], - "namespace": "Microsoft.Compute\/virtualMachines", - "resourceregion": "westeurope" -} diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/11-azure-monitor-non-dataplane-response.json.non-dataplane-compliant-response.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/11-azure-monitor-non-dataplane-response.json.non-dataplane-compliant-response.golden.jsonc deleted file mode 100644 index b30ba57e5cf..00000000000 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/11-azure-monitor-non-dataplane-response.json.non-dataplane-compliant-response.golden.jsonc +++ /dev/null @@ -1,83 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: -// Dimensions: 2 Fields by 5 Rows -// +-------------------------------+----------------------+ -// | Name: Time | Name: Percentage CPU | -// | Labels: | Labels: | -// | Type: []time.Time | Type: []*float64 | -// +-------------------------------+----------------------+ -// | 2019-02-08 10:13:00 +0000 UTC | 2.0875 | -// | 2019-02-08 10:14:00 +0000 UTC | 2.1525 | -// | 2019-02-08 10:15:00 +0000 UTC | 2.155 | -// | 2019-02-08 10:16:00 +0000 UTC | 3.6925 | -// | 2019-02-08 10:17:00 +0000 UTC | 2.44 | -// +-------------------------------+----------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "fields": [ - { - "name": "Time", - "type": "time", - "typeInfo": { - "frame": "time.Time" - }, - "config": { - "links": [ - { - "title": "View in Azure Portal", - "targetBlank": true, - "url": "http://ds/#blade/Microsoft_Azure_MonitoringMetrics/Metrics.ReactView/Referer/MetricsExplorer/TimeContext/%7B%22absolute%22%3A%7B%22startTime%22%3A%220001-01-01T00%3A00%3A00Z%22%2C%22endTime%22%3A%220001-01-01T00%3A00%3A00Z%22%7D%7D/ChartDefinition/%7B%22v2charts%22%3A%5B%7B%22metrics%22%3A%5B%7B%22resourceMetadata%22%3A%7B%22id%22%3A%22%2Fsubscriptions%2F12345678-aaaa-bbbb-cccc-123456789abc%2FresourceGroups%2Fgrafanastaging%2Fproviders%2FMicrosoft.Compute%2FvirtualMachines%2Fgrafana%22%7D%2C%22name%22%3A%22%22%2C%22aggregationType%22%3A4%2C%22namespace%22%3A%22%22%2C%22metricVisualization%22%3A%7B%22displayName%22%3A%22%22%2C%22resourceDisplayName%22%3A%22grafana%22%7D%7D%5D%7D%5D%7D" - } - ] - } - }, - { - "name": "Percentage CPU", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - }, - "labels": {}, - "config": { - "unit": "percent", - "links": [ - { - "title": "View in Azure Portal", - "targetBlank": true, - "url": "http://ds/#blade/Microsoft_Azure_MonitoringMetrics/Metrics.ReactView/Referer/MetricsExplorer/TimeContext/%7B%22absolute%22%3A%7B%22startTime%22%3A%220001-01-01T00%3A00%3A00Z%22%2C%22endTime%22%3A%220001-01-01T00%3A00%3A00Z%22%7D%7D/ChartDefinition/%7B%22v2charts%22%3A%5B%7B%22metrics%22%3A%5B%7B%22resourceMetadata%22%3A%7B%22id%22%3A%22%2Fsubscriptions%2F12345678-aaaa-bbbb-cccc-123456789abc%2FresourceGroups%2Fgrafanastaging%2Fproviders%2FMicrosoft.Compute%2FvirtualMachines%2Fgrafana%22%7D%2C%22name%22%3A%22%22%2C%22aggregationType%22%3A4%2C%22namespace%22%3A%22%22%2C%22metricVisualization%22%3A%7B%22displayName%22%3A%22%22%2C%22resourceDisplayName%22%3A%22grafana%22%7D%7D%5D%7D%5D%7D" - } - ] - } - } - ] - }, - "data": { - "values": [ - [ - 1549620780000, - 1549620840000, - 1549620900000, - 1549620960000, - 1549621020000 - ], - [ - 2.0875, - 2.1525, - 2.155, - 3.6925, - 2.44 - ] - ] - } - } - ] -} \ No newline at end of file