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
7 changes: 1 addition & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37791,18 +37791,13 @@ components:
example: 10.0
format: double
type: number
rate:
description: Number of events to sample (1 in N).
example: 10
format: int64
minimum: 1
type: integer
type:
$ref: '#/components/schemas/ObservabilityPipelineSampleProcessorType'
required:
- id
- type
- include
- percentage
- enabled
type: object
ObservabilityPipelineSampleProcessorType:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ def __init__(self, **kwargs):
:type metrics: [ObservabilityPipelineGeneratedMetric], optional

:param percentage: The percentage of logs to sample.
:type percentage: float, optional

:param rate: Number of events to sample (1 in N).
:type rate: int, optional
:type percentage: float

:param disable_library_rules: If set to `true`, disables the default Grok rules provided by Datadog.
:type disable_library_rules: bool, optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@


class ObservabilityPipelineSampleProcessor(ModelNormal):
validations = {
"rate": {
"inclusive_minimum": 1,
},
}

@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.observability_pipeline_sample_processor_type import (
Expand All @@ -38,7 +32,6 @@ def openapi_types(_):
"id": (str,),
"include": (str,),
"percentage": (float,),
"rate": (int,),
"type": (ObservabilityPipelineSampleProcessorType,),
}

Expand All @@ -48,7 +41,6 @@ def openapi_types(_):
"id": "id",
"include": "include",
"percentage": "percentage",
"rate": "rate",
"type": "type",
}

Expand All @@ -57,10 +49,9 @@ def __init__(
enabled: bool,
id: str,
include: str,
percentage: float,
type: ObservabilityPipelineSampleProcessorType,
display_name: Union[str, UnsetType] = unset,
percentage: Union[float, UnsetType] = unset,
rate: Union[int, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -79,23 +70,17 @@ def __init__(
:type include: str

:param percentage: The percentage of logs to sample.
:type percentage: float, optional

:param rate: Number of events to sample (1 in N).
:type rate: int, optional
:type percentage: float

:param type: The processor type. The value should always be ``sample``.
:type type: ObservabilityPipelineSampleProcessorType
"""
if display_name is not unset:
kwargs["display_name"] = display_name
if percentage is not unset:
kwargs["percentage"] = percentage
if rate is not unset:
kwargs["rate"] = rate
super().__init__(kwargs)

self_.enabled = enabled
self_.id = id
self_.include = include
self_.percentage = percentage
self_.type = type
Loading