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 515eaccdf66..31d5d3b1afa 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -41,6 +41,7 @@ Some features are enabled by default. You can disable these feature by setting t | `alertingNotificationsPoliciesMatchingInstances` | Enables the preview of matching instances for notification policies | 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 | | | `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order and advanced mode | Yes | +| `azureMonitorDataplane` | Adds dataplane compliant frame metadata in the Azure Monitor datasource | Yes | ## Preview feature toggles diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index a4f7361fbef..4308e9a123e 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -116,4 +116,5 @@ export interface FeatureToggles { featureToggleAdminPage?: boolean; awsAsyncQueryCaching?: boolean; splitScopes?: boolean; + azureMonitorDataplane?: boolean; } diff --git a/pkg/plugins/manager/manager_integration_test.go b/pkg/plugins/manager/manager_integration_test.go index 6350640774b..f87061bbee5 100644 --- a/pkg/plugins/manager/manager_integration_test.go +++ b/pkg/plugins/manager/manager_integration_test.go @@ -93,7 +93,7 @@ func TestIntegrationPluginManager(t *testing.T) { features := featuremgmt.WithFeatures() hcp := httpclient.NewProvider() - am := azuremonitor.ProvideService(cfg, hcp, tracer) + am := azuremonitor.ProvideService(cfg, hcp, features, tracer) cw := cloudwatch.ProvideService(cfg, hcp, features) cm := cloudmonitoring.ProvideService(hcp, tracer) es := elasticsearch.ProvideService(hcp) diff --git a/pkg/services/featuremgmt/codeowners.go b/pkg/services/featuremgmt/codeowners.go index 908d0525d45..0247fb970b0 100644 --- a/pkg/services/featuremgmt/codeowners.go +++ b/pkg/services/featuremgmt/codeowners.go @@ -22,7 +22,7 @@ const ( hostedGrafanaTeam codeowner = "@grafana/hosted-grafana-team" awsDatasourcesSquad codeowner = "@grafana/aws-datasources" appO11ySquad codeowner = "@grafana/app-o11y" - grafanaPartnerPluginsSquad codeowner = "@grafana/partner-plugins" + grafanaPartnerPluginsSquad codeowner = "@grafana/partner-datasources" grafanaOperatorExperienceSquad codeowner = "@grafana/grafana-operator-experience-squad" enterpriseDatasourcesSquad codeowner = "@grafana/enterprise-datasources" ) diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index 306fd313ac5..f77369222e3 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -669,5 +669,12 @@ var ( Owner: grafanaAuthnzSquad, RequiresRestart: true, }, + { + Name: "azureMonitorDataplane", + Description: "Adds dataplane compliant frame metadata in the Azure Monitor datasource", + Stage: FeatureStageGeneralAvailability, + Owner: grafanaPartnerPluginsSquad, + Expression: "true", // on by default + }, } ) diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 8effd2e6b60..6b20c2fc6d9 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -97,3 +97,4 @@ grafanaAPIServer,experimental,@grafana/grafana-app-platform-squad,false,false,fa featureToggleAdminPage,experimental,@grafana/grafana-operator-experience-squad,false,false,true,false awsAsyncQueryCaching,experimental,@grafana/aws-datasources,false,false,false,false splitScopes,preview,@grafana/grafana-authnz-team,false,false,true,false +azureMonitorDataplane,GA,@grafana/partner-datasources,false,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index ea6033b3d8e..6fa4f881084 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -398,4 +398,8 @@ const ( // FlagSplitScopes // 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" ) diff --git a/pkg/tsdb/azuremonitor/azuremonitor.go b/pkg/tsdb/azuremonitor/azuremonitor.go index 278b1dfba62..af950a297ef 100644 --- a/pkg/tsdb/azuremonitor/azuremonitor.go +++ b/pkg/tsdb/azuremonitor/azuremonitor.go @@ -19,6 +19,7 @@ import ( "github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/infra/tracing" + "github.com/grafana/grafana/pkg/services/featuremgmt" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/tsdb/azuremonitor/loganalytics" "github.com/grafana/grafana/pkg/tsdb/azuremonitor/metrics" @@ -28,10 +29,10 @@ import ( var logger = log.New("tsdb.azuremonitor") -func ProvideService(cfg *setting.Cfg, httpClientProvider *httpclient.Provider, tracer tracing.Tracer) *Service { +func ProvideService(cfg *setting.Cfg, httpClientProvider *httpclient.Provider, features featuremgmt.FeatureToggles, tracer tracing.Tracer) *Service { proxy := &httpServiceProxy{} executors := map[string]azDatasourceExecutor{ - azureMonitor: &metrics.AzureMonitorDatasource{Proxy: proxy}, + azureMonitor: &metrics.AzureMonitorDatasource{Proxy: proxy, Features: features}, azureLogAnalytics: &loganalytics.AzureLogAnalyticsDatasource{Proxy: proxy}, azureResourceGraph: &resourcegraph.AzureResourceGraphDatasource{Proxy: proxy}, azureTraces: &loganalytics.AzureLogAnalyticsDatasource{Proxy: proxy}, diff --git a/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go b/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go index b2aebfde98c..3e271269e94 100644 --- a/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go +++ b/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource.go @@ -19,6 +19,7 @@ import ( "github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/infra/tracing" + "github.com/grafana/grafana/pkg/services/featuremgmt" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/tsdb/azuremonitor/kinds/dataquery" "github.com/grafana/grafana/pkg/tsdb/azuremonitor/loganalytics" @@ -28,7 +29,8 @@ import ( // AzureMonitorDatasource calls the Azure Monitor API - one of the four API's supported type AzureMonitorDatasource struct { - Proxy types.ServiceProxy + Proxy types.ServiceProxy + Features featuremgmt.FeatureToggles } var ( @@ -396,6 +398,9 @@ 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.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 66e1be60276..3ea92005b67 100644 --- a/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource_test.go +++ b/pkg/tsdb/azuremonitor/metrics/azuremonitor-datasource_test.go @@ -366,11 +366,20 @@ 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 @@ -378,6 +387,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { mockQuery *types.AzureMonitorQuery expectedFrames data.Frames queryIntervalMS int64 + datasource *AzureMonitorDatasource }{ { name: "average aggregate time series response", @@ -390,6 +400,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "total aggregate time series response", @@ -402,6 +413,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "maximum aggregate time series response", @@ -414,6 +426,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "minimum aggregate time series response", @@ -426,6 +439,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "count aggregate time series response", @@ -438,6 +452,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "single dimension time series response", @@ -450,6 +465,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "with alias patterns in the query", @@ -463,6 +479,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "single dimension with alias", @@ -476,6 +493,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "multiple dimension time series response with label alias", @@ -489,6 +507,7 @@ 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", @@ -502,6 +521,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "with legacy azure monitor query properties and without a resource uri", @@ -515,6 +535,7 @@ 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", @@ -528,6 +549,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "multiple time series response", @@ -540,6 +562,7 @@ func TestAzureMonitorParseResponse(t *testing.T) { Resources: resources, Subscription: subscription, }, + datasource: datasource, }, { name: "multiple time series response with multiple dimensions", @@ -552,14 +575,27 @@ 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}}}, }, } - datasource := &AzureMonitorDatasource{} for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { azData := loadTestFile(t, tt.responseFile) - dframes, err := datasource.parseResponse(azData, tt.mockQuery, "http://ds", "") + dframes, err := tt.datasource.parseResponse(azData, tt.mockQuery, "http://ds", "") require.NoError(t, err) require.NotNil(t, dframes) diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/1-azure-monitor-response-avg.json.average-aggregate-time-series-response.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/1-azure-monitor-response-avg.json.average-aggregate-time-series-response.golden.jsonc index b30ba57e5cf..4106c54a69a 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/1-azure-monitor-response-avg.json.average-aggregate-time-series-response.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/1-azure-monitor-response-avg.json.average-aggregate-time-series-response.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+----------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/10-azure-monitor-response-multi-with-dimensions.json.multiple-time-series-response-with-multiple-dimensions.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/10-azure-monitor-response-multi-with-dimensions.json.multiple-time-series-response-with-multiple-dimensions.golden.jsonc index 4facd82e9d6..93da9fb1f30 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/10-azure-monitor-response-multi-with-dimensions.json.multiple-time-series-response-with-multiple-dimensions.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/10-azure-monitor-response-multi-with-dimensions.json.multiple-time-series-response-with-multiple-dimensions.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+------------------------------------------------------+ @@ -17,7 +23,13 @@ // // // -// Frame[1] +// Frame[1] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+------------------------------------------------------+ @@ -34,7 +46,13 @@ // // // -// Frame[2] +// Frame[2] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+--------------------------------------------------------+ @@ -51,7 +69,13 @@ // // // -// Frame[3] +// Frame[3] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+--------------------------------------------------------+ @@ -73,6 +97,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -135,6 +166,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -197,6 +235,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -259,6 +304,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", 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 new file mode 100644 index 00000000000..5fc84f6afa6 --- /dev/null +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/11-azure-monitor-non-dataplane-response.json @@ -0,0 +1,47 @@ +{ + "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 new file mode 100644 index 00000000000..b30ba57e5cf --- /dev/null +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/11-azure-monitor-non-dataplane-response.json.non-dataplane-compliant-response.golden.jsonc @@ -0,0 +1,83 @@ +// 🌟 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 diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.total-aggregate-time-series-response.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.total-aggregate-time-series-response.golden.jsonc index 4774e964f20..516d8dabdab 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.total-aggregate-time-series-response.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.total-aggregate-time-series-response.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+----------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-alias-patterns-in-the-query.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-alias-patterns-in-the-query.golden.jsonc index 3c425599469..e936dbfb6ae 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-alias-patterns-in-the-query.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-alias-patterns-in-the-query.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+----------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-legacy-azure-monitor-query-properties-and-with-a-resource-uri-it-should-use-the-resource-uri.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-legacy-azure-monitor-query-properties-and-with-a-resource-uri-it-should-use-the-resource-uri.golden.jsonc index 3c425599469..e936dbfb6ae 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-legacy-azure-monitor-query-properties-and-with-a-resource-uri-it-should-use-the-resource-uri.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-legacy-azure-monitor-query-properties-and-with-a-resource-uri-it-should-use-the-resource-uri.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+----------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-legacy-azure-monitor-query-properties-and-without-a-resource-uri.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-legacy-azure-monitor-query-properties-and-without-a-resource-uri.golden.jsonc index 3c425599469..e936dbfb6ae 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-legacy-azure-monitor-query-properties-and-without-a-resource-uri.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/2-azure-monitor-response-total.json.with-legacy-azure-monitor-query-properties-and-without-a-resource-uri.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+----------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/3-azure-monitor-response-maximum.json.maximum-aggregate-time-series-response.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/3-azure-monitor-response-maximum.json.maximum-aggregate-time-series-response.golden.jsonc index 7b61b79d273..206d655f0c7 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/3-azure-monitor-response-maximum.json.maximum-aggregate-time-series-response.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/3-azure-monitor-response-maximum.json.maximum-aggregate-time-series-response.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+----------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/4-azure-monitor-response-minimum.json.minimum-aggregate-time-series-response.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/4-azure-monitor-response-minimum.json.minimum-aggregate-time-series-response.golden.jsonc index 8ea7fb4bf8b..710dd144f9b 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/4-azure-monitor-response-minimum.json.minimum-aggregate-time-series-response.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/4-azure-monitor-response-minimum.json.minimum-aggregate-time-series-response.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+----------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/5-azure-monitor-response-count.json.count-aggregate-time-series-response.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/5-azure-monitor-response-count.json.count-aggregate-time-series-response.golden.jsonc index bef9a751e15..efc28c3910b 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/5-azure-monitor-response-count.json.count-aggregate-time-series-response.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/5-azure-monitor-response-count.json.count-aggregate-time-series-response.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+----------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/6-azure-monitor-response-single-dimension.json.single-dimension-time-series-response.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/6-azure-monitor-response-single-dimension.json.single-dimension-time-series-response.golden.jsonc index f30e3d49f55..b6af09011bc 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/6-azure-monitor-response-single-dimension.json.single-dimension-time-series-response.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/6-azure-monitor-response-single-dimension.json.single-dimension-time-series-response.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 6 Rows // +-------------------------------+---------------------------+ @@ -18,7 +24,13 @@ // // // -// Frame[1] +// Frame[1] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 6 Rows // +-------------------------------+----------------------------+ @@ -36,7 +48,13 @@ // // // -// Frame[2] +// Frame[2] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 6 Rows // +-------------------------------+------------------------------------------+ @@ -59,6 +77,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -122,6 +147,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -185,6 +217,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/6-azure-monitor-response-single-dimension.json.single-dimension-with-alias.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/6-azure-monitor-response-single-dimension.json.single-dimension-with-alias.golden.jsonc index 983aafc942a..4a5602b9862 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/6-azure-monitor-response-single-dimension.json.single-dimension-with-alias.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/6-azure-monitor-response-single-dimension.json.single-dimension-with-alias.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 6 Rows // +-------------------------------+---------------------------+ @@ -18,7 +24,13 @@ // // // -// Frame[1] +// Frame[1] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 6 Rows // +-------------------------------+----------------------------+ @@ -36,7 +48,13 @@ // // // -// Frame[2] +// Frame[2] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 6 Rows // +-------------------------------+------------------------------------------+ @@ -59,6 +77,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -123,6 +148,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -187,6 +219,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/7-azure-monitor-response-multi-dimension.json.multiple-dimension-time-series-response-with-label-alias.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/7-azure-monitor-response-multi-dimension.json.multiple-dimension-time-series-response-with-label-alias.golden.jsonc index 356526ddeff..4daa96f7fef 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/7-azure-monitor-response-multi-dimension.json.multiple-dimension-time-series-response-with-label-alias.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/7-azure-monitor-response-multi-dimension.json.multiple-dimension-time-series-response-with-label-alias.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 3 Rows // +-------------------------------+------------------------------------------+ @@ -15,7 +21,13 @@ // // // -// Frame[1] +// Frame[1] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 3 Rows // +-------------------------------+--------------------------------------+ @@ -30,7 +42,13 @@ // // // -// Frame[2] +// Frame[2] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 3 Rows // +-------------------------------+-----------------------------------------------------+ @@ -50,6 +68,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -109,6 +134,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", @@ -168,6 +200,13 @@ }, { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/8-azure-monitor-response-unspecified-unit.json.unspecified-unit-with-alias-should-not-panic.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/8-azure-monitor-response-unspecified-unit.json.unspecified-unit-with-alias-should-not-panic.golden.jsonc index 450b3a8a54b..c70b808eb34 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/8-azure-monitor-response-unspecified-unit.json.unspecified-unit-with-alias-should-not-panic.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/8-azure-monitor-response-unspecified-unit.json.unspecified-unit-with-alias-should-not-panic.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 1 Rows // +-------------------------------+----------------------+ @@ -18,6 +24,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time", diff --git a/pkg/tsdb/azuremonitor/testdata/azuremonitor/9-azure-monitor-response-multi.json.multiple-time-series-response.golden.jsonc b/pkg/tsdb/azuremonitor/testdata/azuremonitor/9-azure-monitor-response-multi.json.multiple-time-series-response.golden.jsonc index 2c2900de3ad..ab7b4533d06 100644 --- a/pkg/tsdb/azuremonitor/testdata/azuremonitor/9-azure-monitor-response-multi.json.multiple-time-series-response.golden.jsonc +++ b/pkg/tsdb/azuremonitor/testdata/azuremonitor/9-azure-monitor-response-multi.json.multiple-time-series-response.golden.jsonc @@ -1,6 +1,12 @@ // 🌟 This was machine generated. Do not edit. 🌟 // -// Frame[0] +// Frame[0] { +// "type": "timeseries-multi", +// "typeVersion": [ +// 0, +// 1 +// ] +// } // Name: // Dimensions: 2 Fields by 5 Rows // +-------------------------------+------------------------------+ @@ -22,6 +28,13 @@ "frames": [ { "schema": { + "meta": { + "type": "timeseries-multi", + "typeVersion": [ + 0, + 1 + ] + }, "fields": [ { "name": "Time",