Skip to content

Commit

Permalink
Support RUM data source in Query API and fix aggregators (#1874)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Feb 16, 2023
1 parent c7e6e4a commit 787f3f8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 17 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.4",
"regenerated": "2023-02-16 07:53:12.586901",
"spec_repo_commit": "7d823ab8"
"regenerated": "2023-02-16 09:01:11.175413",
"spec_repo_commit": "4982e03d"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-02-16 07:53:12.601063",
"spec_repo_commit": "7d823ab8"
"regenerated": "2023-02-16 09:01:11.190527",
"spec_repo_commit": "4982e03d"
}
}
}
26 changes: 18 additions & 8 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3105,10 +3105,12 @@ components:
description: A data source that is powered by the Events Platform.
enum:
- logs
- rum
example: logs
type: string
x-enum-varnames:
- LOGS
- RUM
EventsGroupBy:
description: A dimension on which to split a query's results.
properties:
Expand Down Expand Up @@ -7211,6 +7213,10 @@ components:
- max
- sum
- last
- percentile
- mean
- l2norm
- area
example: avg
type: string
x-enum-varnames:
Expand All @@ -7219,6 +7225,10 @@ components:
- MAX
- SUM
- LAST
- PERCENTILE
- MEAN
- L2NORM
- AREA
MetricsAndMetricTagConfigurations:
description: Object for a metrics and metric tag configurations.
oneOf:
Expand Down Expand Up @@ -17042,11 +17052,11 @@ paths:
tags:
- Metrics
x-codegen-request-body-name: body
x-unstable: '**Note**: This endpoint is GA for the metrics and cloud cost data
sources. Logs is
x-unstable: '**Note**: This endpoint is GA for the metrics, real user monitoring
(RUM) and cloud cost data sources.

in beta. We are gradually onboarding support for more sources. If you have
any
Support for logs is in beta. 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:
Expand Down Expand Up @@ -17085,11 +17095,11 @@ paths:
tags:
- Metrics
x-codegen-request-body-name: body
x-unstable: '**Note**: This endpoint is GA for the metrics and cloud cost data
sources. Logs is
x-unstable: '**Note**: This endpoint is GA for the metrics, real user monitoring
(RUM) and cloud cost data sources.

in beta. We are gradually onboarding support for more sources. If you have
any
Support for logs is in beta. We are gradually onboarding support for more
sources. If you have any

feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/restriction_policy/{resource_id}:
Expand Down
2 changes: 2 additions & 0 deletions api/datadogV2/model_events_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ type EventsDataSource string
// List of EventsDataSource.
const (
EVENTSDATASOURCE_LOGS EventsDataSource = "logs"
EVENTSDATASOURCE_RUM EventsDataSource = "rum"
)

var allowedEventsDataSourceEnumValues = []EventsDataSource{
EVENTSDATASOURCE_LOGS,
EVENTSDATASOURCE_RUM,
}

// GetAllowedValues reeturns the list of possible values.
Expand Down
18 changes: 13 additions & 5 deletions api/datadogV2/model_metrics_aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ type MetricsAggregator string

// List of MetricsAggregator.
const (
METRICSAGGREGATOR_AVG MetricsAggregator = "avg"
METRICSAGGREGATOR_MIN MetricsAggregator = "min"
METRICSAGGREGATOR_MAX MetricsAggregator = "max"
METRICSAGGREGATOR_SUM MetricsAggregator = "sum"
METRICSAGGREGATOR_LAST MetricsAggregator = "last"
METRICSAGGREGATOR_AVG MetricsAggregator = "avg"
METRICSAGGREGATOR_MIN MetricsAggregator = "min"
METRICSAGGREGATOR_MAX MetricsAggregator = "max"
METRICSAGGREGATOR_SUM MetricsAggregator = "sum"
METRICSAGGREGATOR_LAST MetricsAggregator = "last"
METRICSAGGREGATOR_PERCENTILE MetricsAggregator = "percentile"
METRICSAGGREGATOR_MEAN MetricsAggregator = "mean"
METRICSAGGREGATOR_L2NORM MetricsAggregator = "l2norm"
METRICSAGGREGATOR_AREA MetricsAggregator = "area"
)

var allowedMetricsAggregatorEnumValues = []MetricsAggregator{
Expand All @@ -27,6 +31,10 @@ var allowedMetricsAggregatorEnumValues = []MetricsAggregator{
METRICSAGGREGATOR_MAX,
METRICSAGGREGATOR_SUM,
METRICSAGGREGATOR_LAST,
METRICSAGGREGATOR_PERCENTILE,
METRICSAGGREGATOR_MEAN,
METRICSAGGREGATOR_L2NORM,
METRICSAGGREGATOR_AREA,
}

// GetAllowedValues reeturns the list of possible values.
Expand Down

0 comments on commit 787f3f8

Please sign in to comment.