Skip to content

Commit 2ea47db

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 7253915 of spec repo
1 parent 0f0854d commit 2ea47db

11 files changed

+579
-0
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2648,6 +2648,123 @@ components:
26482648
- service
26492649
- name
26502650
type: object
2651+
FormulaAndFunctionApmMetricStatName:
2652+
description: APM metric stat name.
2653+
enum:
2654+
- errors
2655+
- error_rate
2656+
- errors_per_second
2657+
- latency_avg
2658+
- latency_max
2659+
- latency_p50
2660+
- latency_p75
2661+
- latency_p90
2662+
- latency_p95
2663+
- latency_p99
2664+
- latency_p999
2665+
- latency_distribution
2666+
- hits
2667+
- hits_per_second
2668+
- total_time
2669+
- apdex
2670+
example: "hits"
2671+
type: string
2672+
x-enum-varnames:
2673+
- ERRORS
2674+
- ERROR_RATE
2675+
- ERRORS_PER_SECOND
2676+
- LATENCY_AVG
2677+
- LATENCY_MAX
2678+
- LATENCY_P50
2679+
- LATENCY_P75
2680+
- LATENCY_P90
2681+
- LATENCY_P95
2682+
- LATENCY_P99
2683+
- LATENCY_P999
2684+
- LATENCY_DISTRIBUTION
2685+
- HITS
2686+
- HITS_PER_SECOND
2687+
- TOTAL_TIME
2688+
- APDEX
2689+
FormulaAndFunctionApmMetricsDataSource:
2690+
description: Data source for APM metrics queries.
2691+
enum:
2692+
- apm_metrics
2693+
example: apm_metrics
2694+
type: string
2695+
x-enum-varnames:
2696+
- APM_METRICS
2697+
FormulaAndFunctionApmMetricsQueryDefinition:
2698+
description: A formula and functions APM metrics query.
2699+
properties:
2700+
data_source:
2701+
$ref: "#/components/schemas/FormulaAndFunctionApmMetricsDataSource"
2702+
group_by:
2703+
description: Optional fields to group the query results by.
2704+
items:
2705+
description: A field to group results by.
2706+
example: "resource_name"
2707+
type: string
2708+
type: array
2709+
name:
2710+
description: Name of this query to use in formulas.
2711+
example: "query_errors"
2712+
type: string
2713+
operation_mode:
2714+
description: Optional operation mode to aggregate across operation names.
2715+
example: "primary"
2716+
type: string
2717+
operation_name:
2718+
description: Name of operation on service. If not provided, the primary operation name is used.
2719+
example: "web.request"
2720+
type: string
2721+
peer_tags:
2722+
description: Tags to query for a specific downstream entity (peer.service, peer.db_instance, peer.s3, peer.s3.bucket, etc.).
2723+
items:
2724+
example: "peer.service:my-service"
2725+
type: string
2726+
type: array
2727+
query_filter:
2728+
description: Additional filters for the query using metrics query syntax (e.g., env, primary_tag).
2729+
example: "env:prod"
2730+
type: string
2731+
resource_hash:
2732+
description: The hash of a specific resource to filter by.
2733+
example: "abc123"
2734+
type: string
2735+
resource_name:
2736+
description: The full name of a specific resource to filter by.
2737+
example: "GET /api/v1/users"
2738+
type: string
2739+
service:
2740+
description: APM service name.
2741+
example: "web-store"
2742+
type: string
2743+
span_kind:
2744+
$ref: "#/components/schemas/FormulaAndFunctionApmMetricsSpanKind"
2745+
stat:
2746+
$ref: "#/components/schemas/FormulaAndFunctionApmMetricStatName"
2747+
required:
2748+
- data_source
2749+
- name
2750+
- stat
2751+
type: object
2752+
FormulaAndFunctionApmMetricsSpanKind:
2753+
description: Describes the relationship between the span, its parents, and its children in a trace.
2754+
enum:
2755+
- consumer
2756+
- server
2757+
- client
2758+
- producer
2759+
- internal
2760+
example: "server"
2761+
type: string
2762+
x-enum-varnames:
2763+
- CONSUMER
2764+
- SERVER
2765+
- CLIENT
2766+
- PRODUCER
2767+
- INTERNAL
26512768
FormulaAndFunctionApmResourceStatName:
26522769
description: APM resource stat name.
26532770
enum:
@@ -3077,6 +3194,7 @@ components:
30773194
- $ref: "#/components/schemas/FormulaAndFunctionProcessQueryDefinition"
30783195
- $ref: "#/components/schemas/FormulaAndFunctionApmDependencyStatsQueryDefinition"
30793196
- $ref: "#/components/schemas/FormulaAndFunctionApmResourceStatsQueryDefinition"
3197+
- $ref: "#/components/schemas/FormulaAndFunctionApmMetricsQueryDefinition"
30803198
- $ref: "#/components/schemas/FormulaAndFunctionSLOQueryDefinition"
30813199
- $ref: "#/components/schemas/FormulaAndFunctionCloudCostQueryDefinition"
30823200
FormulaAndFunctionResponseFormat:
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/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
@@ -130,6 +130,10 @@ def overrides
130130
"v1.formula_and_function_apm_dependency_stat_name" => "FormulaAndFunctionApmDependencyStatName",
131131
"v1.formula_and_function_apm_dependency_stats_data_source" => "FormulaAndFunctionApmDependencyStatsDataSource",
132132
"v1.formula_and_function_apm_dependency_stats_query_definition" => "FormulaAndFunctionApmDependencyStatsQueryDefinition",
133+
"v1.formula_and_function_apm_metrics_data_source" => "FormulaAndFunctionApmMetricsDataSource",
134+
"v1.formula_and_function_apm_metrics_query_definition" => "FormulaAndFunctionApmMetricsQueryDefinition",
135+
"v1.formula_and_function_apm_metrics_span_kind" => "FormulaAndFunctionApmMetricsSpanKind",
136+
"v1.formula_and_function_apm_metric_stat_name" => "FormulaAndFunctionApmMetricStatName",
133137
"v1.formula_and_function_apm_resource_stat_name" => "FormulaAndFunctionApmResourceStatName",
134138
"v1.formula_and_function_apm_resource_stats_data_source" => "FormulaAndFunctionApmResourceStatsDataSource",
135139
"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)