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
69 changes: 69 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
21 changes: 21 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------------------------------------

Expand Down
58 changes: 58 additions & 0 deletions src/datadog_api_client/v2/model/rum_cross_product_sampling.py
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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,),
Expand All @@ -38,6 +41,7 @@ def openapi_types(_):
}

attribute_map = {
"cross_product_sampling": "cross_product_sampling",
"enabled": "enabled",
"event_type": "event_type",
"name": "name",
Expand All @@ -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,
Expand All @@ -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

Expand All @@ -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:
Expand Down
Loading
Loading