Skip to content

Commit 10f0d34

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 717103c5 of spec repo (#808)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 27299cb commit 10f0d34

9 files changed

Lines changed: 140 additions & 5 deletions

File tree

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-03-17 17:21:20.435225",
8-
"spec_repo_commit": "31d44cb6"
7+
"regenerated": "2022-03-17 20:07:20.504505",
8+
"spec_repo_commit": "717103c5"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-03-17 17:21:20.456223",
13-
"spec_repo_commit": "31d44cb6"
12+
"regenerated": "2022-03-17 20:07:20.525325",
13+
"spec_repo_commit": "717103c5"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6491,6 +6491,7 @@ components:
64916491
- event-v2 alert
64926492
- audit alert
64936493
- ci-pipelines alert
6494+
- error-tracking alert
64946495
example: query alert
64956496
type: string
64966497
x-enum-varnames:
@@ -6508,6 +6509,7 @@ components:
65086509
- EVENT_V2_ALERT
65096510
- AUDIT_ALERT
65106511
- CI_PIPELINES_ALERT
6512+
- ERROR_TRACKING_ALERT
65116513
MonitorUpdateRequest:
65126514
description: Object describing a monitor update request.
65136515
properties:
@@ -21258,6 +21260,8 @@ paths:
2125821260

2125921261
- audit: `audit alert`
2126021262

21263+
- error-tracking: `error-tracking alert`
21264+
2126121265

2126221266
#### Query Types
2126321267

@@ -21534,7 +21538,32 @@ paths:
2153421538
- **`#`** an integer or decimal number used to set the threshold.
2153521539

2153621540

21537-
**NOTE** Only available in closed beta on US1, EU, US3 and US5.'
21541+
**NOTE** Only available in closed beta on US1, EU, US3 and US5.
21542+
21543+
21544+
**Error Tracking Alert Query**
21545+
21546+
21547+
Example(RUM): `error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window)
21548+
operator #`
21549+
21550+
Example(APM Traces): `error-tracking-traces(query).rollup(rollup_method[,
21551+
measure]).last(time_window) operator #`
21552+
21553+
21554+
- **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
21555+
21556+
- **`rollup_method`** The stats roll-up method - supports `count`, `avg`,
21557+
and `cardinality`.
21558+
21559+
- **`measure`** For `avg` and cardinality `rollup_method` - specify the measure
21560+
or the facet name you want to use.
21561+
21562+
- **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
21563+
21564+
- **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
21565+
21566+
- **`#`** an integer or decimal number used to set the threshold.'
2153821567
operationId: CreateMonitor
2153921568
requestBody:
2154021569
content:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-03-17T20:05:01.132Z

cassettes/features/v1/monitors/Create-an-Error-Tracking-monitor-returns-OK-response.yml

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Create an Error Tracking monitor returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V1::MonitorsAPI.new
5+
6+
body = DatadogAPIClient::V1::Monitor.new({
7+
name: "Example-Create_an_Error_Tracking_monitor_returns_OK_response",
8+
type: DatadogAPIClient::V1::MonitorType::ERROR_TRACKING_ALERT,
9+
query: 'error-tracking-rum("service:foo AND @error.source:source").rollup("count").by("@issue.id").last("1h") >= 1',
10+
message: "some message",
11+
tags: [
12+
"test:examplecreateanerrortrackingmonitorreturnsokresponse",
13+
"env:ci",
14+
],
15+
priority: 3,
16+
options: DatadogAPIClient::V1::MonitorOptions.new({
17+
thresholds: DatadogAPIClient::V1::MonitorThresholds.new({
18+
critical: 1,
19+
}),
20+
}),
21+
})
22+
p api_instance.create_monitor(body)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "{{ unique}}",
3+
"type": "error-tracking alert",
4+
"query": "error-tracking-rum(\"service:foo AND @error.source:source\").rollup(\"count\").by(\"@issue.id\").last(\"1h\") >= 1",
5+
"message": "some message",
6+
"tags": ["test:{{ unique_lower_alnum }}", "env:ci"],
7+
"priority": 3,
8+
"options": { "thresholds": { "critical": 1 } }
9+
}

features/v1/monitors.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ Feature: Monitors
5959
When the request is sent
6060
Then the response status is 200 OK
6161

62+
@team:DataDog/monitor-app
63+
Scenario: Create an Error Tracking monitor returns "OK" response
64+
Given new "CreateMonitor" request
65+
And body from file "monitor_error_tracking_alert_payload.json"
66+
When the request is sent
67+
Then the response status is 200 OK
68+
6269
@generated @skip @team:DataDog/monitor-app
6370
Scenario: Delete a monitor returns "Bad Request" response
6471
Given new "DeleteMonitor" request

lib/datadog_api_client/v1/api/monitors_api.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def check_can_delete_monitor_with_http_info(monitor_ids, opts = {})
123123
# - watchdog: `event alert`
124124
# - event-v2: `event-v2 alert`
125125
# - audit: `audit alert`
126+
# - error-tracking: `error-tracking alert`
126127
#
127128
# #### Query Types
128129
#
@@ -257,6 +258,18 @@ def check_can_delete_monitor_with_http_info(monitor_ids, opts = {})
257258
# - **`#`** an integer or decimal number used to set the threshold.
258259
#
259260
# **NOTE** Only available in closed beta on US1, EU, US3 and US5.
261+
#
262+
# **Error Tracking Alert Query**
263+
#
264+
# Example(RUM): `error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window) operator #`
265+
# Example(APM Traces): `error-tracking-traces(query).rollup(rollup_method[, measure]).last(time_window) operator #`
266+
#
267+
# - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
268+
# - **`rollup_method`** The stats roll-up method - supports `count`, `avg`, and `cardinality`.
269+
# - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
270+
# - **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
271+
# - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
272+
# - **`#`** an integer or decimal number used to set the threshold.
260273
# @param body [Monitor] Create a monitor request body.
261274
# @param opts [Hash] the optional parameters
262275
# @return [Monitor]
@@ -291,6 +304,7 @@ def create_monitor(body, opts = {})
291304
# - watchdog: `event alert`
292305
# - event-v2: `event-v2 alert`
293306
# - audit: `audit alert`
307+
# - error-tracking: `error-tracking alert`
294308
#
295309
# #### Query Types
296310
#
@@ -425,6 +439,18 @@ def create_monitor(body, opts = {})
425439
# - **`#`** an integer or decimal number used to set the threshold.
426440
#
427441
# **NOTE** Only available in closed beta on US1, EU, US3 and US5.
442+
#
443+
# **Error Tracking Alert Query**
444+
#
445+
# Example(RUM): `error-tracking-rum(query).rollup(rollup_method[, measure]).last(time_window) operator #`
446+
# Example(APM Traces): `error-tracking-traces(query).rollup(rollup_method[, measure]).last(time_window) operator #`
447+
#
448+
# - **`query`** The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
449+
# - **`rollup_method`** The stats roll-up method - supports `count`, `avg`, and `cardinality`.
450+
# - **`measure`** For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
451+
# - **`time_window`** #m (between 1 and 2880), #h (between 1 and 48).
452+
# - **`operator`** `<`, `<=`, `>`, `>=`, `==`, or `!=`.
453+
# - **`#`** an integer or decimal number used to set the threshold.
428454
# @param body [Monitor] Create a monitor request body.
429455
# @param opts [Hash] the optional parameters
430456
# @return [Array<(Monitor, Integer, Hash)>] Monitor data, response status code and response headers

lib/datadog_api_client/v1/models/monitor_type.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ class MonitorType
3535
EVENT_V2_ALERT = "event-v2 alert".freeze
3636
AUDIT_ALERT = "audit alert".freeze
3737
CI_PIPELINES_ALERT = "ci-pipelines alert".freeze
38+
ERROR_TRACKING_ALERT = "error-tracking alert".freeze
3839
end
3940
end

0 commit comments

Comments
 (0)