Skip to content

Commit 1211edb

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit caa6557 of spec repo
1 parent e1506c2 commit 1211edb

File tree

4 files changed

+123
-9
lines changed

4 files changed

+123
-9
lines changed

content/en/api/v1/service-level-objectives/examples.json

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"type": "metric",
3+
"description": "Metric SLO using sli_specification",
4+
"name": "Example-Service-Level-Objective",
5+
"sli_specification": {
6+
"count": {
7+
"good_events_formula": {
8+
"formula": "query1 - query2"
9+
},
10+
"total_events_formula": {
11+
"formula": "query1"
12+
},
13+
"queries": [
14+
{
15+
"data_source": "metrics",
16+
"name": "query1",
17+
"query": "sum:httpservice.hits{*}.as_count()"
18+
},
19+
{
20+
"data_source": "metrics",
21+
"name": "query2",
22+
"query": "sum:httpservice.errors{*}.as_count()"
23+
}
24+
]
25+
}
26+
},
27+
"tags": [
28+
"env:prod",
29+
"type:count"
30+
],
31+
"thresholds": [
32+
{
33+
"target": 99.0,
34+
"target_display": "99.0",
35+
"timeframe": "7d",
36+
"warning": 99.5,
37+
"warning_display": "99.5"
38+
}
39+
],
40+
"timeframe": "7d",
41+
"target_threshold": 99.0,
42+
"warning_threshold": 99.5
43+
}

data/api/v1/CodeExamples.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,11 @@
853853
}
854854
],
855855
"CreateSLO": [
856+
{
857+
"group": "service_level_objectives",
858+
"suffix": "_512760759",
859+
"description": "Create a new metric SLO object using sli_specification returns \"OK\" response"
860+
},
856861
{
857862
"group": "service_level_objectives",
858863
"suffix": "_3765703239",

data/api/v1/full_spec.yaml

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11641,6 +11641,61 @@ components:
1164111641
example: UTC
1164211642
type: string
1164311643
type: object
11644+
SLOCountDefinition:
11645+
description: 'A count-based (metric) SLI specification, composed of three parts:
11646+
the good events formula, the total events formula,
11647+
11648+
and the underlying queries. Usage is not permitted when request payload contains
11649+
`query` field.'
11650+
example:
11651+
good_events_formula: query1 - query2
11652+
queries:
11653+
- data_source: metrics
11654+
name: query1
11655+
query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11656+
- data_source: metrics
11657+
name: query2
11658+
query: sum:trace.servlet.request.errors{*} by {env}.as_count()
11659+
total_events_formula: query1
11660+
properties:
11661+
good_events_formula:
11662+
$ref: '#/components/schemas/SLOFormula'
11663+
queries:
11664+
example:
11665+
- data_source: metrics
11666+
name: query1
11667+
query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11668+
items:
11669+
$ref: '#/components/schemas/SLODataSourceQueryDefinition'
11670+
minItems: 1
11671+
type: array
11672+
total_events_formula:
11673+
$ref: '#/components/schemas/SLOFormula'
11674+
required:
11675+
- good_events_formula
11676+
- total_events_formula
11677+
- queries
11678+
type: object
11679+
SLOCountSpec:
11680+
additionalProperties: false
11681+
description: A metric SLI specification.
11682+
example:
11683+
count:
11684+
good_events_formula: query1 - query2
11685+
queries:
11686+
- data_source: metrics
11687+
name: query1
11688+
query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11689+
- data_source: metrics
11690+
name: query2
11691+
query: sum:trace.servlet.request.errors{*} by {env}.as_count()
11692+
total_events_formula: query1
11693+
properties:
11694+
count:
11695+
$ref: '#/components/schemas/SLOCountDefinition'
11696+
required:
11697+
- count
11698+
type: object
1164411699
SLOCreator:
1164511700
description: The creator of the SLO
1164611701
nullable: true
@@ -12488,8 +12543,16 @@ components:
1248812543
type: string
1248912544
query:
1249012545
$ref: '#/components/schemas/ServiceLevelObjectiveQuery'
12546+
description: 'The metric query of good / total events. This is not allowed
12547+
if the `sli_specification` field
12548+
12549+
is used in the same request.'
1249112550
sli_specification:
1249212551
$ref: '#/components/schemas/SLOSliSpec'
12552+
description: 'A generic SLI specification. This is currently used for time-slice
12553+
and count-based (metric) SLOs only.
12554+
12555+
This is not allowed if the `query` field is used in the same request.'
1249312556
tags:
1249412557
description: 'A list of tags associated with this service level objective.
1249512558

@@ -12546,9 +12609,10 @@ components:
1254612609
type: object
1254712610
SLOSliSpec:
1254812611
description: A generic SLI specification. This is currently used for time-slice
12549-
SLOs only.
12612+
and count-based (metric) SLOs only.
1255012613
oneOf:
1255112614
- $ref: '#/components/schemas/SLOTimeSliceSpec'
12615+
- $ref: '#/components/schemas/SLOCountSpec'
1255212616
SLOState:
1255312617
description: State of the SLO.
1255412618
enum:
@@ -13731,13 +13795,15 @@ components:
1373113795
- type
1373213796
type: object
1373313797
ServiceLevelObjectiveQuery:
13734-
description: 'A metric-based SLO. **Required if type is `metric`**. Note that
13798+
description: 'A count-based (metric) SLO query. This field has been superseded
13799+
by `sli_specification` but is retained for backwards compatibility. Note that
1373513800
Datadog only allows the sum by aggregator
1373613801

1373713802
to be used because this will sum up all request counts instead of averaging
1373813803
them, or taking the max or
1373913804

13740-
min of all of those requests.'
13805+
min of all of those requests. Usage is not permitted when request payload
13806+
contains `sli_specification` field.'
1374113807
properties:
1374213808
denominator:
1374313809
description: A Datadog metric query for total (valid) events.

0 commit comments

Comments
 (0)