Skip to content

Commit

Permalink
[query] rm note about unstable datasources (#2762)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Nov 5, 2024
1 parent 3f1f0b8 commit d4ad11b
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 46 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-05 20:16:07.638582",
"spec_repo_commit": "1a56bfda"
"regenerated": "2024-11-05 21:07:07.281849",
"spec_repo_commit": "6c0fa1b6"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-05 20:16:07.656833",
"spec_repo_commit": "1a56bfda"
"regenerated": "2024-11-05 21:07:07.300611",
"spec_repo_commit": "6c0fa1b6"
}
}
}
12 changes: 0 additions & 12 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35699,12 +35699,6 @@ paths:
operator: OR
permissions:
- timeseries_query
x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring
(RUM), Cloud Cost Management, and Log Management data sources.

We are gradually onboarding support for more sources. If you have any

feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
/api/v2/query/timeseries:
post:
description: 'Query timeseries data across various data sources and
Expand Down Expand Up @@ -35745,12 +35739,6 @@ paths:
operator: OR
permissions:
- timeseries_query
x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring
(RUM), Cloud Cost Management, and Log Management data sources.

We are gradually onboarding support for more sources. If you have any

feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
/api/v2/remote_config/products/cws/agent_rules:
get:
description: Get the list of Cloud Security Management Threats Agent rules.
Expand Down
2 changes: 0 additions & 2 deletions api/datadog/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,6 @@ func NewConfiguration() *Configuration {
"v2.UpdateIncidentIntegration": false,
"v2.UpdateIncidentTodo": false,
"v2.UpdateIncidentType": false,
"v2.QueryScalarData": false,
"v2.QueryTimeseriesData": false,
"v2.GetFinding": false,
"v2.ListFindings": false,
"v2.MuteFindings": false,
Expand Down
16 changes: 0 additions & 16 deletions api/datadogV2/api_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ package datadogV2

import (
_context "context"
_fmt "fmt"
_log "log"
_nethttp "net/http"
_neturl "net/url"
"strings"
Expand Down Expand Up @@ -1006,13 +1004,6 @@ func (a *MetricsApi) QueryScalarData(ctx _context.Context, body ScalarFormulaQue
localVarReturnValue ScalarFormulaQueryResponse
)

operationId := "v2.QueryScalarData"
if a.Client.Cfg.IsUnstableOperationEnabled(operationId) {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
} else {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MetricsApi.QueryScalarData")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down Expand Up @@ -1087,13 +1078,6 @@ func (a *MetricsApi) QueryTimeseriesData(ctx _context.Context, body TimeseriesFo
localVarReturnValue TimeseriesFormulaQueryResponse
)

operationId := "v2.QueryTimeseriesData"
if a.Client.Cfg.IsUnstableOperationEnabled(operationId) {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
} else {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.MetricsApi.QueryTimeseriesData")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/QueryScalarData.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func main() {
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.QueryScalarData", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewMetricsApi(apiClient)
resp, r, err := api.QueryScalarData(ctx, body)
Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/QueryScalarData_3112571352.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func main() {
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.QueryScalarData", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewMetricsApi(apiClient)
resp, r, err := api.QueryScalarData(ctx, body)
Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/QueryTimeseriesData.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ func main() {
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.QueryTimeseriesData", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewMetricsApi(apiClient)
resp, r, err := api.QueryTimeseriesData(ctx, body)
Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/QueryTimeseriesData_301142940.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func main() {
}
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.QueryTimeseriesData", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewMetricsApi(apiClient)
resp, r, err := api.QueryTimeseriesData(ctx, body)
Expand Down
8 changes: 0 additions & 8 deletions tests/scenarios/features/v2/metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ Feature: Metrics
@generated @skip @team:Datadog/timeseries-query
Scenario: Query scalar data across multiple products returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "QueryScalarData" enabled
And new "QueryScalarData" request
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "scalar_request"}}
When the request is sent
Expand All @@ -255,7 +254,6 @@ Feature: Metrics
@generated @skip @team:Datadog/timeseries-query
Scenario: Query scalar data across multiple products returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "QueryScalarData" enabled
And new "QueryScalarData" request
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "scalar_request"}}
When the request is sent
Expand All @@ -264,7 +262,6 @@ Feature: Metrics
@generated @skip @team:Datadog/timeseries-query
Scenario: Query timeseries data across multiple products returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "QueryTimeseriesData" enabled
And new "QueryTimeseriesData" request
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "timeseries_request"}}
When the request is sent
Expand All @@ -273,7 +270,6 @@ Feature: Metrics
@generated @skip @team:Datadog/timeseries-query
Scenario: Query timeseries data across multiple products returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "QueryTimeseriesData" enabled
And new "QueryTimeseriesData" request
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "timeseries_request"}}
When the request is sent
Expand All @@ -300,7 +296,6 @@ Feature: Metrics
@team:Datadog/timeseries-query
Scenario: Scalar cross product query returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "QueryScalarData" enabled
And new "QueryScalarData" request
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*}", "name": "a"}], "to": 1568923200000}, "type": "scalar_request"}}
When the request is sent
Expand All @@ -309,7 +304,6 @@ Feature: Metrics
@team:Datadog/timeseries-query
Scenario: Scalar cross product query returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "QueryScalarData" enabled
And new "QueryScalarData" request
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}}
When the request is sent
Expand Down Expand Up @@ -374,7 +368,6 @@ Feature: Metrics
@skip @team:Datadog/timeseries-query
Scenario: Timeseries cross product query returns "Bad Request" response
Given a valid "appKeyAuth" key in the system
And operation "QueryTimeseriesData" enabled
And new "QueryTimeseriesData" request
And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*}"}], "to": {{ timestamp('now') }}}, "type": "timeseries_rquest"}}
When the request is sent
Expand All @@ -383,7 +376,6 @@ Feature: Metrics
@team:Datadog/timeseries-query
Scenario: Timeseries cross product query returns "OK" response
Given a valid "appKeyAuth" key in the system
And operation "QueryTimeseriesData" enabled
And new "QueryTimeseriesData" request
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:datadog.estimated_usage.metrics.custom{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
When the request is sent
Expand Down

0 comments on commit d4ad11b

Please sign in to comment.