Skip to content
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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "fde8b90",
"generated": "2025-08-18 20:32:42.259"
"spec_repo_commit": "4413e63",
"generated": "2025-08-19 20:28:38.330"
}
72 changes: 72 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32160,6 +32160,8 @@ components:
format: int32
maximum: 2147483647
type: integer
product_scales:
$ref: '#/components/schemas/RUMProductScales'
type:
description: Type of the RUM application. Supported values are `browser`,
`ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`,
Expand Down Expand Up @@ -32204,6 +32206,10 @@ components:
description: Name of the RUM application.
example: my_new_rum_application
type: string
product_analytics_retention_state:
$ref: '#/components/schemas/RUMProductAnalyticsRetentionState'
rum_event_processing_state:
$ref: '#/components/schemas/RUMEventProcessingState'
type:
description: Type of the RUM application. Supported values are `browser`,
`ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`,
Expand Down Expand Up @@ -32278,6 +32284,8 @@ components:
format: int32
maximum: 2147483647
type: integer
product_scales:
$ref: '#/components/schemas/RUMProductScales'
type:
description: Type of the RUM application. Supported values are `browser`,
`ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`,
Expand Down Expand Up @@ -32349,6 +32357,10 @@ components:
description: Name of the RUM application.
example: updated_name_for_my_existing_rum_application
type: string
product_analytics_retention_state:
$ref: '#/components/schemas/RUMProductAnalyticsRetentionState'
rum_event_processing_state:
$ref: '#/components/schemas/RUMEventProcessingState'
type:
description: Type of the RUM application. Supported values are `browser`,
`ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`,
Expand Down Expand Up @@ -32477,6 +32489,33 @@ components:
format: date-time
type: string
type: object
RUMEventProcessingScale:
description: RUM event processing scale configuration.
properties:
last_modified_at:
description: Timestamp in milliseconds when this scale was last modified.
example: 1721897494108
format: int64
type: integer
state:
$ref: '#/components/schemas/RUMEventProcessingState'
type: object
RUMEventProcessingState:
description: Configures which RUM events are processed and stored for the application.
enum:
- ALL
- ERROR_FOCUSED_MODE
- NONE
example: ALL
type: string
x-enum-descriptions:
- Process and store all RUM events (sessions, views, actions, resources, errors)
- Process and store only error events and related critical events
- "Disable RUM event processing\u2014no events are stored"
x-enum-varnames:
- ALL
- ERROR_FOCUSED_MODE
- NONE
RUMEventType:
default: rum
description: Type of the event.
Expand Down Expand Up @@ -32583,6 +32622,39 @@ components:
RUMGroupByTotalString:
description: A string to use as the key value for the total bucket.
type: string
RUMProductAnalyticsRetentionScale:
description: Product Analytics retention scale configuration.
properties:
last_modified_at:
description: Timestamp in milliseconds when this scale was last modified.
example: 1747922145974
format: int64
type: integer
state:
$ref: '#/components/schemas/RUMProductAnalyticsRetentionState'
type: object
RUMProductAnalyticsRetentionState:
description: Controls the retention policy for Product Analytics data derived
from RUM events.
enum:
- MAX
- NONE
example: MAX
type: string
x-enum-descriptions:
- Store Product Analytics data for the maximum available retention period
- Do not store Product Analytics data
x-enum-varnames:
- MAX
- NONE
RUMProductScales:
description: Product Scales configuration for the RUM application.
properties:
product_analytics_retention_scale:
$ref: '#/components/schemas/RUMProductAnalyticsRetentionScale'
rum_event_processing_scale:
$ref: '#/components/schemas/RUMEventProcessingScale'
type: object
RUMQueryFilter:
description: The search and filter query settings.
properties:
Expand Down
35 changes: 35 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15243,6 +15243,20 @@ datadog\_api\_client.v2.model.rum\_event\_attributes module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_event\_processing\_scale module
------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.rum_event_processing_scale
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_event\_processing\_state module
------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.rum_event_processing_state
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_event\_type module
-----------------------------------------------------

Expand Down Expand Up @@ -15446,6 +15460,27 @@ datadog\_api\_client.v2.model.rum\_metrics\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_product\_analytics\_retention\_scale module
------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.rum_product_analytics_retention_scale
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_product\_analytics\_retention\_state module
------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.rum_product_analytics_retention_state
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_product\_scales module
---------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.rum_product_scales
:members:
:show-inheritance:

datadog\_api\_client.v2.model.rum\_query\_filter module
-------------------------------------------------------

Expand Down
31 changes: 31 additions & 0 deletions examples/v2/rum/CreateRUMApplication_1946294560.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""
Create a new RUM application with Product Scales returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.rum_api import RUMApi
from datadog_api_client.v2.model.rum_application_create import RUMApplicationCreate
from datadog_api_client.v2.model.rum_application_create_attributes import RUMApplicationCreateAttributes
from datadog_api_client.v2.model.rum_application_create_request import RUMApplicationCreateRequest
from datadog_api_client.v2.model.rum_application_create_type import RUMApplicationCreateType
from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState
from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState

body = RUMApplicationCreateRequest(
data=RUMApplicationCreate(
attributes=RUMApplicationCreateAttributes(
name="test-rum-with-product-scales-5c67ebb32077e1d9",
type="browser",
rum_event_processing_state=RUMEventProcessingState.ERROR_FOCUSED_MODE,
product_analytics_retention_state=RUMProductAnalyticsRetentionState.NONE,
),
type=RUMApplicationCreateType.RUM_APPLICATION_CREATE,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = RUMApi(api_client)
response = api_instance.create_rum_application(body=body)

print(response)
35 changes: 35 additions & 0 deletions examples/v2/rum/UpdateRUMApplication_394074053.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
Update a RUM application with Product Scales returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.rum_api import RUMApi
from datadog_api_client.v2.model.rum_application_update import RUMApplicationUpdate
from datadog_api_client.v2.model.rum_application_update_attributes import RUMApplicationUpdateAttributes
from datadog_api_client.v2.model.rum_application_update_request import RUMApplicationUpdateRequest
from datadog_api_client.v2.model.rum_application_update_type import RUMApplicationUpdateType
from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState
from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState

# there is a valid "rum_application" in the system
RUM_APPLICATION_DATA_ID = environ["RUM_APPLICATION_DATA_ID"]

body = RUMApplicationUpdateRequest(
data=RUMApplicationUpdate(
attributes=RUMApplicationUpdateAttributes(
name="updated_rum_with_product_scales",
rum_event_processing_state=RUMEventProcessingState.ALL,
product_analytics_retention_state=RUMProductAnalyticsRetentionState.MAX,
),
id=RUM_APPLICATION_DATA_ID,
type=RUMApplicationUpdateType.RUM_APPLICATION_UPDATE,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = RUMApi(api_client)
response = api_instance.update_rum_application(id=RUM_APPLICATION_DATA_ID, body=body)

print(response)
16 changes: 15 additions & 1 deletion src/datadog_api_client/v2/model/rum_application_attributes.py
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
from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -13,6 +13,10 @@
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.rum_product_scales import RUMProductScales


class RUMApplicationAttributes(ModelNormal):
validations = {
"org_id": {
Expand All @@ -22,6 +26,8 @@ class RUMApplicationAttributes(ModelNormal):

@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.rum_product_scales import RUMProductScales

return {
"application_id": (str,),
"client_token": (str,),
Expand All @@ -31,6 +37,7 @@ def openapi_types(_):
"is_active": (bool,),
"name": (str,),
"org_id": (int,),
"product_scales": (RUMProductScales,),
"type": (str,),
"updated_at": (int,),
"updated_by_handle": (str,),
Expand All @@ -45,6 +52,7 @@ def openapi_types(_):
"is_active": "is_active",
"name": "name",
"org_id": "org_id",
"product_scales": "product_scales",
"type": "type",
"updated_at": "updated_at",
"updated_by_handle": "updated_by_handle",
Expand All @@ -63,6 +71,7 @@ def __init__(
updated_by_handle: str,
hash: Union[str, UnsetType] = unset,
is_active: Union[bool, UnsetType] = unset,
product_scales: Union[RUMProductScales, UnsetType] = unset,
**kwargs,
):
"""
Expand Down Expand Up @@ -92,6 +101,9 @@ def __init__(
:param org_id: Org ID of the RUM application.
:type org_id: int

:param product_scales: Product Scales configuration for the RUM application.
:type product_scales: RUMProductScales, optional

:param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``.
:type type: str

Expand All @@ -105,6 +117,8 @@ def __init__(
kwargs["hash"] = hash
if is_active is not unset:
kwargs["is_active"] = is_active
if product_scales is not unset:
kwargs["product_scales"] = product_scales
super().__init__(kwargs)

self_.application_id = application_id
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
from typing import Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -13,29 +13,58 @@
)


if TYPE_CHECKING:
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


class RUMApplicationCreateAttributes(ModelNormal):
@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 {
"name": (str,),
"product_analytics_retention_state": (RUMProductAnalyticsRetentionState,),
"rum_event_processing_state": (RUMEventProcessingState,),
"type": (str,),
}

attribute_map = {
"name": "name",
"product_analytics_retention_state": "product_analytics_retention_state",
"rum_event_processing_state": "rum_event_processing_state",
"type": "type",
}

def __init__(self_, name: str, type: Union[str, UnsetType] = unset, **kwargs):
def __init__(
self_,
name: str,
product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset,
rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset,
type: Union[str, UnsetType] = unset,
**kwargs,
):
"""
RUM application creation attributes.

:param name: Name of the RUM application.
:type name: str

:param product_analytics_retention_state: Controls the retention policy for Product Analytics data derived from RUM events.
:type product_analytics_retention_state: RUMProductAnalyticsRetentionState, optional

:param rum_event_processing_state: Configures which RUM events are processed and stored for the 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``.
:type type: str, optional
"""
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 type is not unset:
kwargs["type"] = type
super().__init__(kwargs)
Expand Down
Loading
Loading