diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 093a28a0b5..fb10f21526 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -50581,6 +50581,69 @@ components: type: string x-enum-varnames: - RULESET + RumCrossProductSampling: + description: 'Configuration for additional APM trace data retention for sessions + that match this retention filter. + + When a session matches the filter and is retained (based on `sample_rate`), + you can configure + + the percentage of retained sessions with ingested traces whose traces are + indexed.' + properties: + trace_enabled: + description: Indicates whether trace cross-product sampling is enabled. + If `false`, no traces are indexed regardless of `trace_sample_rate`. + example: true + type: boolean + trace_sample_rate: + description: 'The percentage (0-100) of retained sessions with ingested + traces whose traces are indexed. + + For example, 25.0 means 25% of retained sessions with ingested traces + have their traces indexed.' + example: 25.0 + format: double + maximum: 100 + minimum: 0 + type: number + type: object + RumCrossProductSamplingCreate: + description: Configuration for cross-product sampling when creating a retention + filter. + properties: + trace_enabled: + description: Indicates whether trace cross-product sampling is enabled. + example: true + type: boolean + trace_sample_rate: + description: The percentage (0-100) of retained sessions with ingested traces + whose traces are indexed. + example: 25.0 + format: double + maximum: 100 + minimum: 0 + type: number + required: + - trace_sample_rate + type: object + RumCrossProductSamplingUpdate: + description: Configuration for cross-product sampling when updating a retention + filter. All fields are optional for partial updates. + properties: + trace_enabled: + description: Indicates whether trace cross-product sampling is enabled. + example: true + type: boolean + trace_sample_rate: + description: The percentage (0-100) of retained sessions with ingested traces + whose traces are indexed. + example: 25.0 + format: double + maximum: 100 + minimum: 0 + type: number + type: object RumMetricCompute: description: The compute rule to compute the rum-based metric. properties: @@ -50868,6 +50931,8 @@ components: RumRetentionFilterAttributes: description: The object describing attributes of a RUM retention filter. properties: + cross_product_sampling: + $ref: '#/components/schemas/RumCrossProductSampling' enabled: $ref: '#/components/schemas/RumRetentionFilterEnabled' event_type: @@ -50882,6 +50947,8 @@ components: RumRetentionFilterCreateAttributes: description: The object describing attributes of a RUM retention filter to create. properties: + cross_product_sampling: + $ref: '#/components/schemas/RumCrossProductSamplingCreate' enabled: $ref: '#/components/schemas/RumRetentionFilterEnabled' event_type: @@ -50983,6 +51050,8 @@ components: RumRetentionFilterUpdateAttributes: description: The object describing attributes of a RUM retention filter to update. properties: + cross_product_sampling: + $ref: '#/components/schemas/RumCrossProductSamplingUpdate' enabled: $ref: '#/components/schemas/RumRetentionFilterEnabled' event_type: diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 6ea9cfc5d1..0f0ff67da8 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -22110,6 +22110,27 @@ datadog\_api\_client.v2.model.rum\_compute\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.rum\_cross\_product\_sampling module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_cross_product_sampling + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_cross\_product\_sampling\_create module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_cross_product_sampling_create + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_cross\_product\_sampling\_update module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_cross_product_sampling_update + :members: + :show-inheritance: + datadog\_api\_client.v2.model.rum\_event module ----------------------------------------------- diff --git a/src/datadog_api_client/v2/model/rum_cross_product_sampling.py b/src/datadog_api_client/v2/model/rum_cross_product_sampling.py new file mode 100644 index 0000000000..cab3b5a574 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_cross_product_sampling.py @@ -0,0 +1,58 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RumCrossProductSampling(ModelNormal): + validations = { + "trace_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "trace_enabled": (bool,), + "trace_sample_rate": (float,), + } + + attribute_map = { + "trace_enabled": "trace_enabled", + "trace_sample_rate": "trace_sample_rate", + } + + def __init__( + self_, + trace_enabled: Union[bool, UnsetType] = unset, + trace_sample_rate: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + Configuration for additional APM trace data retention for sessions that match this retention filter. + When a session matches the filter and is retained (based on ``sample_rate`` ), you can configure + the percentage of retained sessions with ingested traces whose traces are indexed. + + :param trace_enabled: Indicates whether trace cross-product sampling is enabled. If ``false`` , no traces are indexed regardless of ``trace_sample_rate``. + :type trace_enabled: bool, optional + + :param trace_sample_rate: The percentage (0-100) of retained sessions with ingested traces whose traces are indexed. + For example, 25.0 means 25% of retained sessions with ingested traces have their traces indexed. + :type trace_sample_rate: float, optional + """ + if trace_enabled is not unset: + kwargs["trace_enabled"] = trace_enabled + if trace_sample_rate is not unset: + kwargs["trace_sample_rate"] = trace_sample_rate + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_cross_product_sampling_create.py b/src/datadog_api_client/v2/model/rum_cross_product_sampling_create.py new file mode 100644 index 0000000000..c3e7588af8 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_cross_product_sampling_create.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RumCrossProductSamplingCreate(ModelNormal): + validations = { + "trace_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "trace_enabled": (bool,), + "trace_sample_rate": (float,), + } + + attribute_map = { + "trace_enabled": "trace_enabled", + "trace_sample_rate": "trace_sample_rate", + } + + def __init__(self_, trace_sample_rate: float, trace_enabled: Union[bool, UnsetType] = unset, **kwargs): + """ + Configuration for cross-product sampling when creating a retention filter. + + :param trace_enabled: Indicates whether trace cross-product sampling is enabled. + :type trace_enabled: bool, optional + + :param trace_sample_rate: The percentage (0-100) of retained sessions with ingested traces whose traces are indexed. + :type trace_sample_rate: float + """ + if trace_enabled is not unset: + kwargs["trace_enabled"] = trace_enabled + super().__init__(kwargs) + + self_.trace_sample_rate = trace_sample_rate diff --git a/src/datadog_api_client/v2/model/rum_cross_product_sampling_update.py b/src/datadog_api_client/v2/model/rum_cross_product_sampling_update.py new file mode 100644 index 0000000000..b8078ece6d --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_cross_product_sampling_update.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RumCrossProductSamplingUpdate(ModelNormal): + validations = { + "trace_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + } + + @cached_property + def openapi_types(_): + return { + "trace_enabled": (bool,), + "trace_sample_rate": (float,), + } + + attribute_map = { + "trace_enabled": "trace_enabled", + "trace_sample_rate": "trace_sample_rate", + } + + def __init__( + self_, + trace_enabled: Union[bool, UnsetType] = unset, + trace_sample_rate: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + Configuration for cross-product sampling when updating a retention filter. All fields are optional for partial updates. + + :param trace_enabled: Indicates whether trace cross-product sampling is enabled. + :type trace_enabled: bool, optional + + :param trace_sample_rate: The percentage (0-100) of retained sessions with ingested traces whose traces are indexed. + :type trace_sample_rate: float, optional + """ + if trace_enabled is not unset: + kwargs["trace_enabled"] = trace_enabled + if trace_sample_rate is not unset: + kwargs["trace_sample_rate"] = trace_sample_rate + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_retention_filter_attributes.py b/src/datadog_api_client/v2/model/rum_retention_filter_attributes.py index 9eccdcce10..e0e3c1a31b 100644 --- a/src/datadog_api_client/v2/model/rum_retention_filter_attributes.py +++ b/src/datadog_api_client/v2/model/rum_retention_filter_attributes.py @@ -14,6 +14,7 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_cross_product_sampling import RumCrossProductSampling from datadog_api_client.v2.model.rum_retention_filter_event_type import RumRetentionFilterEventType @@ -27,9 +28,11 @@ class RumRetentionFilterAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.rum_cross_product_sampling import RumCrossProductSampling from datadog_api_client.v2.model.rum_retention_filter_event_type import RumRetentionFilterEventType return { + "cross_product_sampling": (RumCrossProductSampling,), "enabled": (bool,), "event_type": (RumRetentionFilterEventType,), "name": (str,), @@ -38,6 +41,7 @@ def openapi_types(_): } attribute_map = { + "cross_product_sampling": "cross_product_sampling", "enabled": "enabled", "event_type": "event_type", "name": "name", @@ -47,6 +51,7 @@ def openapi_types(_): def __init__( self_, + cross_product_sampling: Union[RumCrossProductSampling, UnsetType] = unset, enabled: Union[bool, UnsetType] = unset, event_type: Union[RumRetentionFilterEventType, UnsetType] = unset, name: Union[str, UnsetType] = unset, @@ -57,6 +62,11 @@ def __init__( """ The object describing attributes of a RUM retention filter. + :param cross_product_sampling: Configuration for additional APM trace data retention for sessions that match this retention filter. + When a session matches the filter and is retained (based on ``sample_rate`` ), you can configure + the percentage of retained sessions with ingested traces whose traces are indexed. + :type cross_product_sampling: RumCrossProductSampling, optional + :param enabled: Whether the retention filter is enabled. :type enabled: bool, optional @@ -72,6 +82,8 @@ def __init__( :param sample_rate: The sample rate for a RUM retention filter, between 0.1 and 100. :type sample_rate: float, optional """ + if cross_product_sampling is not unset: + kwargs["cross_product_sampling"] = cross_product_sampling if enabled is not unset: kwargs["enabled"] = enabled if event_type is not unset: diff --git a/src/datadog_api_client/v2/model/rum_retention_filter_create_attributes.py b/src/datadog_api_client/v2/model/rum_retention_filter_create_attributes.py index 5c168ed78c..0dd77b60be 100644 --- a/src/datadog_api_client/v2/model/rum_retention_filter_create_attributes.py +++ b/src/datadog_api_client/v2/model/rum_retention_filter_create_attributes.py @@ -14,6 +14,7 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_cross_product_sampling_create import RumCrossProductSamplingCreate from datadog_api_client.v2.model.rum_retention_filter_event_type import RumRetentionFilterEventType @@ -27,9 +28,11 @@ class RumRetentionFilterCreateAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.rum_cross_product_sampling_create import RumCrossProductSamplingCreate from datadog_api_client.v2.model.rum_retention_filter_event_type import RumRetentionFilterEventType return { + "cross_product_sampling": (RumCrossProductSamplingCreate,), "enabled": (bool,), "event_type": (RumRetentionFilterEventType,), "name": (str,), @@ -38,6 +41,7 @@ def openapi_types(_): } attribute_map = { + "cross_product_sampling": "cross_product_sampling", "enabled": "enabled", "event_type": "event_type", "name": "name", @@ -50,6 +54,7 @@ def __init__( event_type: RumRetentionFilterEventType, name: str, sample_rate: float, + cross_product_sampling: Union[RumCrossProductSamplingCreate, UnsetType] = unset, enabled: Union[bool, UnsetType] = unset, query: Union[str, UnsetType] = unset, **kwargs, @@ -57,6 +62,9 @@ def __init__( """ The object describing attributes of a RUM retention filter to create. + :param cross_product_sampling: Configuration for cross-product sampling when creating a retention filter. + :type cross_product_sampling: RumCrossProductSamplingCreate, optional + :param enabled: Whether the retention filter is enabled. :type enabled: bool, optional @@ -72,6 +80,8 @@ def __init__( :param sample_rate: The sample rate for a RUM retention filter, between 0.1 and 100. :type sample_rate: float """ + if cross_product_sampling is not unset: + kwargs["cross_product_sampling"] = cross_product_sampling if enabled is not unset: kwargs["enabled"] = enabled if query is not unset: diff --git a/src/datadog_api_client/v2/model/rum_retention_filter_update_attributes.py b/src/datadog_api_client/v2/model/rum_retention_filter_update_attributes.py index 782a56dd70..efd7543d20 100644 --- a/src/datadog_api_client/v2/model/rum_retention_filter_update_attributes.py +++ b/src/datadog_api_client/v2/model/rum_retention_filter_update_attributes.py @@ -14,6 +14,7 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_cross_product_sampling_update import RumCrossProductSamplingUpdate from datadog_api_client.v2.model.rum_retention_filter_event_type import RumRetentionFilterEventType @@ -27,9 +28,11 @@ class RumRetentionFilterUpdateAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.rum_cross_product_sampling_update import RumCrossProductSamplingUpdate from datadog_api_client.v2.model.rum_retention_filter_event_type import RumRetentionFilterEventType return { + "cross_product_sampling": (RumCrossProductSamplingUpdate,), "enabled": (bool,), "event_type": (RumRetentionFilterEventType,), "name": (str,), @@ -38,6 +41,7 @@ def openapi_types(_): } attribute_map = { + "cross_product_sampling": "cross_product_sampling", "enabled": "enabled", "event_type": "event_type", "name": "name", @@ -47,6 +51,7 @@ def openapi_types(_): def __init__( self_, + cross_product_sampling: Union[RumCrossProductSamplingUpdate, UnsetType] = unset, enabled: Union[bool, UnsetType] = unset, event_type: Union[RumRetentionFilterEventType, UnsetType] = unset, name: Union[str, UnsetType] = unset, @@ -57,6 +62,9 @@ def __init__( """ The object describing attributes of a RUM retention filter to update. + :param cross_product_sampling: Configuration for cross-product sampling when updating a retention filter. All fields are optional for partial updates. + :type cross_product_sampling: RumCrossProductSamplingUpdate, optional + :param enabled: Whether the retention filter is enabled. :type enabled: bool, optional @@ -72,6 +80,8 @@ def __init__( :param sample_rate: The sample rate for a RUM retention filter, between 0.1 and 100. :type sample_rate: float, optional """ + if cross_product_sampling is not unset: + kwargs["cross_product_sampling"] = cross_product_sampling if enabled is not unset: kwargs["enabled"] = enabled if event_type is not unset: diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 2eece21eff..3ebe18f1a6 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -4482,6 +4482,9 @@ RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems, ) from datadog_api_client.v2.model.ruleset_resp_data_type import RulesetRespDataType +from datadog_api_client.v2.model.rum_cross_product_sampling import RumCrossProductSampling +from datadog_api_client.v2.model.rum_cross_product_sampling_create import RumCrossProductSamplingCreate +from datadog_api_client.v2.model.rum_cross_product_sampling_update import RumCrossProductSamplingUpdate from datadog_api_client.v2.model.rum_metric_compute import RumMetricCompute from datadog_api_client.v2.model.rum_metric_compute_aggregation_type import RumMetricComputeAggregationType from datadog_api_client.v2.model.rum_metric_create_attributes import RumMetricCreateAttributes @@ -9212,6 +9215,9 @@ "RulesetRespDataAttributesRulesItemsReferenceTable", "RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems", "RulesetRespDataType", + "RumCrossProductSampling", + "RumCrossProductSamplingCreate", + "RumCrossProductSamplingUpdate", "RumMetricCompute", "RumMetricComputeAggregationType", "RumMetricCreateAttributes",