Skip to content

Commit a8245d2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Support RUM data source in Query API and fix aggregators (#1345)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4e059cf commit a8245d2

File tree

4 files changed

+39
-14
lines changed

4 files changed

+39
-14
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.4",
7-
"regenerated": "2023-02-16 07:53:05.962816",
8-
"spec_repo_commit": "7d823ab8"
7+
"regenerated": "2023-02-16 09:01:15.697580",
8+
"spec_repo_commit": "4982e03d"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-02-16 07:53:05.981326",
13-
"spec_repo_commit": "7d823ab8"
12+
"regenerated": "2023-02-16 09:01:15.714720",
13+
"spec_repo_commit": "4982e03d"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3105,10 +3105,12 @@ components:
31053105
description: A data source that is powered by the Events Platform.
31063106
enum:
31073107
- logs
3108+
- rum
31083109
example: logs
31093110
type: string
31103111
x-enum-varnames:
31113112
- LOGS
3113+
- RUM
31123114
EventsGroupBy:
31133115
description: A dimension on which to split a query's results.
31143116
properties:
@@ -7211,6 +7213,10 @@ components:
72117213
- max
72127214
- sum
72137215
- last
7216+
- percentile
7217+
- mean
7218+
- l2norm
7219+
- area
72147220
example: avg
72157221
type: string
72167222
x-enum-varnames:
@@ -7219,6 +7225,10 @@ components:
72197225
- MAX
72207226
- SUM
72217227
- LAST
7228+
- PERCENTILE
7229+
- MEAN
7230+
- L2NORM
7231+
- AREA
72227232
MetricsAndMetricTagConfigurations:
72237233
description: Object for a metrics and metric tag configurations.
72247234
oneOf:
@@ -17042,11 +17052,11 @@ paths:
1704217052
tags:
1704317053
- Metrics
1704417054
x-codegen-request-body-name: body
17045-
x-unstable: '**Note**: This endpoint is GA for the metrics and cloud cost data
17046-
sources. Logs is
17055+
x-unstable: '**Note**: This endpoint is GA for the metrics, real user monitoring
17056+
(RUM) and cloud cost data sources.
1704717057

17048-
in beta. We are gradually onboarding support for more sources. If you have
17049-
any
17058+
Support for logs is in beta. We are gradually onboarding support for more
17059+
sources. If you have any
1705017060

1705117061
feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
1705217062
/api/v2/query/timeseries:
@@ -17085,11 +17095,11 @@ paths:
1708517095
tags:
1708617096
- Metrics
1708717097
x-codegen-request-body-name: body
17088-
x-unstable: '**Note**: This endpoint is GA for the metrics and cloud cost data
17089-
sources. Logs is
17098+
x-unstable: '**Note**: This endpoint is GA for the metrics, real user monitoring
17099+
(RUM) and cloud cost data sources.
1709017100

17091-
in beta. We are gradually onboarding support for more sources. If you have
17092-
any
17101+
Support for logs is in beta. We are gradually onboarding support for more
17102+
sources. If you have any
1709317103

1709417104
feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
1709517105
/api/v2/restriction_policy/{resource_id}:

src/datadog_api_client/v2/model/events_data_source.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ class EventsDataSource(ModelSimple):
1616
"""
1717
A data source that is powered by the Events Platform.
1818
19-
:param value: If omitted defaults to "logs". Must be one of ["logs"].
19+
:param value: If omitted defaults to "logs". Must be one of ["logs", "rum"].
2020
:type value: str
2121
"""
2222

2323
allowed_values = {
2424
"logs",
25+
"rum",
2526
}
2627
LOGS: ClassVar["EventsDataSource"]
28+
RUM: ClassVar["EventsDataSource"]
2729

2830
@cached_property
2931
def openapi_types(_):
@@ -33,3 +35,4 @@ def openapi_types(_):
3335

3436

3537
EventsDataSource.LOGS = EventsDataSource("logs")
38+
EventsDataSource.RUM = EventsDataSource("rum")

src/datadog_api_client/v2/model/metrics_aggregator.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MetricsAggregator(ModelSimple):
1616
"""
1717
The type of aggregation that can be performed on metrics queries.
1818
19-
:param value: If omitted defaults to "avg". Must be one of ["avg", "min", "max", "sum", "last"].
19+
:param value: If omitted defaults to "avg". Must be one of ["avg", "min", "max", "sum", "last", "percentile", "mean", "l2norm", "area"].
2020
:type value: str
2121
"""
2222

@@ -26,12 +26,20 @@ class MetricsAggregator(ModelSimple):
2626
"max",
2727
"sum",
2828
"last",
29+
"percentile",
30+
"mean",
31+
"l2norm",
32+
"area",
2933
}
3034
AVG: ClassVar["MetricsAggregator"]
3135
MIN: ClassVar["MetricsAggregator"]
3236
MAX: ClassVar["MetricsAggregator"]
3337
SUM: ClassVar["MetricsAggregator"]
3438
LAST: ClassVar["MetricsAggregator"]
39+
PERCENTILE: ClassVar["MetricsAggregator"]
40+
MEAN: ClassVar["MetricsAggregator"]
41+
L2NORM: ClassVar["MetricsAggregator"]
42+
AREA: ClassVar["MetricsAggregator"]
3543

3644
@cached_property
3745
def openapi_types(_):
@@ -45,3 +53,7 @@ def openapi_types(_):
4553
MetricsAggregator.MAX = MetricsAggregator("max")
4654
MetricsAggregator.SUM = MetricsAggregator("sum")
4755
MetricsAggregator.LAST = MetricsAggregator("last")
56+
MetricsAggregator.PERCENTILE = MetricsAggregator("percentile")
57+
MetricsAggregator.MEAN = MetricsAggregator("mean")
58+
MetricsAggregator.L2NORM = MetricsAggregator("l2norm")
59+
MetricsAggregator.AREA = MetricsAggregator("area")

0 commit comments

Comments
 (0)