@@ -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