Skip to content

Commit afcf2f2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
DORA Metrics - Change failure detection, follow-ups (DataDog#3688)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 8b28a19 commit afcf2f2

26 files changed

Lines changed: 278 additions & 165 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18430,20 +18430,20 @@ components:
1843018430
- finished_at
1843118431
type: object
1843218432
DORADeploymentPatchRemediation:
18433-
description: Remediation details for the deployment.
18433+
description: Remediation details for the deployment. Optional, but required
18434+
to calculate failed deployment recovery time.
1843418435
properties:
1843518436
id:
18436-
description: The ID of the remediation action.
18437+
description: The ID of the remediation deployment. Required when the failed
18438+
deployment must be linked to a remediation deployment.
1843718439
example: eG42zNIkVjM
1843818440
type: string
1843918441
type:
1844018442
$ref: '#/components/schemas/DORADeploymentPatchRemediationType'
18441-
required:
18442-
- id
18443-
- type
1844418443
type: object
1844518444
DORADeploymentPatchRemediationType:
18446-
description: The type of remediation action taken.
18445+
description: The type of remediation action taken. Required when the failed
18446+
deployment must be linked to a remediation deployment.
1844718447
enum:
1844818448
- rollback
1844918449
- rollforward
@@ -18647,47 +18647,47 @@ components:
1864718647
type: array
1864818648
type: object
1864918649
DORAFailureFetchResponse:
18650-
description: Response for fetching a single failure event.
18650+
description: Response for fetching a single incident event.
1865118651
properties:
1865218652
data:
1865318653
$ref: '#/components/schemas/DORAIncidentObject'
1865418654
type: object
1865518655
DORAFailureRequest:
18656-
description: Request to create a DORA failure event.
18656+
description: Request to create a DORA incident event.
1865718657
properties:
1865818658
data:
1865918659
$ref: '#/components/schemas/DORAFailureRequestData'
1866018660
required:
1866118661
- data
1866218662
type: object
1866318663
DORAFailureRequestAttributes:
18664-
description: Attributes to create a DORA failure event.
18664+
description: Attributes to create a DORA incident event.
1866518665
properties:
1866618666
custom_tags:
1866718667
$ref: '#/components/schemas/DORACustomTags'
1866818668
env:
18669-
description: Environment name that was impacted by the failure.
18669+
description: Environment name that was impacted by the incident.
1867018670
example: staging
1867118671
type: string
1867218672
finished_at:
18673-
description: Unix timestamp when the failure finished. It must be in nanoseconds,
18673+
description: Unix timestamp when the incident finished. It must be in nanoseconds,
1867418674
milliseconds, or seconds.
1867518675
example: 1693491984000000000
1867618676
format: int64
1867718677
type: integer
1867818678
git:
1867918679
$ref: '#/components/schemas/DORAGitInfo'
1868018680
id:
18681-
description: Failure ID. Must be 16-128 characters and contain only alphanumeric
18681+
description: Incident ID. Must be 16-128 characters and contain only alphanumeric
1868218682
characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9,
1868318683
-, _, ., :).
1868418684
type: string
1868518685
name:
18686-
description: Failure name.
18686+
description: Incident name.
1868718687
example: Webserver is down failing all requests.
1868818688
type: string
1868918689
services:
18690-
description: Service names impacted by the failure. If possible, use names
18690+
description: Service names impacted by the incident. If possible, use names
1869118691
registered in the Service Catalog. Required when the team field is not
1869218692
provided.
1869318693
example:
@@ -18696,11 +18696,11 @@ components:
1869618696
type: string
1869718697
type: array
1869818698
severity:
18699-
description: Failure severity.
18699+
description: Incident severity.
1870018700
example: High
1870118701
type: string
1870218702
started_at:
18703-
description: Unix timestamp when the failure started. It must be in nanoseconds,
18703+
description: Unix timestamp when the incident started. It must be in nanoseconds,
1870418704
milliseconds, or seconds.
1870518705
example: 1693491974000000000
1870618706
format: int64
@@ -18727,18 +18727,18 @@ components:
1872718727
- attributes
1872818728
type: object
1872918729
DORAFailureResponse:
18730-
description: Response after receiving a DORA failure event.
18730+
description: Response after receiving a DORA incident event.
1873118731
properties:
1873218732
data:
1873318733
$ref: '#/components/schemas/DORAFailureResponseData'
1873418734
required:
1873518735
- data
1873618736
type: object
1873718737
DORAFailureResponseData:
18738-
description: Response after receiving a DORA failure event.
18738+
description: Response after receiving a DORA incident event.
1873918739
properties:
1874018740
id:
18741-
description: The ID of the received DORA failure event.
18741+
description: The ID of the received DORA incident event.
1874218742
example: 4242fcdd31586083
1874318743
type: string
1874418744
type:
@@ -18748,15 +18748,15 @@ components:
1874818748
type: object
1874918749
DORAFailureType:
1875018750
default: dora_failure
18751-
description: JSON:API type for DORA failure events.
18751+
description: JSON:API type for DORA incident events.
1875218752
enum:
1875318753
- dora_failure
1875418754
example: dora_failure
1875518755
type: string
1875618756
x-enum-varnames:
1875718757
- DORA_FAILURE
1875818758
DORAFailuresListResponse:
18759-
description: Response for the list failures endpoint.
18759+
description: Response for the list incidents endpoint.
1876018760
example:
1876118761
data:
1876218762
- attributes:
@@ -18890,7 +18890,7 @@ components:
1889018890
from: '2025-01-01T00:00:00Z'
1889118891
limit: 100
1889218892
query: service:(shopist OR api-service) env:production team:backend
18893-
sort: -started_at
18893+
sort: -finished_at
1889418894
to: '2025-01-31T23:59:59Z'
1889518895
type: dora_deployments_list_request
1889618896
properties:
@@ -18921,7 +18921,7 @@ components:
1892118921
type: string
1892218922
sort:
1892318923
description: Sort order (prefixed with `-` for descending).
18924-
example: -started_at
18924+
example: -finished_at
1892518925
type: string
1892618926
to:
1892718927
description: Maximum timestamp for requested events.
@@ -18957,7 +18957,7 @@ components:
1895718957
x-enum-varnames:
1895818958
- DORA_DEPLOYMENTS_LIST_REQUEST
1895918959
DORAListFailuresRequest:
18960-
description: Request to get a list of failures.
18960+
description: Request to get a list of incidents.
1896118961
example:
1896218962
data:
1896318963
attributes:
@@ -18974,7 +18974,7 @@ components:
1897418974
- data
1897518975
type: object
1897618976
DORAListFailuresRequestAttributes:
18977-
description: Attributes to get a list of failures.
18977+
description: Attributes to get a list of incidents.
1897818978
properties:
1897918979
from:
1898018980
description: Minimum timestamp for requested events.
@@ -79446,7 +79446,9 @@ paths:
7944679446

7944779447
- Change Lead Time
7944879448

79449-
- Change Failure Rate'
79449+
- Change Failure Rate
79450+
79451+
- Failed Deployment Recovery Time'
7945079452
operationId: CreateDORADeployment
7945179453
requestBody:
7945279454
content:
@@ -79595,7 +79597,9 @@ paths:
7959579597
permissions:
7959679598
- dora_metrics_read
7959779599
patch:
79598-
description: Use this API endpoint to patch a deployment event.
79600+
description: Update a deployment's change failure status. Use this to mark a
79601+
deployment as a change failure or back to stable. You can optionally include
79602+
remediation details to enable failed deployment recovery time calculation.
7959979603
operationId: PatchDORADeployment
7960079604
parameters:
7960179605
- description: The ID of the deployment event.
@@ -79636,14 +79640,14 @@ paths:
7963679640
- dora_metrics_write
7963779641
/api/v2/dora/failure:
7963879642
post:
79639-
description: 'Use this API endpoint to provide failure data.
79643+
description: 'Use this API endpoint to provide incident data for DORA Metrics.
7964079644

79645+
Note that change failure rate and failed deployment recovery time are computed
79646+
from change failures detected on deployments, not from incident events sent
79647+
through this endpoint.
7964179648

79642-
This is necessary for:
79643-
79644-
- Change Failure Rate
79645-
79646-
- Time to Restore'
79649+
Tracking incidents gives a side-by-side view of how failed deployments translate
79650+
into real-world incidents, including their severity and frequency.'
7964779651
operationId: CreateDORAFailure
7964879652
requestBody:
7964979653
content:
@@ -79676,16 +79680,16 @@ paths:
7967679680
$ref: '#/components/responses/TooManyRequestsResponse'
7967779681
security:
7967879682
- apiKeyAuth: []
79679-
summary: Send a failure event
79683+
summary: Send an incident event
7968079684
tags:
7968179685
- DORA Metrics
7968279686
x-codegen-request-body-name: body
7968379687
/api/v2/dora/failure/{failure_id}:
7968479688
delete:
79685-
description: Use this API endpoint to delete a failure event.
79689+
description: Use this API endpoint to delete an incident event.
7968679690
operationId: DeleteDORAFailure
7968779691
parameters:
79688-
- description: The ID of the failure event to delete.
79692+
- description: The ID of the incident event to delete.
7968979693
in: path
7969079694
name: failure_id
7969179695
required: true
@@ -79707,7 +79711,7 @@ paths:
7970779711
security:
7970879712
- apiKeyAuth: []
7970979713
appKeyAuth: []
79710-
summary: Delete a failure event
79714+
summary: Delete an incident event
7971179715
tags:
7971279716
- DORA Metrics
7971379717
x-permission:
@@ -79716,7 +79720,7 @@ paths:
7971679720
- dora_metrics_write
7971779721
/api/v2/dora/failures:
7971879722
post:
79719-
description: Use this API endpoint to get a list of failure events.
79723+
description: Use this API endpoint to get a list of incident events.
7972079724
operationId: ListDORAFailures
7972179725
requestBody:
7972279726
content:
@@ -79744,7 +79748,7 @@ paths:
7974479748
security:
7974579749
- apiKeyAuth: []
7974679750
appKeyAuth: []
79747-
summary: Get a list of failure events
79751+
summary: Get a list of incident events
7974879752
tags:
7974979753
- DORA Metrics
7975079754
x-codegen-request-body-name: body
@@ -79754,10 +79758,10 @@ paths:
7975479758
- dora_metrics_read
7975579759
/api/v2/dora/failures/{failure_id}:
7975679760
get:
79757-
description: Use this API endpoint to get a failure event.
79761+
description: Use this API endpoint to get an incident event.
7975879762
operationId: GetDORAFailure
7975979763
parameters:
79760-
- description: The ID of the failure event.
79764+
- description: The ID of the incident event.
7976179765
in: path
7976279766
name: failure_id
7976379767
required: true
@@ -79783,7 +79787,7 @@ paths:
7978379787
security:
7978479788
- apiKeyAuth: []
7978579789
appKeyAuth: []
79786-
summary: Get a failure event
79790+
summary: Get an incident event
7978779791
tags:
7978879792
- DORA Metrics
7978979793
x-codegen-request-body-name: body
@@ -79798,14 +79802,10 @@ paths:
7979879802
instead.
7979979803

7980079804

79801-
Use this API endpoint to provide failure data.
79802-
79805+
Use this API endpoint to provide incident data.
7980379806

79804-
This is necessary for:
79805-
79806-
- Change Failure Rate
79807-
79808-
- Time to Restore'
79807+
Tracking incidents gives a side-by-side view of how failed deployments translate
79808+
into real-world incidents.'
7980979809
operationId: CreateDORAIncident
7981079810
requestBody:
7981179811
content:
@@ -79838,7 +79838,7 @@ paths:
7983879838
$ref: '#/components/responses/TooManyRequestsResponse'
7983979839
security:
7984079840
- apiKeyAuth: []
79841-
summary: Send an incident event
79841+
summary: Send an incident event (legacy)
7984279842
tags:
7984379843
- DORA Metrics
7984479844
x-codegen-request-body-name: body

api/datadogV2/api_dora_metrics.go

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type DORAMetricsApi datadog.Service
2222
// - Deployment Frequency
2323
// - Change Lead Time
2424
// - Change Failure Rate
25+
// - Failed Deployment Recovery Time
2526
func (a *DORAMetricsApi) CreateDORADeployment(ctx _context.Context, body DORADeploymentRequest) (DORADeploymentResponse, *_nethttp.Response, error) {
2627
var (
2728
localVarHTTPMethod = _nethttp.MethodPost
@@ -102,12 +103,10 @@ func (a *DORAMetricsApi) CreateDORADeployment(ctx _context.Context, body DORADep
102103
return localVarReturnValue, localVarHTTPResponse, nil
103104
}
104105

105-
// CreateDORAFailure Send a failure event.
106-
// Use this API endpoint to provide failure data.
107-
//
108-
// This is necessary for:
109-
// - Change Failure Rate
110-
// - Time to Restore
106+
// CreateDORAFailure Send an incident event.
107+
// Use this API endpoint to provide incident data for DORA Metrics.
108+
// Note that change failure rate and failed deployment recovery time are computed from change failures detected on deployments, not from incident events sent through this endpoint.
109+
// Tracking incidents gives a side-by-side view of how failed deployments translate into real-world incidents, including their severity and frequency.
111110
func (a *DORAMetricsApi) CreateDORAFailure(ctx _context.Context, body DORAFailureRequest) (DORAFailureResponse, *_nethttp.Response, error) {
112111
var (
113112
localVarHTTPMethod = _nethttp.MethodPost
@@ -188,14 +187,11 @@ func (a *DORAMetricsApi) CreateDORAFailure(ctx _context.Context, body DORAFailur
188187
return localVarReturnValue, localVarHTTPResponse, nil
189188
}
190189

191-
// CreateDORAIncident Send an incident event.
190+
// CreateDORAIncident Send an incident event (legacy).
192191
// **Note**: This endpoint is deprecated. Please use `/api/v2/dora/failure` instead.
193192
//
194-
// Use this API endpoint to provide failure data.
195-
//
196-
// This is necessary for:
197-
// - Change Failure Rate
198-
// - Time to Restore
193+
// Use this API endpoint to provide incident data.
194+
// Tracking incidents gives a side-by-side view of how failed deployments translate into real-world incidents.
199195
//
200196
// Deprecated: This API is deprecated.
201197
func (a *DORAMetricsApi) CreateDORAIncident(ctx _context.Context, body DORAFailureRequest) (DORAFailureResponse, *_nethttp.Response, error) {
@@ -355,8 +351,8 @@ func (a *DORAMetricsApi) DeleteDORADeployment(ctx _context.Context, deploymentId
355351
return localVarHTTPResponse, nil
356352
}
357353

358-
// DeleteDORAFailure Delete a failure event.
359-
// Use this API endpoint to delete a failure event.
354+
// DeleteDORAFailure Delete an incident event.
355+
// Use this API endpoint to delete an incident event.
360356
func (a *DORAMetricsApi) DeleteDORAFailure(ctx _context.Context, failureId string) (*_nethttp.Response, error) {
361357
var (
362358
localVarHTTPMethod = _nethttp.MethodDelete
@@ -519,8 +515,8 @@ func (a *DORAMetricsApi) GetDORADeployment(ctx _context.Context, deploymentId st
519515
return localVarReturnValue, localVarHTTPResponse, nil
520516
}
521517

522-
// GetDORAFailure Get a failure event.
523-
// Use this API endpoint to get a failure event.
518+
// GetDORAFailure Get an incident event.
519+
// Use this API endpoint to get an incident event.
524520
func (a *DORAMetricsApi) GetDORAFailure(ctx _context.Context, failureId string) (DORAFailureFetchResponse, *_nethttp.Response, error) {
525521
var (
526522
localVarHTTPMethod = _nethttp.MethodGet
@@ -695,8 +691,8 @@ func (a *DORAMetricsApi) ListDORADeployments(ctx _context.Context, body DORAList
695691
return localVarReturnValue, localVarHTTPResponse, nil
696692
}
697693

698-
// ListDORAFailures Get a list of failure events.
699-
// Use this API endpoint to get a list of failure events.
694+
// ListDORAFailures Get a list of incident events.
695+
// Use this API endpoint to get a list of incident events.
700696
func (a *DORAMetricsApi) ListDORAFailures(ctx _context.Context, body DORAListFailuresRequest) (DORAFailuresListResponse, *_nethttp.Response, error) {
701697
var (
702698
localVarHTTPMethod = _nethttp.MethodPost
@@ -785,7 +781,7 @@ func (a *DORAMetricsApi) ListDORAFailures(ctx _context.Context, body DORAListFai
785781
}
786782

787783
// PatchDORADeployment Patch a deployment event.
788-
// Use this API endpoint to patch a deployment event.
784+
// Update a deployment's change failure status. Use this to mark a deployment as a change failure or back to stable. You can optionally include remediation details to enable failed deployment recovery time calculation.
789785
func (a *DORAMetricsApi) PatchDORADeployment(ctx _context.Context, deploymentId string, body DORADeploymentPatchRequest) (*_nethttp.Response, error) {
790786
var (
791787
localVarHTTPMethod = _nethttp.MethodPatch

0 commit comments

Comments
 (0)