Skip to content

Commit 9ff34f8

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

12 files changed

Lines changed: 573 additions & 6 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:

lib/datadog_api_client/inflector.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4375,6 +4375,9 @@ def overrides
43754375
"v2.rum_bucket_response" => "RUMBucketResponse",
43764376
"v2.rum_compute" => "RUMCompute",
43774377
"v2.rum_compute_type" => "RUMComputeType",
4378+
"v2.rum_cross_product_sampling" => "RumCrossProductSampling",
4379+
"v2.rum_cross_product_sampling_create" => "RumCrossProductSamplingCreate",
4380+
"v2.rum_cross_product_sampling_update" => "RumCrossProductSamplingUpdate",
43784381
"v2.rum_event" => "RUMEvent",
43794382
"v2.rum_event_attributes" => "RUMEventAttributes",
43804383
"v2.rum_event_processing_scale" => "RUMEventProcessingScale",

lib/datadog_api_client/v1/models/usage_summary_date.rb

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

lib/datadog_api_client/v1/models/usage_summary_date_org.rb

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

lib/datadog_api_client/v1/models/usage_summary_response.rb

Lines changed: 11 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+
=begin
2+
#Datadog API V2 Collection
3+
4+
#Collection of all Datadog Public endpoints.
5+
6+
The version of the OpenAPI document: 1.0
7+
Contact: support@datadoghq.com
8+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9+
10+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11+
This product includes software developed at Datadog (https://www.datadoghq.com/).
12+
Copyright 2020-Present Datadog, Inc.
13+
14+
=end
15+
16+
require 'date'
17+
require 'time'
18+
19+
module DatadogAPIClient::V2
20+
# Configuration for additional APM trace data retention for sessions that match this retention filter.
21+
# When a session matches the filter and is retained (based on `sample_rate`), you can configure
22+
# the percentage of retained sessions with ingested traces whose traces are indexed.
23+
class RumCrossProductSampling
24+
include BaseGenericModel
25+
26+
# Indicates whether trace cross-product sampling is enabled. If `false`, no traces are indexed regardless of `trace_sample_rate`.
27+
attr_accessor :trace_enabled
28+
29+
# The percentage (0-100) of retained sessions with ingested traces whose traces are indexed.
30+
# For example, 25.0 means 25% of retained sessions with ingested traces have their traces indexed.
31+
attr_reader :trace_sample_rate
32+
33+
attr_accessor :additional_properties
34+
35+
# Attribute mapping from ruby-style variable name to JSON key.
36+
# @!visibility private
37+
def self.attribute_map
38+
{
39+
:'trace_enabled' => :'trace_enabled',
40+
:'trace_sample_rate' => :'trace_sample_rate'
41+
}
42+
end
43+
44+
# Attribute type mapping.
45+
# @!visibility private
46+
def self.openapi_types
47+
{
48+
:'trace_enabled' => :'Boolean',
49+
:'trace_sample_rate' => :'Float'
50+
}
51+
end
52+
53+
# Initializes the object
54+
# @param attributes [Hash] Model attributes in the form of hash
55+
# @!visibility private
56+
def initialize(attributes = {})
57+
if (!attributes.is_a?(Hash))
58+
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::RumCrossProductSampling` initialize method"
59+
end
60+
61+
self.additional_properties = {}
62+
# check to see if the attribute exists and convert string to symbol for hash key
63+
attributes = attributes.each_with_object({}) { |(k, v), h|
64+
if (!self.class.attribute_map.key?(k.to_sym))
65+
self.additional_properties[k.to_sym] = v
66+
else
67+
h[k.to_sym] = v
68+
end
69+
}
70+
71+
if attributes.key?(:'trace_enabled')
72+
self.trace_enabled = attributes[:'trace_enabled']
73+
end
74+
75+
if attributes.key?(:'trace_sample_rate')
76+
self.trace_sample_rate = attributes[:'trace_sample_rate']
77+
end
78+
end
79+
80+
# Check to see if the all the properties in the model are valid
81+
# @return true if the model is valid
82+
# @!visibility private
83+
def valid?
84+
return false if !@trace_sample_rate.nil? && @trace_sample_rate > 100
85+
return false if !@trace_sample_rate.nil? && @trace_sample_rate < 0
86+
true
87+
end
88+
89+
# Custom attribute writer method with validation
90+
# @param trace_sample_rate [Object] Object to be assigned
91+
# @!visibility private
92+
def trace_sample_rate=(trace_sample_rate)
93+
if !trace_sample_rate.nil? && trace_sample_rate > 100
94+
fail ArgumentError, 'invalid value for "trace_sample_rate", must be smaller than or equal to 100.'
95+
end
96+
if !trace_sample_rate.nil? && trace_sample_rate < 0
97+
fail ArgumentError, 'invalid value for "trace_sample_rate", must be greater than or equal to 0.'
98+
end
99+
@trace_sample_rate = trace_sample_rate
100+
end
101+
102+
# Returns the object in the form of hash, with additionalProperties support.
103+
# @return [Hash] Returns the object in the form of hash
104+
# @!visibility private
105+
def to_hash
106+
hash = {}
107+
self.class.attribute_map.each_pair do |attr, param|
108+
value = self.send(attr)
109+
if value.nil?
110+
is_nullable = self.class.openapi_nullable.include?(attr)
111+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
112+
end
113+
114+
hash[param] = _to_hash(value)
115+
end
116+
self.additional_properties.each_pair do |attr, value|
117+
hash[attr] = value
118+
end
119+
hash
120+
end
121+
122+
# Checks equality by comparing each attribute.
123+
# @param o [Object] Object to be compared
124+
# @!visibility private
125+
def ==(o)
126+
return true if self.equal?(o)
127+
self.class == o.class &&
128+
trace_enabled == o.trace_enabled &&
129+
trace_sample_rate == o.trace_sample_rate &&
130+
additional_properties == o.additional_properties
131+
end
132+
133+
# Calculates hash code according to all attributes.
134+
# @return [Integer] Hash code
135+
# @!visibility private
136+
def hash
137+
[trace_enabled, trace_sample_rate, additional_properties].hash
138+
end
139+
end
140+
end

0 commit comments

Comments
 (0)