Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support RUM data source in Query API and fix aggregators #1029

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:07.089498",
"spec_repo_commit": "7d823ab8"
"regenerated": "2023-02-16 09:01:07.515779",
"spec_repo_commit": "4982e03d"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2023-02-16 07:53:07.106193",
"spec_repo_commit": "7d823ab8"
"regenerated": "2023-02-16 09:01:07.527198",
"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
3 changes: 2 additions & 1 deletion packages/datadog-api-client-v2/models/EventsDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ import { UnparsedObject } from "../../datadog-api-client-common/util";
* A data source that is powered by the Events Platform.
*/

export type EventsDataSource = typeof LOGS | UnparsedObject;
export type EventsDataSource = typeof LOGS | typeof RUM | UnparsedObject;
export const LOGS = "logs";
export const RUM = "rum";
8 changes: 8 additions & 0 deletions packages/datadog-api-client-v2/models/MetricsAggregator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,17 @@ export type MetricsAggregator =
| typeof MAX
| typeof SUM
| typeof LAST
| typeof PERCENTILE
| typeof MEAN
| typeof L2NORM
| typeof AREA
| UnparsedObject;
export const AVG = "avg";
export const MIN = "min";
export const MAX = "max";
export const SUM = "sum";
export const LAST = "last";
export const PERCENTILE = "percentile";
export const MEAN = "mean";
export const L2NORM = "l2norm";
export const AREA = "area";
14 changes: 12 additions & 2 deletions packages/datadog-api-client-v2/models/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ const enumsMap: { [key: string]: any[] } = {
"max",
"avg",
],
EventsDataSource: ["logs"],
EventsDataSource: ["logs", "rum"],
EventsSort: ["timestamp", "-timestamp"],
EventsSortType: ["alphabetical", "measure"],
FastlyAccountType: ["fastly-accounts"],
Expand Down Expand Up @@ -828,7 +828,17 @@ const enumsMap: { [key: string]: any[] } = {
MetricTagConfigurationMetricTypes: ["gauge", "count", "rate", "distribution"],
MetricTagConfigurationType: ["manage_tags"],
MetricType: ["metrics"],
MetricsAggregator: ["avg", "min", "max", "sum", "last"],
MetricsAggregator: [
"avg",
"min",
"max",
"sum",
"last",
"percentile",
"mean",
"l2norm",
"area",
],
MetricsDataSource: ["metrics", "cloud_cost"],
MonitorConfigPolicyResourceType: ["monitor-config-policy"],
MonitorConfigPolicyType: ["tag"],
Expand Down