Skip to content

Commit dcd19a5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Network Path fields to usage summary API (#3753)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent f249ad2 commit dcd19a5

11 files changed

Lines changed: 739 additions & 21 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22294,6 +22294,11 @@ components:
2229422294
wireless devices over all hours in the current date for all organizations.
2229522295
format: int64
2229622296
type: integer
22297+
network_path_sum:
22298+
description: Shows the sum of all Network Path scheduled tests over all
22299+
hours in the current date for all organizations.
22300+
format: int64
22301+
type: integer
2229722302
npm_host_top99p:
2229822303
description: Shows the 99th percentile of all distinct Cloud Network Monitoring
2229922304
hosts (formerly known as Network hosts) over all hours in the current
@@ -23462,6 +23467,11 @@ components:
2346223467
wireless devices over all hours in the current date for the given org.
2346323468
format: int64
2346423469
type: integer
23470+
network_path_sum:
23471+
description: Shows the sum of all Network Path scheduled tests over all
23472+
hours in the current date for the given org.
23473+
format: int64
23474+
type: integer
2346523475
npm_host_top99p:
2346623476
description: Shows the 99th percentile of all distinct Cloud Network Monitoring
2346723477
hosts (formerly known as Network hosts) over all hours in the current
@@ -24650,6 +24660,11 @@ components:
2465024660
wireless devices over all hours in the current month for all organizations.
2465124661
format: int64
2465224662
type: integer
24663+
network_path_agg_sum:
24664+
description: Shows the sum of all Network Path scheduled tests over all
24665+
hours in the current month for all organizations.
24666+
format: int64
24667+
type: integer
2465324668
npm_host_top99p_sum:
2465424669
description: Shows the 99th percentile of all distinct Cloud Network Monitoring
2465524670
hosts (formerly known as Network hosts) over all hours in the current

.generator/schemas/v2/openapi.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54739,6 +54739,69 @@ components:
5473954739
type: string
5474054740
x-enum-varnames:
5474154741
- RULESET
54742+
RumCrossProductSampling:
54743+
description: 'Configuration for additional APM trace data retention for sessions
54744+
that match this retention filter.
54745+
54746+
When a session matches the filter and is retained (based on `sample_rate`),
54747+
you can configure
54748+
54749+
the percentage of retained sessions with ingested traces whose traces are
54750+
indexed.'
54751+
properties:
54752+
trace_enabled:
54753+
description: Indicates whether trace cross-product sampling is enabled.
54754+
If `false`, no traces are indexed regardless of `trace_sample_rate`.
54755+
example: true
54756+
type: boolean
54757+
trace_sample_rate:
54758+
description: 'The percentage (0-100) of retained sessions with ingested
54759+
traces whose traces are indexed.
54760+
54761+
For example, 25.0 means 25% of retained sessions with ingested traces
54762+
have their traces indexed.'
54763+
example: 25.0
54764+
format: double
54765+
maximum: 100
54766+
minimum: 0
54767+
type: number
54768+
type: object
54769+
RumCrossProductSamplingCreate:
54770+
description: Configuration for cross-product sampling when creating a retention
54771+
filter.
54772+
properties:
54773+
trace_enabled:
54774+
description: Indicates whether trace cross-product sampling is enabled.
54775+
example: true
54776+
type: boolean
54777+
trace_sample_rate:
54778+
description: The percentage (0-100) of retained sessions with ingested traces
54779+
whose traces are indexed.
54780+
example: 25.0
54781+
format: double
54782+
maximum: 100
54783+
minimum: 0
54784+
type: number
54785+
required:
54786+
- trace_sample_rate
54787+
type: object
54788+
RumCrossProductSamplingUpdate:
54789+
description: Configuration for cross-product sampling when updating a retention
54790+
filter. All fields are optional for partial updates.
54791+
properties:
54792+
trace_enabled:
54793+
description: Indicates whether trace cross-product sampling is enabled.
54794+
example: true
54795+
type: boolean
54796+
trace_sample_rate:
54797+
description: The percentage (0-100) of retained sessions with ingested traces
54798+
whose traces are indexed.
54799+
example: 25.0
54800+
format: double
54801+
maximum: 100
54802+
minimum: 0
54803+
type: number
54804+
type: object
5474254805
RumMetricCompute:
5474354806
description: The compute rule to compute the rum-based metric.
5474454807
properties:
@@ -55026,6 +55089,8 @@ components:
5502655089
RumRetentionFilterAttributes:
5502755090
description: The object describing attributes of a RUM retention filter.
5502855091
properties:
55092+
cross_product_sampling:
55093+
$ref: '#/components/schemas/RumCrossProductSampling'
5502955094
enabled:
5503055095
$ref: '#/components/schemas/RumRetentionFilterEnabled'
5503155096
event_type:
@@ -55040,6 +55105,8 @@ components:
5504055105
RumRetentionFilterCreateAttributes:
5504155106
description: The object describing attributes of a RUM retention filter to create.
5504255107
properties:
55108+
cross_product_sampling:
55109+
$ref: '#/components/schemas/RumCrossProductSamplingCreate'
5504355110
enabled:
5504455111
$ref: '#/components/schemas/RumRetentionFilterEnabled'
5504555112
event_type:
@@ -55141,6 +55208,8 @@ components:
5514155208
RumRetentionFilterUpdateAttributes:
5514255209
description: The object describing attributes of a RUM retention filter to update.
5514355210
properties:
55211+
cross_product_sampling:
55212+
$ref: '#/components/schemas/RumCrossProductSamplingUpdate'
5514455213
enabled:
5514555214
$ref: '#/components/schemas/RumRetentionFilterEnabled'
5514655215
event_type:

api/datadogV1/model_usage_summary_date.go

Lines changed: 36 additions & 1 deletion
Large diffs are not rendered by default.

api/datadogV1/model_usage_summary_date_org.go

Lines changed: 36 additions & 1 deletion
Large diffs are not rendered by default.

api/datadogV1/model_usage_summary_response.go

Lines changed: 36 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV2
6+
7+
import (
8+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
9+
)
10+
11+
// RumCrossProductSampling Configuration for additional APM trace data retention for sessions that match this retention filter.
12+
// When a session matches the filter and is retained (based on `sample_rate`), you can configure
13+
// the percentage of retained sessions with ingested traces whose traces are indexed.
14+
type RumCrossProductSampling struct {
15+
// Indicates whether trace cross-product sampling is enabled. If `false`, no traces are indexed regardless of `trace_sample_rate`.
16+
TraceEnabled *bool `json:"trace_enabled,omitempty"`
17+
// The percentage (0-100) of retained sessions with ingested traces whose traces are indexed.
18+
// For example, 25.0 means 25% of retained sessions with ingested traces have their traces indexed.
19+
TraceSampleRate *float64 `json:"trace_sample_rate,omitempty"`
20+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
21+
UnparsedObject map[string]interface{} `json:"-"`
22+
AdditionalProperties map[string]interface{} `json:"-"`
23+
}
24+
25+
// NewRumCrossProductSampling instantiates a new RumCrossProductSampling object.
26+
// This constructor will assign default values to properties that have it defined,
27+
// and makes sure properties required by API are set, but the set of arguments
28+
// will change when the set of required properties is changed.
29+
func NewRumCrossProductSampling() *RumCrossProductSampling {
30+
this := RumCrossProductSampling{}
31+
return &this
32+
}
33+
34+
// NewRumCrossProductSamplingWithDefaults instantiates a new RumCrossProductSampling object.
35+
// This constructor will only assign default values to properties that have it defined,
36+
// but it doesn't guarantee that properties required by API are set.
37+
func NewRumCrossProductSamplingWithDefaults() *RumCrossProductSampling {
38+
this := RumCrossProductSampling{}
39+
return &this
40+
}
41+
42+
// GetTraceEnabled returns the TraceEnabled field value if set, zero value otherwise.
43+
func (o *RumCrossProductSampling) GetTraceEnabled() bool {
44+
if o == nil || o.TraceEnabled == nil {
45+
var ret bool
46+
return ret
47+
}
48+
return *o.TraceEnabled
49+
}
50+
51+
// GetTraceEnabledOk returns a tuple with the TraceEnabled field value if set, nil otherwise
52+
// and a boolean to check if the value has been set.
53+
func (o *RumCrossProductSampling) GetTraceEnabledOk() (*bool, bool) {
54+
if o == nil || o.TraceEnabled == nil {
55+
return nil, false
56+
}
57+
return o.TraceEnabled, true
58+
}
59+
60+
// HasTraceEnabled returns a boolean if a field has been set.
61+
func (o *RumCrossProductSampling) HasTraceEnabled() bool {
62+
return o != nil && o.TraceEnabled != nil
63+
}
64+
65+
// SetTraceEnabled gets a reference to the given bool and assigns it to the TraceEnabled field.
66+
func (o *RumCrossProductSampling) SetTraceEnabled(v bool) {
67+
o.TraceEnabled = &v
68+
}
69+
70+
// GetTraceSampleRate returns the TraceSampleRate field value if set, zero value otherwise.
71+
func (o *RumCrossProductSampling) GetTraceSampleRate() float64 {
72+
if o == nil || o.TraceSampleRate == nil {
73+
var ret float64
74+
return ret
75+
}
76+
return *o.TraceSampleRate
77+
}
78+
79+
// GetTraceSampleRateOk returns a tuple with the TraceSampleRate field value if set, nil otherwise
80+
// and a boolean to check if the value has been set.
81+
func (o *RumCrossProductSampling) GetTraceSampleRateOk() (*float64, bool) {
82+
if o == nil || o.TraceSampleRate == nil {
83+
return nil, false
84+
}
85+
return o.TraceSampleRate, true
86+
}
87+
88+
// HasTraceSampleRate returns a boolean if a field has been set.
89+
func (o *RumCrossProductSampling) HasTraceSampleRate() bool {
90+
return o != nil && o.TraceSampleRate != nil
91+
}
92+
93+
// SetTraceSampleRate gets a reference to the given float64 and assigns it to the TraceSampleRate field.
94+
func (o *RumCrossProductSampling) SetTraceSampleRate(v float64) {
95+
o.TraceSampleRate = &v
96+
}
97+
98+
// MarshalJSON serializes the struct using spec logic.
99+
func (o RumCrossProductSampling) MarshalJSON() ([]byte, error) {
100+
toSerialize := map[string]interface{}{}
101+
if o.UnparsedObject != nil {
102+
return datadog.Marshal(o.UnparsedObject)
103+
}
104+
if o.TraceEnabled != nil {
105+
toSerialize["trace_enabled"] = o.TraceEnabled
106+
}
107+
if o.TraceSampleRate != nil {
108+
toSerialize["trace_sample_rate"] = o.TraceSampleRate
109+
}
110+
111+
for key, value := range o.AdditionalProperties {
112+
toSerialize[key] = value
113+
}
114+
return datadog.Marshal(toSerialize)
115+
}
116+
117+
// UnmarshalJSON deserializes the given payload.
118+
func (o *RumCrossProductSampling) UnmarshalJSON(bytes []byte) (err error) {
119+
all := struct {
120+
TraceEnabled *bool `json:"trace_enabled,omitempty"`
121+
TraceSampleRate *float64 `json:"trace_sample_rate,omitempty"`
122+
}{}
123+
if err = datadog.Unmarshal(bytes, &all); err != nil {
124+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
125+
}
126+
additionalProperties := make(map[string]interface{})
127+
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
128+
datadog.DeleteKeys(additionalProperties, &[]string{"trace_enabled", "trace_sample_rate"})
129+
} else {
130+
return err
131+
}
132+
o.TraceEnabled = all.TraceEnabled
133+
o.TraceSampleRate = all.TraceSampleRate
134+
135+
if len(additionalProperties) > 0 {
136+
o.AdditionalProperties = additionalProperties
137+
}
138+
139+
return nil
140+
}

0 commit comments

Comments
 (0)