Skip to content
Open
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
364 changes: 296 additions & 68 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

156 changes: 120 additions & 36 deletions src/datadog_api_client/v2/api/rum_api.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/datadog_api_client/v2/model/rum_aggregate_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __init__(
):
"""
The object sent with the request to retrieve aggregation buckets of RUM events from your organization.
``filter.indexes`` is not supported and ignored.

:param compute: The list of metrics or timeseries to compute for the retrieved buckets.
:type compute: [RUMCompute], optional
Expand Down
4 changes: 2 additions & 2 deletions src/datadog_api_client/v2/model/rum_aggregate_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(
"""
A sort rule.

:param aggregation: An aggregation function.
:param aggregation: An aggregation function. ``count`` counts events and needs no metric. ``cardinality`` counts the distinct values of the metric. ``sum`` , ``min`` , ``max`` , ``avg`` , ``median`` and the percentiles ( ``pc75`` to ``pc99`` ) apply to a numeric metric such as ``@view.loading_time``.
:type aggregation: RUMAggregationFunction, optional

:param metric: The metric to sort by (only used for ``type=measure`` ).
Expand All @@ -60,7 +60,7 @@ def __init__(
:param order: The order to use, ascending or descending.
:type order: RUMSortOrder, optional

:param type: The type of sorting algorithm.
:param type: The type of sorting algorithm. ``alphabetical`` sorts buckets by the facet value, ``measure`` sorts them by a computed aggregation.
:type type: RUMAggregateSortType, optional
"""
if aggregation is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class RUMAggregateSortType(ModelSimple):
"""
The type of sorting algorithm.
The type of sorting algorithm. `alphabetical` sorts buckets by the facet value, `measure` sorts them by a computed aggregation.

:param value: If omitted defaults to "alphabetical". Must be one of ["alphabetical", "measure"].
:type value: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class RUMAggregationFunction(ModelSimple):
"""
An aggregation function.
An aggregation function. `count` counts events and needs no metric. `cardinality` counts the distinct values of the metric. `sum`, `min`, `max`, `avg`, `median` and the percentiles (`pc75` to `pc99`) apply to a numeric metric such as `@view.loading_time`.

:param value: Must be one of ["count", "cardinality", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg", "median"].
:type value: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def __init__(
:param tags: List of tags associated with the RUM application.
:type tags: [str], optional

:param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``.
:param type: Type of the RUM application. Possible values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform`` , ``react`` , ``nextjs`` , ``angular`` , ``vuejs`` , ``nuxt`` , ``tanstack`` , ``maui`` , ``salesforce-lwc`` , ``shopify`` , ``cpp`` , ``rum-cpp`` , ``unreal``.
:type type: str

:param updated_at: Timestamp in ms of the last update date.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def __init__(self_, attributes: RUMApplicationCreateAttributes, type: RUMApplica
RUM application creation.

:param attributes: RUM application creation attributes.
When ``rum_event_processing_state`` is omitted, it defaults to ``ALL``. When ``product_analytics_retention_state`` is omitted, Product Analytics is not enabled. Setting it to ``MAX`` requires the ``product_analytics_apps_write`` permission.
:type attributes: RUMApplicationCreateAttributes

:param type: RUM application creation type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING
from typing import List, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -19,62 +19,113 @@


class RUMApplicationCreateAttributes(ModelNormal):
validations = {
"name": {
"max_length": 255,
},
"product_analytics_replay_sample_rate": {
"inclusive_maximum": 2147483647,
},
}

@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState
from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState

return {
"apm_rum_flat_sampling_replay_enabled": (bool,),
"apm_rum_flat_sampling_replay_sample_rate": (float,),
"create_default_retention_filters": (bool,),
"error_tracking_exclusion_filter_enabled": (bool,),
"name": (str,),
"product_analytics_replay_sample_rate": (int,),
"product_analytics_retention_state": (RUMProductAnalyticsRetentionState,),
"rum_event_processing_state": (RUMEventProcessingState,),
"tags": ([str],),
"type": (str,),
}

attribute_map = {
"apm_rum_flat_sampling_replay_enabled": "apm_rum_flat_sampling_replay_enabled",
"apm_rum_flat_sampling_replay_sample_rate": "apm_rum_flat_sampling_replay_sample_rate",
"create_default_retention_filters": "create_default_retention_filters",
"error_tracking_exclusion_filter_enabled": "error_tracking_exclusion_filter_enabled",
"name": "name",
"product_analytics_replay_sample_rate": "product_analytics_replay_sample_rate",
"product_analytics_retention_state": "product_analytics_retention_state",
"rum_event_processing_state": "rum_event_processing_state",
"tags": "tags",
"type": "type",
}

def __init__(
self_,
name: str,
apm_rum_flat_sampling_replay_enabled: Union[bool, UnsetType] = unset,
apm_rum_flat_sampling_replay_sample_rate: Union[float, UnsetType] = unset,
create_default_retention_filters: Union[bool, UnsetType] = unset,
error_tracking_exclusion_filter_enabled: Union[bool, UnsetType] = unset,
product_analytics_replay_sample_rate: Union[int, UnsetType] = unset,
product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset,
rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset,
tags: Union[List[str], UnsetType] = unset,
type: Union[str, UnsetType] = unset,
**kwargs,
):
"""
RUM application creation attributes.
When ``rum_event_processing_state`` is omitted, it defaults to ``ALL``. When ``product_analytics_retention_state`` is omitted, Product Analytics is not enabled. Setting it to ``MAX`` requires the ``product_analytics_apps_write`` permission.

:param apm_rum_flat_sampling_replay_enabled: Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. Defaults to ``true``.
:type apm_rum_flat_sampling_replay_enabled: bool, optional

:param apm_rum_flat_sampling_replay_sample_rate: Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. Defaults to ``1``.
:type apm_rum_flat_sampling_replay_sample_rate: float, optional

:param create_default_retention_filters: Whether to create the default retention filters when the application is created: ``Sessions with errors`` and ``Sessions`` , each with a 100% retention rate.
Set to ``false`` to create the application without them, for example when you add your own retention filters right after creating it. Until you add retention filters, the application only retains sessions matched by its `permanent retention filters <https://docs.datadoghq.com/real_user_monitoring/rum_without_limits/retention_filters/#permanent-retention-filters>`_.
This setting doesn't affect permanent retention filters (sessions with forced replays, Synthetics sessions and RUM-APM flat sampling).
:type create_default_retention_filters: bool, optional

:param name: Name of the RUM application.
:param error_tracking_exclusion_filter_enabled: Indicates if Error Tracking exclusion filters are enabled for the application. Defaults to ``false``.
:type error_tracking_exclusion_filter_enabled: bool, optional

:param name: Name of the RUM application. Between 1 and 255 characters.
:type name: str

:param product_analytics_replay_sample_rate: Sample rate (0-100) of Session Replay for Product Analytics sessions. Defaults to ``100``.
:type product_analytics_replay_sample_rate: int, optional

:param product_analytics_retention_state: Controls the retention policy for Product Analytics data derived from RUM events.
Requests also accept ``PREVIEW`` (the initial state of a new application, reported as ``NONE`` in responses). Setting ``MAX`` requires the ``product_analytics_apps_write`` permission.
:type product_analytics_retention_state: RUMProductAnalyticsRetentionState, optional

:param rum_event_processing_state: Configures which RUM events are processed and stored for the application.
:param rum_event_processing_state: Configures which RUM events are processed and stored for the application. Defaults to ``ALL`` when creating an application.
:type rum_event_processing_state: RUMEventProcessingState, optional

:param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``.
:param tags: List of tags to associate with the RUM application, in ``key:value`` format.
:type tags: [str], optional

:param type: Type of the RUM application. Defaults to ``browser``. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform`` , ``react`` , ``nextjs`` , ``angular`` , ``vuejs`` , ``nuxt`` , ``tanstack`` , ``maui`` , ``salesforce-lwc`` , ``shopify`` , ``cpp`` , ``rum-cpp`` , ``unreal``.
:type type: str, optional
"""
if apm_rum_flat_sampling_replay_enabled is not unset:
kwargs["apm_rum_flat_sampling_replay_enabled"] = apm_rum_flat_sampling_replay_enabled
if apm_rum_flat_sampling_replay_sample_rate is not unset:
kwargs["apm_rum_flat_sampling_replay_sample_rate"] = apm_rum_flat_sampling_replay_sample_rate
if create_default_retention_filters is not unset:
kwargs["create_default_retention_filters"] = create_default_retention_filters
if error_tracking_exclusion_filter_enabled is not unset:
kwargs["error_tracking_exclusion_filter_enabled"] = error_tracking_exclusion_filter_enabled
if product_analytics_replay_sample_rate is not unset:
kwargs["product_analytics_replay_sample_rate"] = product_analytics_replay_sample_rate
if product_analytics_retention_state is not unset:
kwargs["product_analytics_retention_state"] = product_analytics_retention_state
if rum_event_processing_state is not unset:
kwargs["rum_event_processing_state"] = rum_event_processing_state
if tags is not unset:
kwargs["tags"] = tags
if type is not unset:
kwargs["type"] = type
super().__init__(kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def __init__(
:param tags: List of tags associated with the RUM application.
:type tags: [str], optional

:param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``.
:param type: Type of the RUM application. Possible values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform`` , ``react`` , ``nextjs`` , ``angular`` , ``vuejs`` , ``nuxt`` , ``tanstack`` , ``maui`` , ``salesforce-lwc`` , ``shopify`` , ``cpp`` , ``rum-cpp`` , ``unreal``.
:type type: str

:param updated_at: Timestamp in ms of the last update date.
Expand Down
3 changes: 2 additions & 1 deletion src/datadog_api_client/v2/model/rum_application_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def __init__(
"""
RUM application update.

:param attributes: RUM application update attributes.
:param attributes: RUM application update attributes. Only the attributes you provide are changed, omitted attributes keep their current value.
Changing ``product_analytics_retention_state`` or ``product_analytics_replay_sample_rate`` requires the ``product_analytics_apps_write`` permission.
:type attributes: RUMApplicationUpdateAttributes, optional

:param id: RUM application ID.
Expand Down
Loading
Loading