diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 3148035fdb..299655971d 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -1890,11 +1890,12 @@ components:
schema:
type: string
RumMetricIDParameter:
- description: The name of the RUM-based metric.
+ description: The name of the RUM-based metric, as returned in `data.id` by `ListRumMetrics`.
in: path
name: metric_id
required: true
schema:
+ example: rum.sessions.web.count
type: string
RumPermanentRetentionFilterIDParameter:
description: The identifier of the permanent RUM retention filter.
@@ -108407,7 +108408,7 @@ components:
type: array
type: object
RumMetricCompute:
- description: The compute rule to compute the RUM-based metric.
+ description: The compute rule to compute the RUM-based metric. It is set at creation and only `include_percentiles` can be updated afterwards.
properties:
aggregation_type:
$ref: "#/components/schemas/RumMetricComputeAggregationType"
@@ -108415,23 +108416,25 @@ components:
$ref: "#/components/schemas/RumMetricComputeIncludePercentiles"
path:
description: |-
- The path to the value the RUM-based metric will aggregate on.
- Only present when `aggregation_type` is `distribution`.
+ The path of the numeric RUM event attribute the metric aggregates on.
+ Only valid when `aggregation_type` is `distribution`.
example: "@duration"
type: string
required:
- aggregation_type
type: object
RumMetricComputeAggregationType:
- description: The type of aggregation to use.
+ description: |-
+ The type of aggregation to use.
+ `count` counts the matching events. `distribution` aggregates the values found at `path`.
enum: ["count", "distribution"]
example: "distribution"
type: string
x-enum-varnames: ["COUNT", "DISTRIBUTION"]
RumMetricComputeIncludePercentiles:
description: |-
- Toggle to include or exclude percentile aggregations for distribution metrics.
- Only present when `aggregation_type` is `distribution`.
+ Toggle to include or exclude percentile aggregations (p50, p75, p90, p95, p99) for distribution metrics.
+ Required when `aggregation_type` is `distribution`, and must be omitted otherwise.
example: true
type: boolean
RumMetricCreateAttributes:
@@ -108444,7 +108447,7 @@ components:
filter:
$ref: "#/components/schemas/RumMetricFilter"
group_by:
- description: The rules for the group by.
+ description: The rules to group the metric by. Each rule creates a tag on the generated metric. If omitted, the metric is not grouped.
items:
$ref: "#/components/schemas/RumMetricGroupBy"
type: array
@@ -108477,18 +108480,22 @@ components:
- data
type: object
RumMetricEventType:
- description: The type of RUM events to filter on.
+ description: The type of RUM events the metric is generated from. It is set at creation and cannot be changed.
enum: ["session", "view", "action", "error", "resource", "long_task", "vital"]
example: "session"
type: string
x-enum-varnames: ["SESSION", "VIEW", "ACTION", "ERROR", "RESOURCE", "LONG_TASK", "VITAL"]
RumMetricFilter:
- description: The RUM-based metric filter. Events matching this filter will be aggregated in this metric.
+ description: The RUM-based metric filter. Events matching this filter will be aggregated in this metric. The `event_type` filter is added automatically.
properties:
query:
default: "*"
- description: The search query - following the RUM search syntax.
- example: "@service:web-ui:"
+ description: |-
+ The search query, following the [RUM search syntax](https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/).
+ Do not include a `@type` filter, it is derived from `event_type`.
+ It must not contain invisible or control characters such as non-breaking or zero-width spaces.
+ When updating a metric, an empty query leaves the filter unchanged.
+ example: "@service:web-ui"
type: string
required:
- query
@@ -108497,19 +108504,26 @@ components:
description: A group by rule.
properties:
path:
- description: The path to the value the RUM-based metric will be aggregated over.
+ description: The path of the RUM event attribute to group the metric by.
example: "@browser.name"
type: string
tag_name:
- description: Eventual name of the tag that gets created. By default, `path` is used as the tag name.
+ description: |-
+ Name of the tag that gets created on the metric. By default, `path` is used as the tag name.
+ It must be at most 200 characters long, start with a letter, and contain only lowercase letters, digits, underscores, hyphens, colons, periods, and slashes.
example: "browser_name"
+ maxLength: 200
type: string
required:
- path
type: object
RumMetricID:
- description: The name of the RUM-based metric.
+ description: |-
+ The name of the RUM-based metric.
+ On creation, it must be 1 to 200 characters long, contain only ASCII letters, digits, underscores, and periods, start with a letter, and not start with `rum.measure` or `rum.investigate`.
+ It cannot be changed after creation.
example: "rum.sessions.webui.count"
+ maxLength: 200
type: string
RumMetricResponse:
description: The RUM-based metric object.
@@ -108527,7 +108541,7 @@ components:
filter:
$ref: "#/components/schemas/RumMetricResponseFilter"
group_by:
- description: The rules for the group by.
+ description: The rules the metric is grouped by. Omitted if the metric is not grouped.
items:
$ref: "#/components/schemas/RumMetricResponseGroupBy"
type: array
@@ -108535,7 +108549,7 @@ components:
$ref: "#/components/schemas/RumMetricResponseUniqueness"
type: object
RumMetricResponseCompute:
- description: The compute rule to compute the RUM-based metric.
+ description: The compute rule of the RUM-based metric.
properties:
aggregation_type:
$ref: "#/components/schemas/RumMetricComputeAggregationType"
@@ -108543,7 +108557,7 @@ components:
$ref: "#/components/schemas/RumMetricComputeIncludePercentiles"
path:
description: |-
- The path to the value the RUM-based metric will aggregate on.
+ The path of the numeric RUM event attribute the metric aggregates on.
Only present when `aggregation_type` is `distribution`.
example: "@duration"
type: string
@@ -108559,10 +108573,10 @@ components:
$ref: "#/components/schemas/RumMetricType"
type: object
RumMetricResponseFilter:
- description: The RUM-based metric filter. RUM events matching this filter will be aggregated in this metric.
+ description: The RUM-based metric filter. RUM events matching this filter are aggregated in this metric. Omitted if the metric only filters on the event type.
properties:
query:
- description: The search query - following the RUM search syntax.
+ description: The search query, following the [RUM search syntax](https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/). It does not include the event type filter.
example: "service:web* AND @http.status_code:[200 TO 299]"
type: string
type: object
@@ -108570,30 +108584,32 @@ components:
description: A group by rule.
properties:
path:
- description: The path to the value the RUM-based metric will be aggregated over.
+ description: The path of the RUM event attribute the metric is grouped by.
example: "@http.status_code"
type: string
tag_name:
- description: Eventual name of the tag that gets created. By default, `path` is used as the tag name.
+ description: Name of the tag created on the metric. By default, `path` is used as the tag name.
example: "status_code"
type: string
type: object
RumMetricResponseUniqueness:
- description: The rule to count updatable events. Is only set if `event_type` is `session` or `view`.
+ description: The rule to count updatable events. Only present if `event_type` is `session` or `view`, and absent on older metrics created before this setting existed.
properties:
when:
$ref: "#/components/schemas/RumMetricUniquenessWhen"
type: object
RumMetricType:
default: rum_metrics
- description: The type of the resource. The value should always be rum_metrics.
+ description: The type of the resource. The value must be `rum_metrics`.
enum:
- rum_metrics
example: rum_metrics
type: string
x-enum-varnames: ["RUM_METRICS"]
RumMetricUniqueness:
- description: The rule to count updatable events. Is only set if `event_type` is `sessions` or `views`.
+ description: |-
+ The rule to count updatable events.
+ Required when `event_type` is `session` or `view`, and must be omitted for other event types. It cannot be changed after creation.
properties:
when:
$ref: "#/components/schemas/RumMetricUniquenessWhen"
@@ -108601,32 +108617,32 @@ components:
- when
type: object
RumMetricUniquenessWhen:
- description: When to count updatable events. `match` when the event is first seen, or `end` when the event is complete.
+ description: When to count updatable events. `match` when the event is first seen, or `end` when the event is complete. Sessions and views are updated over time, each one is counted once.
enum: ["match", "end"]
example: "match"
type: string
x-enum-varnames: ["WHEN_MATCH", "WHEN_END"]
RumMetricUpdateAttributes:
- description: The RUM-based metric properties that will be updated.
+ description: The RUM-based metric properties that will be updated. Omitted properties keep their current value.
properties:
compute:
$ref: "#/components/schemas/RumMetricUpdateCompute"
filter:
$ref: "#/components/schemas/RumMetricFilter"
group_by:
- description: The rules for the group by.
+ description: The rules to group the metric by. When provided, replaces all the existing group by rules.
items:
$ref: "#/components/schemas/RumMetricGroupBy"
type: array
type: object
RumMetricUpdateCompute:
- description: The compute rule to compute the RUM-based metric.
+ description: The compute rule properties that can be updated. Only valid for metrics whose `aggregation_type` is `distribution`.
properties:
include_percentiles:
$ref: "#/components/schemas/RumMetricComputeIncludePercentiles"
type: object
RumMetricUpdateData:
- description: The new RUM-based metric properties.
+ description: The RUM-based metric properties to update. `id` is required by the API and must match the `metric_id` path parameter.
properties:
attributes:
$ref: "#/components/schemas/RumMetricUpdateAttributes"
@@ -108639,7 +108655,7 @@ components:
- attributes
type: object
RumMetricUpdateRequest:
- description: The new RUM-based metric body.
+ description: The RUM-based metric update body.
properties:
data:
$ref: "#/components/schemas/RumMetricUpdateData"
@@ -220944,7 +220960,11 @@ paths:
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/rum/config/metrics:
get:
- description: Get the list of configured RUM-based metrics with their definitions.
+ description: |-
+ Get the list of all RUM-based metrics configured for your organization, with their definitions.
+ The list is not paginated.
+ Metrics whose stored definition cannot be converted to the RUM format are omitted from the list.
+ To retrieve a single metric, use `GetRumMetric`.
operationId: ListRumMetrics
responses:
"200":
@@ -220986,13 +221006,33 @@ paths:
post:
description: |-
Create a metric based on your organization's RUM data.
- Returns the RUM-based metric object from the request body when the request is successful.
+ The metric name is set in `data.id`, is unique within your organization, and cannot be changed after creation.
+ The `event_type`, `compute`, and `uniqueness` settings cannot be changed after creation either. Only `filter`, `group_by`, and `compute.include_percentiles` can be changed with `UpdateRumMetric`.
+ `uniqueness` is required when `event_type` is `session` or `view`, and must be omitted for any other event type.
+ When `aggregation_type` is `distribution`, `include_percentiles` is required. When it is `count`, `include_percentiles` and `path` must be omitted.
+ Returns the created RUM-based metric when the request is successful.
+ The request returns a `409 Conflict` error if a metric with the same name already exists.
operationId: CreateRumMetric
requestBody:
content:
application/json:
examples:
+ count_metric:
+ summary: Count of error events
+ value:
+ data:
+ attributes:
+ compute:
+ aggregation_type: count
+ event_type: error
+ filter:
+ query: "@view.name:/checkout"
+ group_by:
+ - path: "@error.source"
+ id: rum.errors.checkout.count
+ type: rum_metrics
default:
+ summary: Distribution of session durations
value:
data:
attributes:
@@ -221054,7 +221094,9 @@ paths:
x-codegen-request-body-name: body
/api/v2/rum/config/metrics/{metric_id}:
delete:
- description: Delete a specific RUM-based metric from your organization.
+ description: |-
+ Delete a specific RUM-based metric from your organization.
+ Metric data that was already generated is not deleted. Deleting a metric cannot be undone.
operationId: DeleteRumMetric
parameters:
- $ref: "#/components/parameters/RumMetricIDParameter"
@@ -221071,7 +221113,9 @@ paths:
tags:
- Rum Metrics
get:
- description: Get a specific RUM-based metric from your organization.
+ description: |-
+ Get a specific RUM-based metric from your organization.
+ The `metric_id` is the metric name returned in `data.id` by `ListRumMetrics` and `CreateRumMetric`.
operationId: GetRumMetric
parameters:
- $ref: "#/components/parameters/RumMetricIDParameter"
@@ -221117,7 +221161,11 @@ paths:
patch:
description: |-
Update a specific RUM-based metric from your organization.
- Returns the RUM-based metric object from the request body when the request is successful.
+ Only `filter`, `group_by`, and `compute.include_percentiles` can be updated. `event_type`, `uniqueness`, `compute.aggregation_type`, `compute.path`, and the metric name are immutable. To change them, delete the metric and create a new one.
+ Omitted attributes keep their current value. When provided, `filter.query` replaces the whole filter query (an empty query is ignored) and `group_by` replaces the whole list of group by rules.
+ `data.id` is required and must match the `metric_id` path parameter, otherwise the request returns a `409 Conflict` error.
+ The request also returns a `409 Conflict` error when `compute.include_percentiles` is set on a metric whose `aggregation_type` is not `distribution`.
+ Returns the updated RUM-based metric when the request is successful.
operationId: UpdateRumMetric
parameters:
- $ref: "#/components/parameters/RumMetricIDParameter"
@@ -221138,6 +221186,15 @@ paths:
tag_name: browser_name
id: rum.sessions.web.count
type: rum_metrics
+ disable_percentiles:
+ summary: Stop generating percentile aggregations
+ value:
+ data:
+ attributes:
+ compute:
+ include_percentiles: false
+ id: rum.sessions.web.count
+ type: rum_metrics
schema:
$ref: "#/components/schemas/RumMetricUpdateRequest"
description: New definition of the RUM-based metric.
diff --git a/src/datadog_api_client/v2/api/rum_metrics_api.py b/src/datadog_api_client/v2/api/rum_metrics_api.py
index 9ebbfc4403..4e786ad939 100644
--- a/src/datadog_api_client/v2/api/rum_metrics_api.py
+++ b/src/datadog_api_client/v2/api/rum_metrics_api.py
@@ -138,7 +138,12 @@ def create_rum_metric(
"""Create a RUM-based metric.
Create a metric based on your organization's RUM data.
- Returns the RUM-based metric object from the request body when the request is successful.
+ The metric name is set in ``data.id`` , is unique within your organization, and cannot be changed after creation.
+ The ``event_type`` , ``compute`` , and ``uniqueness`` settings cannot be changed after creation either. Only ``filter`` , ``group_by`` , and ``compute.include_percentiles`` can be changed with ``UpdateRumMetric``.
+ ``uniqueness`` is required when ``event_type`` is ``session`` or ``view`` , and must be omitted for any other event type.
+ When ``aggregation_type`` is ``distribution`` , ``include_percentiles`` is required. When it is ``count`` , ``include_percentiles`` and ``path`` must be omitted.
+ Returns the created RUM-based metric when the request is successful.
+ The request returns a ``409 Conflict`` error if a metric with the same name already exists.
:param body: The definition of the new RUM-based metric.
:type body: RumMetricCreateRequest
@@ -156,8 +161,9 @@ def delete_rum_metric(
"""Delete a RUM-based metric.
Delete a specific RUM-based metric from your organization.
+ Metric data that was already generated is not deleted. Deleting a metric cannot be undone.
- :param metric_id: The name of the RUM-based metric.
+ :param metric_id: The name of the RUM-based metric, as returned in ``data.id`` by ``ListRumMetrics``.
:type metric_id: str
:rtype: None
"""
@@ -173,8 +179,9 @@ def get_rum_metric(
"""Get a RUM-based metric.
Get a specific RUM-based metric from your organization.
+ The ``metric_id`` is the metric name returned in ``data.id`` by ``ListRumMetrics`` and ``CreateRumMetric``.
- :param metric_id: The name of the RUM-based metric.
+ :param metric_id: The name of the RUM-based metric, as returned in ``data.id`` by ``ListRumMetrics``.
:type metric_id: str
:rtype: RumMetricResponse
"""
@@ -188,7 +195,10 @@ def list_rum_metrics(
) -> RumMetricsResponse:
"""Get all RUM-based metrics.
- Get the list of configured RUM-based metrics with their definitions.
+ Get the list of all RUM-based metrics configured for your organization, with their definitions.
+ The list is not paginated.
+ Metrics whose stored definition cannot be converted to the RUM format are omitted from the list.
+ To retrieve a single metric, use ``GetRumMetric``.
:rtype: RumMetricsResponse
"""
@@ -203,9 +213,13 @@ def update_rum_metric(
"""Update a RUM-based metric.
Update a specific RUM-based metric from your organization.
- Returns the RUM-based metric object from the request body when the request is successful.
+ Only ``filter`` , ``group_by`` , and ``compute.include_percentiles`` can be updated. ``event_type`` , ``uniqueness`` , ``compute.aggregation_type`` , ``compute.path`` , and the metric name are immutable. To change them, delete the metric and create a new one.
+ Omitted attributes keep their current value. When provided, ``filter.query`` replaces the whole filter query (an empty query is ignored) and ``group_by`` replaces the whole list of group by rules.
+ ``data.id`` is required and must match the ``metric_id`` path parameter, otherwise the request returns a ``409 Conflict`` error.
+ The request also returns a ``409 Conflict`` error when ``compute.include_percentiles`` is set on a metric whose ``aggregation_type`` is not ``distribution``.
+ Returns the updated RUM-based metric when the request is successful.
- :param metric_id: The name of the RUM-based metric.
+ :param metric_id: The name of the RUM-based metric, as returned in ``data.id`` by ``ListRumMetrics``.
:type metric_id: str
:param body: New definition of the RUM-based metric.
:type body: RumMetricUpdateRequest
diff --git a/src/datadog_api_client/v2/model/rum_metric_compute.py b/src/datadog_api_client/v2/model/rum_metric_compute.py
index 2acbcd374b..4293fd0575 100644
--- a/src/datadog_api_client/v2/model/rum_metric_compute.py
+++ b/src/datadog_api_client/v2/model/rum_metric_compute.py
@@ -42,17 +42,18 @@ def __init__(
**kwargs,
):
"""
- The compute rule to compute the RUM-based metric.
+ The compute rule to compute the RUM-based metric. It is set at creation and only ``include_percentiles`` can be updated afterwards.
:param aggregation_type: The type of aggregation to use.
+ ``count`` counts the matching events. ``distribution`` aggregates the values found at ``path``.
:type aggregation_type: RumMetricComputeAggregationType
- :param include_percentiles: Toggle to include or exclude percentile aggregations for distribution metrics.
- Only present when ``aggregation_type`` is ``distribution``.
+ :param include_percentiles: Toggle to include or exclude percentile aggregations (p50, p75, p90, p95, p99) for distribution metrics.
+ Required when ``aggregation_type`` is ``distribution`` , and must be omitted otherwise.
:type include_percentiles: bool, optional
- :param path: The path to the value the RUM-based metric will aggregate on.
- Only present when ``aggregation_type`` is ``distribution``.
+ :param path: The path of the numeric RUM event attribute the metric aggregates on.
+ Only valid when ``aggregation_type`` is ``distribution``.
:type path: str, optional
"""
if include_percentiles is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_compute_aggregation_type.py b/src/datadog_api_client/v2/model/rum_metric_compute_aggregation_type.py
index 1d4f197071..ab01b39e01 100644
--- a/src/datadog_api_client/v2/model/rum_metric_compute_aggregation_type.py
+++ b/src/datadog_api_client/v2/model/rum_metric_compute_aggregation_type.py
@@ -15,6 +15,7 @@
class RumMetricComputeAggregationType(ModelSimple):
"""
The type of aggregation to use.
+ `count` counts the matching events. `distribution` aggregates the values found at `path`.
:param value: Must be one of ["count", "distribution"].
:type value: str
diff --git a/src/datadog_api_client/v2/model/rum_metric_create_attributes.py b/src/datadog_api_client/v2/model/rum_metric_create_attributes.py
index 165dd21590..e5903e08aa 100644
--- a/src/datadog_api_client/v2/model/rum_metric_create_attributes.py
+++ b/src/datadog_api_client/v2/model/rum_metric_create_attributes.py
@@ -58,19 +58,20 @@ def __init__(
"""
The object describing the Datadog RUM-based metric to create.
- :param compute: The compute rule to compute the RUM-based metric.
+ :param compute: The compute rule to compute the RUM-based metric. It is set at creation and only ``include_percentiles`` can be updated afterwards.
:type compute: RumMetricCompute
- :param event_type: The type of RUM events to filter on.
+ :param event_type: The type of RUM events the metric is generated from. It is set at creation and cannot be changed.
:type event_type: RumMetricEventType
- :param filter: The RUM-based metric filter. Events matching this filter will be aggregated in this metric.
+ :param filter: The RUM-based metric filter. Events matching this filter will be aggregated in this metric. The ``event_type`` filter is added automatically.
:type filter: RumMetricFilter, optional
- :param group_by: The rules for the group by.
+ :param group_by: The rules to group the metric by. Each rule creates a tag on the generated metric. If omitted, the metric is not grouped.
:type group_by: [RumMetricGroupBy], optional
- :param uniqueness: The rule to count updatable events. Is only set if ``event_type`` is ``sessions`` or ``views``.
+ :param uniqueness: The rule to count updatable events.
+ Required when ``event_type`` is ``session`` or ``view`` , and must be omitted for other event types. It cannot be changed after creation.
:type uniqueness: RumMetricUniqueness, optional
"""
if filter is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_create_data.py b/src/datadog_api_client/v2/model/rum_metric_create_data.py
index 48799e97fb..e0a3966c69 100644
--- a/src/datadog_api_client/v2/model/rum_metric_create_data.py
+++ b/src/datadog_api_client/v2/model/rum_metric_create_data.py
@@ -17,6 +17,12 @@
class RumMetricCreateData(ModelNormal):
+ validations = {
+ "id": {
+ "max_length": 200,
+ },
+ }
+
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.rum_metric_create_attributes import RumMetricCreateAttributes
@@ -42,9 +48,11 @@ def __init__(self_, attributes: RumMetricCreateAttributes, id: str, type: RumMet
:type attributes: RumMetricCreateAttributes
:param id: The name of the RUM-based metric.
+ On creation, it must be 1 to 200 characters long, contain only ASCII letters, digits, underscores, and periods, start with a letter, and not start with ``rum.measure`` or ``rum.investigate``.
+ It cannot be changed after creation.
:type id: str
- :param type: The type of the resource. The value should always be rum_metrics.
+ :param type: The type of the resource. The value must be ``rum_metrics``.
:type type: RumMetricType
"""
super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/rum_metric_event_type.py b/src/datadog_api_client/v2/model/rum_metric_event_type.py
index bf708d30ea..7749c7c4f5 100644
--- a/src/datadog_api_client/v2/model/rum_metric_event_type.py
+++ b/src/datadog_api_client/v2/model/rum_metric_event_type.py
@@ -14,7 +14,7 @@
class RumMetricEventType(ModelSimple):
"""
- The type of RUM events to filter on.
+ The type of RUM events the metric is generated from. It is set at creation and cannot be changed.
:param value: Must be one of ["session", "view", "action", "error", "resource", "long_task", "vital"].
:type value: str
diff --git a/src/datadog_api_client/v2/model/rum_metric_filter.py b/src/datadog_api_client/v2/model/rum_metric_filter.py
index a67b4e4190..5125ca036f 100644
--- a/src/datadog_api_client/v2/model/rum_metric_filter.py
+++ b/src/datadog_api_client/v2/model/rum_metric_filter.py
@@ -23,9 +23,12 @@ def openapi_types(_):
def __init__(self_, **kwargs):
"""
- The RUM-based metric filter. Events matching this filter will be aggregated in this metric.
+ The RUM-based metric filter. Events matching this filter will be aggregated in this metric. The ``event_type`` filter is added automatically.
- :param query: The search query - following the RUM search syntax.
+ :param query: The search query, following the `RUM search syntax `_.
+ Do not include a ``@type`` filter, it is derived from ``event_type``.
+ It must not contain invisible or control characters such as non-breaking or zero-width spaces.
+ When updating a metric, an empty query leaves the filter unchanged.
:type query: str
"""
super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/rum_metric_group_by.py b/src/datadog_api_client/v2/model/rum_metric_group_by.py
index c7d1b3a236..62f6490a94 100644
--- a/src/datadog_api_client/v2/model/rum_metric_group_by.py
+++ b/src/datadog_api_client/v2/model/rum_metric_group_by.py
@@ -14,6 +14,12 @@
class RumMetricGroupBy(ModelNormal):
+ validations = {
+ "tag_name": {
+ "max_length": 200,
+ },
+ }
+
@cached_property
def openapi_types(_):
return {
@@ -30,10 +36,11 @@ def __init__(self_, path: str, tag_name: Union[str, UnsetType] = unset, **kwargs
"""
A group by rule.
- :param path: The path to the value the RUM-based metric will be aggregated over.
+ :param path: The path of the RUM event attribute to group the metric by.
:type path: str
- :param tag_name: Eventual name of the tag that gets created. By default, ``path`` is used as the tag name.
+ :param tag_name: Name of the tag that gets created on the metric. By default, ``path`` is used as the tag name.
+ It must be at most 200 characters long, start with a letter, and contain only lowercase letters, digits, underscores, hyphens, colons, periods, and slashes.
:type tag_name: str, optional
"""
if tag_name is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_response_attributes.py b/src/datadog_api_client/v2/model/rum_metric_response_attributes.py
index f3c2e08987..285bbfde3d 100644
--- a/src/datadog_api_client/v2/model/rum_metric_response_attributes.py
+++ b/src/datadog_api_client/v2/model/rum_metric_response_attributes.py
@@ -58,19 +58,19 @@ def __init__(
"""
The object describing a Datadog RUM-based metric.
- :param compute: The compute rule to compute the RUM-based metric.
+ :param compute: The compute rule of the RUM-based metric.
:type compute: RumMetricResponseCompute, optional
- :param event_type: The type of RUM events to filter on.
+ :param event_type: The type of RUM events the metric is generated from. It is set at creation and cannot be changed.
:type event_type: RumMetricEventType, optional
- :param filter: The RUM-based metric filter. RUM events matching this filter will be aggregated in this metric.
+ :param filter: The RUM-based metric filter. RUM events matching this filter are aggregated in this metric. Omitted if the metric only filters on the event type.
:type filter: RumMetricResponseFilter, optional
- :param group_by: The rules for the group by.
+ :param group_by: The rules the metric is grouped by. Omitted if the metric is not grouped.
:type group_by: [RumMetricResponseGroupBy], optional
- :param uniqueness: The rule to count updatable events. Is only set if ``event_type`` is ``session`` or ``view``.
+ :param uniqueness: The rule to count updatable events. Only present if ``event_type`` is ``session`` or ``view`` , and absent on older metrics created before this setting existed.
:type uniqueness: RumMetricResponseUniqueness, optional
"""
if compute is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_response_compute.py b/src/datadog_api_client/v2/model/rum_metric_response_compute.py
index 4dcca23518..e9efdc94a8 100644
--- a/src/datadog_api_client/v2/model/rum_metric_response_compute.py
+++ b/src/datadog_api_client/v2/model/rum_metric_response_compute.py
@@ -42,16 +42,17 @@ def __init__(
**kwargs,
):
"""
- The compute rule to compute the RUM-based metric.
+ The compute rule of the RUM-based metric.
:param aggregation_type: The type of aggregation to use.
+ ``count`` counts the matching events. ``distribution`` aggregates the values found at ``path``.
:type aggregation_type: RumMetricComputeAggregationType, optional
- :param include_percentiles: Toggle to include or exclude percentile aggregations for distribution metrics.
- Only present when ``aggregation_type`` is ``distribution``.
+ :param include_percentiles: Toggle to include or exclude percentile aggregations (p50, p75, p90, p95, p99) for distribution metrics.
+ Required when ``aggregation_type`` is ``distribution`` , and must be omitted otherwise.
:type include_percentiles: bool, optional
- :param path: The path to the value the RUM-based metric will aggregate on.
+ :param path: The path of the numeric RUM event attribute the metric aggregates on.
Only present when ``aggregation_type`` is ``distribution``.
:type path: str, optional
"""
diff --git a/src/datadog_api_client/v2/model/rum_metric_response_data.py b/src/datadog_api_client/v2/model/rum_metric_response_data.py
index 5a565fe91c..31cd5cd0e1 100644
--- a/src/datadog_api_client/v2/model/rum_metric_response_data.py
+++ b/src/datadog_api_client/v2/model/rum_metric_response_data.py
@@ -19,6 +19,12 @@
class RumMetricResponseData(ModelNormal):
+ validations = {
+ "id": {
+ "max_length": 200,
+ },
+ }
+
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.rum_metric_response_attributes import RumMetricResponseAttributes
@@ -50,9 +56,11 @@ def __init__(
:type attributes: RumMetricResponseAttributes, optional
:param id: The name of the RUM-based metric.
+ On creation, it must be 1 to 200 characters long, contain only ASCII letters, digits, underscores, and periods, start with a letter, and not start with ``rum.measure`` or ``rum.investigate``.
+ It cannot be changed after creation.
:type id: str, optional
- :param type: The type of the resource. The value should always be rum_metrics.
+ :param type: The type of the resource. The value must be ``rum_metrics``.
:type type: RumMetricType, optional
"""
if attributes is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_response_filter.py b/src/datadog_api_client/v2/model/rum_metric_response_filter.py
index 1c1b9400b5..efdd8ed47b 100644
--- a/src/datadog_api_client/v2/model/rum_metric_response_filter.py
+++ b/src/datadog_api_client/v2/model/rum_metric_response_filter.py
@@ -26,9 +26,9 @@ def openapi_types(_):
def __init__(self_, query: Union[str, UnsetType] = unset, **kwargs):
"""
- The RUM-based metric filter. RUM events matching this filter will be aggregated in this metric.
+ The RUM-based metric filter. RUM events matching this filter are aggregated in this metric. Omitted if the metric only filters on the event type.
- :param query: The search query - following the RUM search syntax.
+ :param query: The search query, following the `RUM search syntax `_. It does not include the event type filter.
:type query: str, optional
"""
if query is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_response_group_by.py b/src/datadog_api_client/v2/model/rum_metric_response_group_by.py
index c70a74ac47..c02f4f1bd0 100644
--- a/src/datadog_api_client/v2/model/rum_metric_response_group_by.py
+++ b/src/datadog_api_client/v2/model/rum_metric_response_group_by.py
@@ -30,10 +30,10 @@ def __init__(self_, path: Union[str, UnsetType] = unset, tag_name: Union[str, Un
"""
A group by rule.
- :param path: The path to the value the RUM-based metric will be aggregated over.
+ :param path: The path of the RUM event attribute the metric is grouped by.
:type path: str, optional
- :param tag_name: Eventual name of the tag that gets created. By default, ``path`` is used as the tag name.
+ :param tag_name: Name of the tag created on the metric. By default, ``path`` is used as the tag name.
:type tag_name: str, optional
"""
if path is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_response_uniqueness.py b/src/datadog_api_client/v2/model/rum_metric_response_uniqueness.py
index f71cc8cee3..282a89a335 100644
--- a/src/datadog_api_client/v2/model/rum_metric_response_uniqueness.py
+++ b/src/datadog_api_client/v2/model/rum_metric_response_uniqueness.py
@@ -32,9 +32,9 @@ def openapi_types(_):
def __init__(self_, when: Union[RumMetricUniquenessWhen, UnsetType] = unset, **kwargs):
"""
- The rule to count updatable events. Is only set if ``event_type`` is ``session`` or ``view``.
+ The rule to count updatable events. Only present if ``event_type`` is ``session`` or ``view`` , and absent on older metrics created before this setting existed.
- :param when: When to count updatable events. ``match`` when the event is first seen, or ``end`` when the event is complete.
+ :param when: When to count updatable events. ``match`` when the event is first seen, or ``end`` when the event is complete. Sessions and views are updated over time, each one is counted once.
:type when: RumMetricUniquenessWhen, optional
"""
if when is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_type.py b/src/datadog_api_client/v2/model/rum_metric_type.py
index 7c54dbf268..a747880362 100644
--- a/src/datadog_api_client/v2/model/rum_metric_type.py
+++ b/src/datadog_api_client/v2/model/rum_metric_type.py
@@ -14,7 +14,7 @@
class RumMetricType(ModelSimple):
"""
- The type of the resource. The value should always be rum_metrics.
+ The type of the resource. The value must be `rum_metrics`.
:param value: If omitted defaults to "rum_metrics". Must be one of ["rum_metrics"].
:type value: str
diff --git a/src/datadog_api_client/v2/model/rum_metric_uniqueness.py b/src/datadog_api_client/v2/model/rum_metric_uniqueness.py
index 8b10acca5b..3cbdd38cc6 100644
--- a/src/datadog_api_client/v2/model/rum_metric_uniqueness.py
+++ b/src/datadog_api_client/v2/model/rum_metric_uniqueness.py
@@ -30,9 +30,10 @@ def openapi_types(_):
def __init__(self_, when: RumMetricUniquenessWhen, **kwargs):
"""
- The rule to count updatable events. Is only set if ``event_type`` is ``sessions`` or ``views``.
+ The rule to count updatable events.
+ Required when ``event_type`` is ``session`` or ``view`` , and must be omitted for other event types. It cannot be changed after creation.
- :param when: When to count updatable events. ``match`` when the event is first seen, or ``end`` when the event is complete.
+ :param when: When to count updatable events. ``match`` when the event is first seen, or ``end`` when the event is complete. Sessions and views are updated over time, each one is counted once.
:type when: RumMetricUniquenessWhen
"""
super().__init__(kwargs)
diff --git a/src/datadog_api_client/v2/model/rum_metric_uniqueness_when.py b/src/datadog_api_client/v2/model/rum_metric_uniqueness_when.py
index 5cd3ebd236..189711ea72 100644
--- a/src/datadog_api_client/v2/model/rum_metric_uniqueness_when.py
+++ b/src/datadog_api_client/v2/model/rum_metric_uniqueness_when.py
@@ -14,7 +14,7 @@
class RumMetricUniquenessWhen(ModelSimple):
"""
- When to count updatable events. `match` when the event is first seen, or `end` when the event is complete.
+ When to count updatable events. `match` when the event is first seen, or `end` when the event is complete. Sessions and views are updated over time, each one is counted once.
:param value: Must be one of ["match", "end"].
:type value: str
diff --git a/src/datadog_api_client/v2/model/rum_metric_update_attributes.py b/src/datadog_api_client/v2/model/rum_metric_update_attributes.py
index 5e2dc1d90f..50ba71ec25 100644
--- a/src/datadog_api_client/v2/model/rum_metric_update_attributes.py
+++ b/src/datadog_api_client/v2/model/rum_metric_update_attributes.py
@@ -46,15 +46,15 @@ def __init__(
**kwargs,
):
"""
- The RUM-based metric properties that will be updated.
+ The RUM-based metric properties that will be updated. Omitted properties keep their current value.
- :param compute: The compute rule to compute the RUM-based metric.
+ :param compute: The compute rule properties that can be updated. Only valid for metrics whose ``aggregation_type`` is ``distribution``.
:type compute: RumMetricUpdateCompute, optional
- :param filter: The RUM-based metric filter. Events matching this filter will be aggregated in this metric.
+ :param filter: The RUM-based metric filter. Events matching this filter will be aggregated in this metric. The ``event_type`` filter is added automatically.
:type filter: RumMetricFilter, optional
- :param group_by: The rules for the group by.
+ :param group_by: The rules to group the metric by. When provided, replaces all the existing group by rules.
:type group_by: [RumMetricGroupBy], optional
"""
if compute is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_update_compute.py b/src/datadog_api_client/v2/model/rum_metric_update_compute.py
index c6f5a23915..47320c8037 100644
--- a/src/datadog_api_client/v2/model/rum_metric_update_compute.py
+++ b/src/datadog_api_client/v2/model/rum_metric_update_compute.py
@@ -26,10 +26,10 @@ def openapi_types(_):
def __init__(self_, include_percentiles: Union[bool, UnsetType] = unset, **kwargs):
"""
- The compute rule to compute the RUM-based metric.
+ The compute rule properties that can be updated. Only valid for metrics whose ``aggregation_type`` is ``distribution``.
- :param include_percentiles: Toggle to include or exclude percentile aggregations for distribution metrics.
- Only present when ``aggregation_type`` is ``distribution``.
+ :param include_percentiles: Toggle to include or exclude percentile aggregations (p50, p75, p90, p95, p99) for distribution metrics.
+ Required when ``aggregation_type`` is ``distribution`` , and must be omitted otherwise.
:type include_percentiles: bool, optional
"""
if include_percentiles is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_update_data.py b/src/datadog_api_client/v2/model/rum_metric_update_data.py
index 5b677446ae..c59b72615b 100644
--- a/src/datadog_api_client/v2/model/rum_metric_update_data.py
+++ b/src/datadog_api_client/v2/model/rum_metric_update_data.py
@@ -19,6 +19,12 @@
class RumMetricUpdateData(ModelNormal):
+ validations = {
+ "id": {
+ "max_length": 200,
+ },
+ }
+
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.rum_metric_update_attributes import RumMetricUpdateAttributes
@@ -40,15 +46,17 @@ def __init__(
self_, attributes: RumMetricUpdateAttributes, type: RumMetricType, id: Union[str, UnsetType] = unset, **kwargs
):
"""
- The new RUM-based metric properties.
+ The RUM-based metric properties to update. ``id`` is required by the API and must match the ``metric_id`` path parameter.
- :param attributes: The RUM-based metric properties that will be updated.
+ :param attributes: The RUM-based metric properties that will be updated. Omitted properties keep their current value.
:type attributes: RumMetricUpdateAttributes
:param id: The name of the RUM-based metric.
+ On creation, it must be 1 to 200 characters long, contain only ASCII letters, digits, underscores, and periods, start with a letter, and not start with ``rum.measure`` or ``rum.investigate``.
+ It cannot be changed after creation.
:type id: str, optional
- :param type: The type of the resource. The value should always be rum_metrics.
+ :param type: The type of the resource. The value must be ``rum_metrics``.
:type type: RumMetricType
"""
if id is not unset:
diff --git a/src/datadog_api_client/v2/model/rum_metric_update_request.py b/src/datadog_api_client/v2/model/rum_metric_update_request.py
index 9396a4c8d1..0f79fecb57 100644
--- a/src/datadog_api_client/v2/model/rum_metric_update_request.py
+++ b/src/datadog_api_client/v2/model/rum_metric_update_request.py
@@ -30,9 +30,9 @@ def openapi_types(_):
def __init__(self_, data: RumMetricUpdateData, **kwargs):
"""
- The new RUM-based metric body.
+ The RUM-based metric update body.
- :param data: The new RUM-based metric properties.
+ :param data: The RUM-based metric properties to update. ``id`` is required by the API and must match the ``metric_id`` path parameter.
:type data: RumMetricUpdateData
"""
super().__init__(kwargs)