@@ -11900,6 +11900,61 @@ components:
1190011900 example: UTC
1190111901 type: string
1190211902 type: object
11903+ SLOCountDefinition:
11904+ description: 'A count-based (metric) SLI specification, composed of three parts:
11905+ the good events formula, the total events formula,
11906+
11907+ and the underlying queries. Usage is not permitted when request payload contains
11908+ `query` field.'
11909+ example:
11910+ good_events_formula: query1 - query2
11911+ queries:
11912+ - data_source: metrics
11913+ name: query1
11914+ query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11915+ - data_source: metrics
11916+ name: query2
11917+ query: sum:trace.servlet.request.errors{*} by {env}.as_count()
11918+ total_events_formula: query1
11919+ properties:
11920+ good_events_formula:
11921+ $ref: '#/components/schemas/SLOFormula'
11922+ queries:
11923+ example:
11924+ - data_source: metrics
11925+ name: query1
11926+ query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11927+ items:
11928+ $ref: '#/components/schemas/SLODataSourceQueryDefinition'
11929+ minItems: 1
11930+ type: array
11931+ total_events_formula:
11932+ $ref: '#/components/schemas/SLOFormula'
11933+ required:
11934+ - good_events_formula
11935+ - total_events_formula
11936+ - queries
11937+ type: object
11938+ SLOCountSpec:
11939+ additionalProperties: false
11940+ description: A metric SLI specification.
11941+ example:
11942+ count:
11943+ good_events_formula: query1 - query2
11944+ queries:
11945+ - data_source: metrics
11946+ name: query1
11947+ query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11948+ - data_source: metrics
11949+ name: query2
11950+ query: sum:trace.servlet.request.errors{*} by {env}.as_count()
11951+ total_events_formula: query1
11952+ properties:
11953+ count:
11954+ $ref: '#/components/schemas/SLOCountDefinition'
11955+ required:
11956+ - count
11957+ type: object
1190311958 SLOCreator:
1190411959 description: The creator of the SLO
1190511960 nullable: true
@@ -12747,8 +12802,16 @@ components:
1274712802 type: string
1274812803 query:
1274912804 $ref: '#/components/schemas/ServiceLevelObjectiveQuery'
12805+ description: 'The metric query of good / total events. This is not allowed
12806+ if the `sli_specification` field
12807+
12808+ is used in the same request.'
1275012809 sli_specification:
1275112810 $ref: '#/components/schemas/SLOSliSpec'
12811+ description: 'A generic SLI specification. This is currently used for time-slice
12812+ and count-based (metric) SLOs only.
12813+
12814+ This is not allowed if the `query` field is used in the same request.'
1275212815 tags:
1275312816 description: 'A list of tags associated with this service level objective.
1275412817
@@ -12805,9 +12868,10 @@ components:
1280512868 type: object
1280612869 SLOSliSpec:
1280712870 description: A generic SLI specification. This is currently used for time-slice
12808- SLOs only.
12871+ and count-based (metric) SLOs only.
1280912872 oneOf:
1281012873 - $ref: '#/components/schemas/SLOTimeSliceSpec'
12874+ - $ref: '#/components/schemas/SLOCountSpec'
1281112875 SLOState:
1281212876 description: State of the SLO.
1281312877 enum:
@@ -13959,13 +14023,15 @@ components:
1395914023 - type
1396014024 type: object
1396114025 ServiceLevelObjectiveQuery:
13962- description: 'A metric-based SLO. **Required if type is `metric`**. Note that
14026+ description: 'A count-based (metric) SLO query. This field has been superseded
14027+ by `sli_specification` but is retained for backwards compatibility. Note that
1396314028 Datadog only allows the sum by aggregator
1396414029
1396514030 to be used because this will sum up all request counts instead of averaging
1396614031 them, or taking the max or
1396714032
13968- min of all of those requests.'
14033+ min of all of those requests. Usage is not permitted when request payload
14034+ contains `sli_specification` field.'
1396914035 properties:
1397014036 denominator:
1397114037 description: A Datadog metric query for total (valid) events.
0 commit comments