Skip to content

Commit 07d66b8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7488545 of spec repo
1 parent 47262ff commit 07d66b8

14 files changed

Lines changed: 595 additions & 0 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,6 +2855,127 @@ components:
28552855
- service
28562856
- name
28572857
type: object
2858+
FormulaAndFunctionApmMetricStatName:
2859+
description: APM metric stat name.
2860+
enum:
2861+
- errors
2862+
- error_rate
2863+
- errors_per_second
2864+
- latency_avg
2865+
- latency_max
2866+
- latency_p50
2867+
- latency_p75
2868+
- latency_p90
2869+
- latency_p95
2870+
- latency_p99
2871+
- latency_p999
2872+
- latency_distribution
2873+
- hits
2874+
- hits_per_second
2875+
- total_time
2876+
- apdex
2877+
example: hits
2878+
type: string
2879+
x-enum-varnames:
2880+
- ERRORS
2881+
- ERROR_RATE
2882+
- ERRORS_PER_SECOND
2883+
- LATENCY_AVG
2884+
- LATENCY_MAX
2885+
- LATENCY_P50
2886+
- LATENCY_P75
2887+
- LATENCY_P90
2888+
- LATENCY_P95
2889+
- LATENCY_P99
2890+
- LATENCY_P999
2891+
- LATENCY_DISTRIBUTION
2892+
- HITS
2893+
- HITS_PER_SECOND
2894+
- TOTAL_TIME
2895+
- APDEX
2896+
FormulaAndFunctionApmMetricsDataSource:
2897+
description: Data source for APM metrics queries.
2898+
enum:
2899+
- apm_metrics
2900+
example: apm_metrics
2901+
type: string
2902+
x-enum-varnames:
2903+
- APM_METRICS
2904+
FormulaAndFunctionApmMetricsQueryDefinition:
2905+
description: A formula and functions APM metrics query.
2906+
properties:
2907+
data_source:
2908+
$ref: '#/components/schemas/FormulaAndFunctionApmMetricsDataSource'
2909+
group_by:
2910+
description: Optional fields to group the query results by.
2911+
items:
2912+
description: A field to group results by.
2913+
example: resource_name
2914+
type: string
2915+
type: array
2916+
name:
2917+
description: Name of this query to use in formulas.
2918+
example: query_errors
2919+
type: string
2920+
operation_mode:
2921+
description: Optional operation mode to aggregate across operation names.
2922+
example: primary
2923+
type: string
2924+
operation_name:
2925+
description: Name of operation on service. If not provided, the primary
2926+
operation name is used.
2927+
example: web.request
2928+
type: string
2929+
peer_tags:
2930+
description: Tags to query for a specific downstream entity (peer.service,
2931+
peer.db_instance, peer.s3, peer.s3.bucket, etc.).
2932+
items:
2933+
example: peer.service:my-service
2934+
type: string
2935+
type: array
2936+
query_filter:
2937+
description: Additional filters for the query using metrics query syntax
2938+
(e.g., env, primary_tag).
2939+
example: env:prod
2940+
type: string
2941+
resource_hash:
2942+
description: The hash of a specific resource to filter by.
2943+
example: abc123
2944+
type: string
2945+
resource_name:
2946+
description: The full name of a specific resource to filter by.
2947+
example: GET /api/v1/users
2948+
type: string
2949+
service:
2950+
description: APM service name.
2951+
example: web-store
2952+
type: string
2953+
span_kind:
2954+
$ref: '#/components/schemas/FormulaAndFunctionApmMetricsSpanKind'
2955+
stat:
2956+
$ref: '#/components/schemas/FormulaAndFunctionApmMetricStatName'
2957+
required:
2958+
- data_source
2959+
- name
2960+
- stat
2961+
type: object
2962+
FormulaAndFunctionApmMetricsSpanKind:
2963+
description: Describes the relationship between the span, its parents, and its
2964+
children in a trace.
2965+
enum:
2966+
- consumer
2967+
- server
2968+
- client
2969+
- producer
2970+
- internal
2971+
example: server
2972+
type: string
2973+
x-enum-varnames:
2974+
- CONSUMER
2975+
- SERVER
2976+
- CLIENT
2977+
- PRODUCER
2978+
- INTERNAL
28582979
FormulaAndFunctionApmResourceStatName:
28592980
description: APM resource stat name.
28602981
enum:
@@ -3296,6 +3417,7 @@ components:
32963417
- $ref: '#/components/schemas/FormulaAndFunctionProcessQueryDefinition'
32973418
- $ref: '#/components/schemas/FormulaAndFunctionApmDependencyStatsQueryDefinition'
32983419
- $ref: '#/components/schemas/FormulaAndFunctionApmResourceStatsQueryDefinition'
3420+
- $ref: '#/components/schemas/FormulaAndFunctionApmMetricsQueryDefinition'
32993421
- $ref: '#/components/schemas/FormulaAndFunctionSLOQueryDefinition'
33003422
- $ref: '#/components/schemas/FormulaAndFunctionCloudCostQueryDefinition'
33013423
FormulaAndFunctionResponseFormat:

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102212,6 +102212,13 @@ paths:
102212102212
get:
102213102213
description: Get the list of all critical assets.
102214102214
operationId: ListSecurityMonitoringCriticalAssets
102215+
parameters:
102216+
- description: Query string.
102217+
in: query
102218+
name: query
102219+
required: false
102220+
schema:
102221+
type: string
102215102222
responses:
102216102223
'200':
102217102224
content:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-02-20T10:00:00.000Z

cassettes/features/v1/dashboards/Create-a-new-dashboard-with-apm-metrics-widget.yml

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Create a new dashboard with apm metrics widget
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::DashboardsAPI.new
5+
6+
body = DatadogAPIClient::V1::Dashboard.new({
7+
title: "Example-Dashboard",
8+
widgets: [
9+
DatadogAPIClient::V1::Widget.new({
10+
definition: DatadogAPIClient::V1::TableWidgetDefinition.new({
11+
title: "",
12+
title_size: "16",
13+
title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT,
14+
type: DatadogAPIClient::V1::TableWidgetDefinitionType::QUERY_TABLE,
15+
requests: [
16+
DatadogAPIClient::V1::TableWidgetRequest.new({
17+
response_format: DatadogAPIClient::V1::FormulaAndFunctionResponseFormat::SCALAR,
18+
queries: [
19+
DatadogAPIClient::V1::FormulaAndFunctionApmMetricsQueryDefinition.new({
20+
stat: DatadogAPIClient::V1::FormulaAndFunctionApmMetricStatName::HITS,
21+
name: "query1",
22+
service: "web-store",
23+
data_source: DatadogAPIClient::V1::FormulaAndFunctionApmMetricsDataSource::APM_METRICS,
24+
query_filter: "env:prod",
25+
group_by: [
26+
"resource_name",
27+
],
28+
}),
29+
],
30+
}),
31+
],
32+
}),
33+
layout: DatadogAPIClient::V1::WidgetLayout.new({
34+
x: 0,
35+
y: 0,
36+
width: 4,
37+
height: 4,
38+
}),
39+
}),
40+
],
41+
layout_type: DatadogAPIClient::V1::DashboardLayoutType::ORDERED,
42+
})
43+
p api_instance.create_dashboard(body)

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,9 @@
16071607
"filter_operating_system_name" => "String",
16081608
"filter_operating_system_version" => "String",
16091609
},
1610+
"v2.ListSecurityMonitoringCriticalAssets" => {
1611+
"query" => "String",
1612+
},
16101613
"v2.CreateSecurityMonitoringCriticalAsset" => {
16111614
"body" => "SecurityMonitoringCriticalAssetCreateRequest",
16121615
},

features/v1/dashboards.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,20 @@ Feature: Dashboards
320320
And the response "widgets[0].definition.requests[0].queries[0].primary_tag_name" is equal to "datacenter"
321321
And the response "widgets[0].definition.requests[0].queries[0].operation_name" is equal to "cassandra.query"
322322

323+
@team:DataDog/dashboards-backend
324+
Scenario: Create a new dashboard with apm metrics widget
325+
Given new "CreateDashboard" request
326+
And body with value { "title": "{{ unique }}", "widgets": [{"definition": { "title": "", "title_size": "16", "title_align": "left", "type": "query_table", "requests": [ { "response_format": "scalar", "queries": [ { "stat": "hits", "name": "query1", "service": "web-store", "data_source": "apm_metrics", "query_filter": "env:prod", "group_by": ["resource_name"] } ] } ] }, "layout": { "x": 0, "y": 0, "width": 4, "height": 4 } } ], "layout_type": "ordered" }
327+
When the request is sent
328+
Then the response status is 200 OK
329+
And the response "widgets[0].definition.requests[0].response_format" is equal to "scalar"
330+
And the response "widgets[0].definition.requests[0].queries[0].stat" is equal to "hits"
331+
And the response "widgets[0].definition.requests[0].queries[0].group_by[0]" is equal to "resource_name"
332+
And the response "widgets[0].definition.requests[0].queries[0].name" is equal to "query1"
333+
And the response "widgets[0].definition.requests[0].queries[0].service" is equal to "web-store"
334+
And the response "widgets[0].definition.requests[0].queries[0].data_source" is equal to "apm_metrics"
335+
And the response "widgets[0].definition.requests[0].queries[0].query_filter" is equal to "env:prod"
336+
323337
@team:DataDog/dashboards-backend
324338
Scenario: Create a new dashboard with apm resource stats widget
325339
Given new "CreateDashboard" request

lib/datadog_api_client/inflector.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ def overrides
129129
"v1.formula_and_function_apm_dependency_stat_name" => "FormulaAndFunctionApmDependencyStatName",
130130
"v1.formula_and_function_apm_dependency_stats_data_source" => "FormulaAndFunctionApmDependencyStatsDataSource",
131131
"v1.formula_and_function_apm_dependency_stats_query_definition" => "FormulaAndFunctionApmDependencyStatsQueryDefinition",
132+
"v1.formula_and_function_apm_metrics_data_source" => "FormulaAndFunctionApmMetricsDataSource",
133+
"v1.formula_and_function_apm_metrics_query_definition" => "FormulaAndFunctionApmMetricsQueryDefinition",
134+
"v1.formula_and_function_apm_metrics_span_kind" => "FormulaAndFunctionApmMetricsSpanKind",
135+
"v1.formula_and_function_apm_metric_stat_name" => "FormulaAndFunctionApmMetricStatName",
132136
"v1.formula_and_function_apm_resource_stat_name" => "FormulaAndFunctionApmResourceStatName",
133137
"v1.formula_and_function_apm_resource_stats_data_source" => "FormulaAndFunctionApmResourceStatsDataSource",
134138
"v1.formula_and_function_apm_resource_stats_query_definition" => "FormulaAndFunctionApmResourceStatsQueryDefinition",
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
=begin
2+
#Datadog API V1 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::V1
20+
# APM metric stat name.
21+
class FormulaAndFunctionApmMetricStatName
22+
include BaseEnumModel
23+
24+
ERRORS = "errors".freeze
25+
ERROR_RATE = "error_rate".freeze
26+
ERRORS_PER_SECOND = "errors_per_second".freeze
27+
LATENCY_AVG = "latency_avg".freeze
28+
LATENCY_MAX = "latency_max".freeze
29+
LATENCY_P50 = "latency_p50".freeze
30+
LATENCY_P75 = "latency_p75".freeze
31+
LATENCY_P90 = "latency_p90".freeze
32+
LATENCY_P95 = "latency_p95".freeze
33+
LATENCY_P99 = "latency_p99".freeze
34+
LATENCY_P999 = "latency_p999".freeze
35+
LATENCY_DISTRIBUTION = "latency_distribution".freeze
36+
HITS = "hits".freeze
37+
HITS_PER_SECOND = "hits_per_second".freeze
38+
TOTAL_TIME = "total_time".freeze
39+
APDEX = "apdex".freeze
40+
end
41+
end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
=begin
2+
#Datadog API V1 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::V1
20+
# Data source for APM metrics queries.
21+
class FormulaAndFunctionApmMetricsDataSource
22+
include BaseEnumModel
23+
24+
APM_METRICS = "apm_metrics".freeze
25+
end
26+
end

0 commit comments

Comments
 (0)