@@ -11548,6 +11548,61 @@ components:
1154811548 example: UTC
1154911549 type: string
1155011550 type: object
11551+ SLOCountDefinition:
11552+ description: 'A count-based (metric) SLI specification, composed of three parts:
11553+ the good events formula, the total events formula,
11554+
11555+ and the underlying queries. Usage is not permitted when request payload contains
11556+ `query` field.'
11557+ example:
11558+ good_events_formula: query1 - query2
11559+ queries:
11560+ - data_source: metrics
11561+ name: query1
11562+ query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11563+ - data_source: metrics
11564+ name: query2
11565+ query: sum:trace.servlet.request.errors{*} by {env}.as_count()
11566+ total_events_formula: query1
11567+ properties:
11568+ good_events_formula:
11569+ $ref: '#/components/schemas/SLOFormula'
11570+ queries:
11571+ example:
11572+ - data_source: metrics
11573+ name: query1
11574+ query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11575+ items:
11576+ $ref: '#/components/schemas/SLODataSourceQueryDefinition'
11577+ minItems: 1
11578+ type: array
11579+ total_events_formula:
11580+ $ref: '#/components/schemas/SLOFormula'
11581+ required:
11582+ - good_events_formula
11583+ - total_events_formula
11584+ - queries
11585+ type: object
11586+ SLOCountSpec:
11587+ additionalProperties: false
11588+ description: A metric SLI specification.
11589+ example:
11590+ count:
11591+ good_events_formula: query1 - query2
11592+ queries:
11593+ - data_source: metrics
11594+ name: query1
11595+ query: sum:trace.servlet.request.hits{*} by {env}.as_count()
11596+ - data_source: metrics
11597+ name: query2
11598+ query: sum:trace.servlet.request.errors{*} by {env}.as_count()
11599+ total_events_formula: query1
11600+ properties:
11601+ count:
11602+ $ref: '#/components/schemas/SLOCountDefinition'
11603+ required:
11604+ - count
11605+ type: object
1155111606 SLOCreator:
1155211607 description: The creator of the SLO
1155311608 nullable: true
@@ -12395,8 +12450,16 @@ components:
1239512450 type: string
1239612451 query:
1239712452 $ref: '#/components/schemas/ServiceLevelObjectiveQuery'
12453+ description: 'The metric query of good / total events. This is not allowed
12454+ if the `sli_specification` field
12455+
12456+ is used in the same request.'
1239812457 sli_specification:
1239912458 $ref: '#/components/schemas/SLOSliSpec'
12459+ description: 'A generic SLI specification. This is currently used for time-slice
12460+ and count-based (metric) SLOs only.
12461+
12462+ This is not allowed if the `query` field is used in the same request.'
1240012463 tags:
1240112464 description: 'A list of tags associated with this service level objective.
1240212465
@@ -12453,9 +12516,10 @@ components:
1245312516 type: object
1245412517 SLOSliSpec:
1245512518 description: A generic SLI specification. This is currently used for time-slice
12456- SLOs only.
12519+ and count-based (metric) SLOs only.
1245712520 oneOf:
1245812521 - $ref: '#/components/schemas/SLOTimeSliceSpec'
12522+ - $ref: '#/components/schemas/SLOCountSpec'
1245912523 SLOState:
1246012524 description: State of the SLO.
1246112525 enum:
@@ -13607,13 +13671,15 @@ components:
1360713671 - type
1360813672 type: object
1360913673 ServiceLevelObjectiveQuery:
13610- description: 'A metric-based SLO. **Required if type is `metric`**. Note that
13674+ description: 'A count-based (metric) SLO query. This field has been superseded
13675+ by `sli_specification` but is retained for backwards compatibility. Note that
1361113676 Datadog only allows the sum by aggregator
1361213677
1361313678 to be used because this will sum up all request counts instead of averaging
1361413679 them, or taking the max or
1361513680
13616- min of all of those requests.'
13681+ min of all of those requests. Usage is not permitted when request payload
13682+ contains `sli_specification` field.'
1361713683 properties:
1361813684 denominator:
1361913685 description: A Datadog metric query for total (valid) events.
0 commit comments