diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ad75118bfde..f0d1837b695 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17457,20 +17457,20 @@ components: - finished_at type: object DORADeploymentPatchRemediation: - description: Remediation details for the deployment. + description: Remediation details for the deployment. Optional, but required + to calculate failed deployment recovery time. properties: id: - description: The ID of the remediation action. + description: The ID of the remediation deployment. Required when the failed + deployment must be linked to a remediation deployment. example: eG42zNIkVjM type: string type: $ref: '#/components/schemas/DORADeploymentPatchRemediationType' - required: - - id - - type type: object DORADeploymentPatchRemediationType: - description: The type of remediation action taken. + description: The type of remediation action taken. Required when the failed + deployment must be linked to a remediation deployment. enum: - rollback - rollforward @@ -17674,13 +17674,13 @@ components: type: array type: object DORAFailureFetchResponse: - description: Response for fetching a single failure event. + description: Response for fetching a single incident event. properties: data: $ref: '#/components/schemas/DORAIncidentObject' type: object DORAFailureRequest: - description: Request to create a DORA failure event. + description: Request to create a DORA incident event. properties: data: $ref: '#/components/schemas/DORAFailureRequestData' @@ -17688,16 +17688,16 @@ components: - data type: object DORAFailureRequestAttributes: - description: Attributes to create a DORA failure event. + description: Attributes to create a DORA incident event. properties: custom_tags: $ref: '#/components/schemas/DORACustomTags' env: - description: Environment name that was impacted by the failure. + description: Environment name that was impacted by the incident. example: staging type: string finished_at: - description: Unix timestamp when the failure finished. It must be in nanoseconds, + description: Unix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds. example: 1693491984000000000 format: int64 @@ -17705,16 +17705,16 @@ components: git: $ref: '#/components/schemas/DORAGitInfo' id: - description: Failure ID. Must be 16-128 characters and contain only alphanumeric + description: Incident ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :). type: string name: - description: Failure name. + description: Incident name. example: Webserver is down failing all requests. type: string services: - description: Service names impacted by the failure. If possible, use names + description: Service names impacted by the incident. If possible, use names registered in the Service Catalog. Required when the team field is not provided. example: @@ -17723,11 +17723,11 @@ components: type: string type: array severity: - description: Failure severity. + description: Incident severity. example: High type: string started_at: - description: Unix timestamp when the failure started. It must be in nanoseconds, + description: Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds. example: 1693491974000000000 format: int64 @@ -17754,7 +17754,7 @@ components: - attributes type: object DORAFailureResponse: - description: Response after receiving a DORA failure event. + description: Response after receiving a DORA incident event. properties: data: $ref: '#/components/schemas/DORAFailureResponseData' @@ -17762,10 +17762,10 @@ components: - data type: object DORAFailureResponseData: - description: Response after receiving a DORA failure event. + description: Response after receiving a DORA incident event. properties: id: - description: The ID of the received DORA failure event. + description: The ID of the received DORA incident event. example: 4242fcdd31586083 type: string type: @@ -17775,7 +17775,7 @@ components: type: object DORAFailureType: default: dora_failure - description: JSON:API type for DORA failure events. + description: JSON:API type for DORA incident events. enum: - dora_failure example: dora_failure @@ -17783,7 +17783,7 @@ components: x-enum-varnames: - DORA_FAILURE DORAFailuresListResponse: - description: Response for the list failures endpoint. + description: Response for the list incidents endpoint. example: data: - attributes: @@ -17917,7 +17917,7 @@ components: from: '2025-01-01T00:00:00Z' limit: 100 query: service:(shopist OR api-service) env:production team:backend - sort: -started_at + sort: -finished_at to: '2025-01-31T23:59:59Z' type: dora_deployments_list_request properties: @@ -17948,7 +17948,7 @@ components: type: string sort: description: Sort order (prefixed with `-` for descending). - example: -started_at + example: -finished_at type: string to: description: Maximum timestamp for requested events. @@ -17984,7 +17984,7 @@ components: x-enum-varnames: - DORA_DEPLOYMENTS_LIST_REQUEST DORAListFailuresRequest: - description: Request to get a list of failures. + description: Request to get a list of incidents. example: data: attributes: @@ -18001,7 +18001,7 @@ components: - data type: object DORAListFailuresRequestAttributes: - description: Attributes to get a list of failures. + description: Attributes to get a list of incidents. properties: from: description: Minimum timestamp for requested events. @@ -77043,7 +77043,9 @@ paths: - Change Lead Time - - Change Failure Rate' + - Change Failure Rate + + - Failed Deployment Recovery Time' operationId: CreateDORADeployment requestBody: content: @@ -77192,7 +77194,9 @@ paths: permissions: - dora_metrics_read patch: - description: Use this API endpoint to patch a deployment event. + description: 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. operationId: PatchDORADeployment parameters: - description: The ID of the deployment event. @@ -77233,14 +77237,14 @@ paths: - dora_metrics_write /api/v2/dora/failure: post: - description: 'Use this API endpoint to provide failure data. + description: 'Use this API endpoint to provide incident data for DORA Metrics. + 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. - This is necessary for: - - - Change Failure Rate - - - Time to Restore' + Tracking incidents gives a side-by-side view of how failed deployments translate + into real-world incidents, including their severity and frequency.' operationId: CreateDORAFailure requestBody: content: @@ -77273,16 +77277,16 @@ paths: $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] - summary: Send a failure event + summary: Send an incident event tags: - DORA Metrics x-codegen-request-body-name: body /api/v2/dora/failure/{failure_id}: delete: - description: Use this API endpoint to delete a failure event. + description: Use this API endpoint to delete an incident event. operationId: DeleteDORAFailure parameters: - - description: The ID of the failure event to delete. + - description: The ID of the incident event to delete. in: path name: failure_id required: true @@ -77304,7 +77308,7 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Delete a failure event + summary: Delete an incident event tags: - DORA Metrics x-permission: @@ -77313,7 +77317,7 @@ paths: - dora_metrics_write /api/v2/dora/failures: post: - description: Use this API endpoint to get a list of failure events. + description: Use this API endpoint to get a list of incident events. operationId: ListDORAFailures requestBody: content: @@ -77341,7 +77345,7 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get a list of failure events + summary: Get a list of incident events tags: - DORA Metrics x-codegen-request-body-name: body @@ -77351,10 +77355,10 @@ paths: - dora_metrics_read /api/v2/dora/failures/{failure_id}: get: - description: Use this API endpoint to get a failure event. + description: Use this API endpoint to get an incident event. operationId: GetDORAFailure parameters: - - description: The ID of the failure event. + - description: The ID of the incident event. in: path name: failure_id required: true @@ -77380,7 +77384,7 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Get a failure event + summary: Get an incident event tags: - DORA Metrics x-codegen-request-body-name: body @@ -77395,14 +77399,10 @@ paths: instead. - Use this API endpoint to provide failure data. - + Use this API endpoint to provide incident data. - This is necessary for: - - - Change Failure Rate - - - Time to Restore' + Tracking incidents gives a side-by-side view of how failed deployments translate + into real-world incidents.' operationId: CreateDORAIncident requestBody: content: @@ -77435,7 +77435,7 @@ paths: $ref: '#/components/responses/TooManyRequestsResponse' security: - apiKeyAuth: [] - summary: Send an incident event + summary: Send an incident event (legacy) tags: - DORA Metrics x-codegen-request-body-name: body diff --git a/examples/v2/dora-metrics/CreateDORAFailure.rb b/examples/v2/dora-metrics/CreateDORAFailure.rb index ca44d78a290..e35e6e8f7cd 100644 --- a/examples/v2/dora-metrics/CreateDORAFailure.rb +++ b/examples/v2/dora-metrics/CreateDORAFailure.rb @@ -1,4 +1,4 @@ -# Send a failure event returns "OK - but delayed due to incident" response +# Send an incident event returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new diff --git a/examples/v2/dora-metrics/CreateDORAIncident.rb b/examples/v2/dora-metrics/CreateDORAIncident.rb index 9842c3d18ac..4da8b65bc27 100644 --- a/examples/v2/dora-metrics/CreateDORAIncident.rb +++ b/examples/v2/dora-metrics/CreateDORAIncident.rb @@ -1,4 +1,4 @@ -# Send an incident event returns "OK" response +# Send an incident event (legacy) returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new diff --git a/examples/v2/dora-metrics/DeleteDORAFailure.rb b/examples/v2/dora-metrics/DeleteDORAFailure.rb index 17c01411d4a..ea3d72bc598 100644 --- a/examples/v2/dora-metrics/DeleteDORAFailure.rb +++ b/examples/v2/dora-metrics/DeleteDORAFailure.rb @@ -1,5 +1,5 @@ -# Delete a failure event returns "Accepted" response +# Delete an incident event returns "Accepted" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new -p api_instance.delete_dora_failure("NO_VALUE") +p api_instance.delete_dora_failure("failure_id") diff --git a/examples/v2/dora-metrics/DeleteDORAFailure_3462074974.rb b/examples/v2/dora-metrics/DeleteDORAFailure_3462074974.rb new file mode 100644 index 00000000000..17c01411d4a --- /dev/null +++ b/examples/v2/dora-metrics/DeleteDORAFailure_3462074974.rb @@ -0,0 +1,5 @@ +# Delete a failure event returns "Accepted" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new +p api_instance.delete_dora_failure("NO_VALUE") diff --git a/examples/v2/dora-metrics/GetDORAFailure.rb b/examples/v2/dora-metrics/GetDORAFailure.rb index 100ef470c0a..5cb592708b3 100644 --- a/examples/v2/dora-metrics/GetDORAFailure.rb +++ b/examples/v2/dora-metrics/GetDORAFailure.rb @@ -1,4 +1,4 @@ -# Get a failure event returns "OK" response +# Get an incident event returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new diff --git a/examples/v2/dora-metrics/ListDORAFailures.rb b/examples/v2/dora-metrics/ListDORAFailures.rb index e3c9c276f9c..53e15021665 100644 --- a/examples/v2/dora-metrics/ListDORAFailures.rb +++ b/examples/v2/dora-metrics/ListDORAFailures.rb @@ -1,4 +1,4 @@ -# Get a list of failure events returns "OK" response +# Get a list of incident events returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new @@ -6,9 +6,11 @@ body = DatadogAPIClient::V2::DORAListFailuresRequest.new({ data: DatadogAPIClient::V2::DORAListFailuresRequestData.new({ attributes: DatadogAPIClient::V2::DORAListFailuresRequestAttributes.new({ - from: "2025-03-23T00:00:00Z", - limit: 1, - to: "2025-03-24T00:00:00Z", + from: "2025-01-01T00:00:00Z", + limit: 100, + query: "severity:(SEV-1 OR SEV-2) env:production team:backend", + sort: "-started_at", + to: "2025-01-31T23:59:59Z", }), type: DatadogAPIClient::V2::DORAListFailuresRequestDataType::DORA_FAILURES_LIST_REQUEST, }), diff --git a/examples/v2/dora-metrics/ListDORAFailures_3269988848.rb b/examples/v2/dora-metrics/ListDORAFailures_3269988848.rb new file mode 100644 index 00000000000..e3c9c276f9c --- /dev/null +++ b/examples/v2/dora-metrics/ListDORAFailures_3269988848.rb @@ -0,0 +1,16 @@ +# Get a list of failure events returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new + +body = DatadogAPIClient::V2::DORAListFailuresRequest.new({ + data: DatadogAPIClient::V2::DORAListFailuresRequestData.new({ + attributes: DatadogAPIClient::V2::DORAListFailuresRequestAttributes.new({ + from: "2025-03-23T00:00:00Z", + limit: 1, + to: "2025-03-24T00:00:00Z", + }), + type: DatadogAPIClient::V2::DORAListFailuresRequestDataType::DORA_FAILURES_LIST_REQUEST, + }), +}) +p api_instance.list_dora_failures(body) diff --git a/features/v2/dora_metrics.feature b/features/v2/dora_metrics.feature index 7a3275b54bf..768442f37f5 100644 --- a/features/v2/dora_metrics.feature +++ b/features/v2/dora_metrics.feature @@ -41,34 +41,34 @@ Feature: DORA Metrics Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend - Scenario: Get a deployment event returns "Bad Request" response + Scenario: Delete an incident event returns "Accepted" response Given a valid "appKeyAuth" key in the system - And new "GetDORADeployment" request - And request contains "deployment_id" parameter from "REPLACE.ME" + And new "DeleteDORAFailure" request + And request contains "failure_id" parameter from "REPLACE.ME" When the request is sent - Then the response status is 400 Bad Request + Then the response status is 202 Accepted @generated @skip @team:DataDog/ci-app-backend - Scenario: Get a deployment event returns "OK" response + Scenario: Delete an incident event returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And new "GetDORADeployment" request - And request contains "deployment_id" parameter from "REPLACE.ME" + And new "DeleteDORAFailure" request + And request contains "failure_id" parameter from "REPLACE.ME" When the request is sent - Then the response status is 200 OK + Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend - Scenario: Get a failure event returns "Bad Request" response + Scenario: Get a deployment event returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And new "GetDORAFailure" request - And request contains "failure_id" parameter from "REPLACE.ME" + And new "GetDORADeployment" request + And request contains "deployment_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend - Scenario: Get a failure event returns "OK" response + Scenario: Get a deployment event returns "OK" response Given a valid "appKeyAuth" key in the system - And new "GetDORAFailure" request - And request contains "failure_id" parameter from "REPLACE.ME" + And new "GetDORADeployment" request + And request contains "deployment_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK @@ -104,6 +104,38 @@ Feature: DORA Metrics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get a list of incident events returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "ListDORAFailures" request + And body with value {"data": {"attributes": {"from": "2025-01-01T00:00:00Z", "limit": 100, "query": "severity:(SEV-1 OR SEV-2) env:production team:backend", "sort": "-started_at", "to": "2025-01-31T23:59:59Z"}, "type": "dora_failures_list_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get a list of incident events returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "ListDORAFailures" request + And body with value {"data": {"attributes": {"from": "2025-01-01T00:00:00Z", "limit": 100, "query": "severity:(SEV-1 OR SEV-2) env:production team:backend", "sort": "-started_at", "to": "2025-01-31T23:59:59Z"}, "type": "dora_failures_list_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get an incident event returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "GetDORAFailure" request + And request contains "failure_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Get an incident event returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "GetDORAFailure" request + And request contains "failure_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend Scenario: Patch a deployment event returns "Accepted" response Given a valid "appKeyAuth" key in the system @@ -150,37 +182,51 @@ Feature: DORA Metrics When the request is sent Then the response status is 400 Bad Request + @replay-only @team:DataDog/ci-app-backend + Scenario: Send a failure event returns "OK" response + Given new "CreateDORAIncident" request + And body with value {"data": {"attributes": {"finished_at": 1707842944600000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "services": ["shopist"], "severity": "High", "started_at": 1707842944500000000, "team": "backend", "version": "v1.12.07"}}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ci-app-backend - Scenario: Send a failure event returns "OK - but delayed due to incident" response - Given new "CreateDORAFailure" request + Scenario: Send an incident event (legacy) returns "Bad Request" response + Given new "CreateDORAIncident" request + And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ci-app-backend + Scenario: Send an incident event (legacy) returns "OK - but delayed due to incident" response + Given new "CreateDORAIncident" request And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 202 OK - but delayed due to incident - @replay-only @team:DataDog/ci-app-backend - Scenario: Send a failure event returns "OK" response + @generated @skip @team:DataDog/ci-app-backend + Scenario: Send an incident event (legacy) returns "OK" response Given new "CreateDORAIncident" request - And body with value {"data": {"attributes": {"finished_at": 1707842944600000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests", "services": ["shopist"], "severity": "High", "started_at": 1707842944500000000, "team": "backend", "version": "v1.12.07"}}} + And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/ci-app-backend Scenario: Send an incident event returns "Bad Request" response - Given new "CreateDORAIncident" request + Given new "CreateDORAFailure" request And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/ci-app-backend Scenario: Send an incident event returns "OK - but delayed due to incident" response - Given new "CreateDORAIncident" request + Given new "CreateDORAFailure" request And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 202 OK - but delayed due to incident @generated @skip @team:DataDog/ci-app-backend Scenario: Send an incident event returns "OK" response - Given new "CreateDORAIncident" request + Given new "CreateDORAFailure" request And body with value {"data": {"attributes": {"custom_tags": ["language:java", "department:engineering"], "env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "name": "Webserver is down failing all requests.", "services": ["shopist"], "severity": "High", "started_at": 1693491974000000000, "team": "backend", "version": "v1.12.07"}}} When the request is sent Then the response status is 200 OK diff --git a/lib/datadog_api_client/v2/api/dora_metrics_api.rb b/lib/datadog_api_client/v2/api/dora_metrics_api.rb index efa4afb3422..a247f68f7cb 100644 --- a/lib/datadog_api_client/v2/api/dora_metrics_api.rb +++ b/lib/datadog_api_client/v2/api/dora_metrics_api.rb @@ -39,6 +39,7 @@ def create_dora_deployment(body, opts = {}) # - Deployment Frequency # - Change Lead Time # - Change Failure Rate + # - Failed Deployment Recovery Time # # @param body [DORADeploymentRequest] # @param opts [Hash] the optional parameters @@ -95,7 +96,7 @@ def create_dora_deployment_with_http_info(body, opts = {}) return data, status_code, headers end - # Send a failure event. + # Send an incident event. # # @see #create_dora_failure_with_http_info def create_dora_failure(body, opts = {}) @@ -103,13 +104,11 @@ def create_dora_failure(body, opts = {}) data end - # Send a failure event. - # - # Use this API endpoint to provide failure data. + # Send an incident event. # - # This is necessary for: - # - Change Failure Rate - # - Time to Restore + # Use this API endpoint to provide incident data for DORA Metrics. + # 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. + # Tracking incidents gives a side-by-side view of how failed deployments translate into real-world incidents, including their severity and frequency. # # @param body [DORAFailureRequest] # @param opts [Hash] the optional parameters @@ -166,7 +165,7 @@ def create_dora_failure_with_http_info(body, opts = {}) return data, status_code, headers end - # Send an incident event. + # Send an incident event (legacy). # # @see #create_dora_incident_with_http_info def create_dora_incident(body, opts = {}) @@ -174,15 +173,12 @@ def create_dora_incident(body, opts = {}) data end - # Send an incident event. + # Send an incident event (legacy). # # **Note**: This endpoint is deprecated. Please use `/api/v2/dora/failure` instead. # - # Use this API endpoint to provide failure data. - # - # This is necessary for: - # - Change Failure Rate - # - Time to Restore + # Use this API endpoint to provide incident data. + # Tracking incidents gives a side-by-side view of how failed deployments translate into real-world incidents. # # @deprecated This API is deprecated. # @@ -307,7 +303,7 @@ def delete_dora_deployment_with_http_info(deployment_id, opts = {}) return data, status_code, headers end - # Delete a failure event. + # Delete an incident event. # # @see #delete_dora_failure_with_http_info def delete_dora_failure(failure_id, opts = {}) @@ -315,11 +311,11 @@ def delete_dora_failure(failure_id, opts = {}) nil end - # Delete a failure event. + # Delete an incident event. # - # Use this API endpoint to delete a failure event. + # Use this API endpoint to delete an incident event. # - # @param failure_id [String] The ID of the failure event to delete. + # @param failure_id [String] The ID of the incident event to delete. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_dora_failure_with_http_info(failure_id, opts = {}) @@ -437,7 +433,7 @@ def get_dora_deployment_with_http_info(deployment_id, opts = {}) return data, status_code, headers end - # Get a failure event. + # Get an incident event. # # @see #get_dora_failure_with_http_info def get_dora_failure(failure_id, opts = {}) @@ -445,11 +441,11 @@ def get_dora_failure(failure_id, opts = {}) data end - # Get a failure event. + # Get an incident event. # - # Use this API endpoint to get a failure event. + # Use this API endpoint to get an incident event. # - # @param failure_id [String] The ID of the failure event. + # @param failure_id [String] The ID of the incident event. # @param opts [Hash] the optional parameters # @return [Array<(DORAFailureFetchResponse, Integer, Hash)>] DORAFailureFetchResponse data, response status code and response headers def get_dora_failure_with_http_info(failure_id, opts = {}) @@ -569,7 +565,7 @@ def list_dora_deployments_with_http_info(body, opts = {}) return data, status_code, headers end - # Get a list of failure events. + # Get a list of incident events. # # @see #list_dora_failures_with_http_info def list_dora_failures(body, opts = {}) @@ -577,9 +573,9 @@ def list_dora_failures(body, opts = {}) data end - # Get a list of failure events. + # Get a list of incident events. # - # Use this API endpoint to get a list of failure events. + # Use this API endpoint to get a list of incident events. # # @param body [DORAListFailuresRequest] # @param opts [Hash] the optional parameters @@ -646,7 +642,7 @@ def patch_dora_deployment(deployment_id, body, opts = {}) # Patch a deployment event. # - # Use this API endpoint to patch a deployment event. + # 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. # # @param deployment_id [String] The ID of the deployment event. # @param body [DORADeploymentPatchRequest] diff --git a/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation.rb b/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation.rb index ef2abc4afa0..a1a996e59a7 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation.rb @@ -17,15 +17,15 @@ require 'time' module DatadogAPIClient::V2 - # Remediation details for the deployment. + # Remediation details for the deployment. Optional, but required to calculate failed deployment recovery time. class DORADeploymentPatchRemediation include BaseGenericModel - # The ID of the remediation action. - attr_reader :id + # The ID of the remediation deployment. Required when the failed deployment must be linked to a remediation deployment. + attr_accessor :id - # The type of remediation action taken. - attr_reader :type + # The type of remediation action taken. Required when the failed deployment must be linked to a remediation deployment. + attr_accessor :type attr_accessor :additional_properties @@ -74,35 +74,6 @@ def initialize(attributes = {}) end end - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation_type.rb b/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation_type.rb index ec7f461b863..4155cc98e25 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation_type.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_patch_remediation_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The type of remediation action taken. + # The type of remediation action taken. Required when the failed deployment must be linked to a remediation deployment. class DORADeploymentPatchRemediationType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/dora_deployment_patch_request_attributes.rb b/lib/datadog_api_client/v2/models/dora_deployment_patch_request_attributes.rb index 18489c1aac0..15fd7628fdf 100644 --- a/lib/datadog_api_client/v2/models/dora_deployment_patch_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/dora_deployment_patch_request_attributes.rb @@ -24,7 +24,7 @@ class DORADeploymentPatchRequestAttributes # Indicates whether the deployment resulted in a change failure. attr_accessor :change_failure - # Remediation details for the deployment. + # Remediation details for the deployment. Optional, but required to calculate failed deployment recovery time. attr_accessor :remediation attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/dora_failure_fetch_response.rb b/lib/datadog_api_client/v2/models/dora_failure_fetch_response.rb index 5fb7e9a1693..5433cfd9ac2 100644 --- a/lib/datadog_api_client/v2/models/dora_failure_fetch_response.rb +++ b/lib/datadog_api_client/v2/models/dora_failure_fetch_response.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Response for fetching a single failure event. + # Response for fetching a single incident event. class DORAFailureFetchResponse include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/dora_failure_request.rb b/lib/datadog_api_client/v2/models/dora_failure_request.rb index 2667f039a98..6bfb10f4049 100644 --- a/lib/datadog_api_client/v2/models/dora_failure_request.rb +++ b/lib/datadog_api_client/v2/models/dora_failure_request.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Request to create a DORA failure event. + # Request to create a DORA incident event. class DORAFailureRequest include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb b/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb index 730dc8cc9e6..f910d45c3e3 100644 --- a/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb @@ -17,35 +17,35 @@ require 'time' module DatadogAPIClient::V2 - # Attributes to create a DORA failure event. + # Attributes to create a DORA incident event. class DORAFailureRequestAttributes include BaseGenericModel # A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event. attr_accessor :custom_tags - # Environment name that was impacted by the failure. + # Environment name that was impacted by the incident. attr_accessor :env - # Unix timestamp when the failure finished. It must be in nanoseconds, milliseconds, or seconds. + # Unix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds. attr_accessor :finished_at # Git info for DORA Metrics events. attr_accessor :git - # Failure ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :). + # Incident ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :). attr_accessor :id - # Failure name. + # Incident name. attr_accessor :name - # Service names impacted by the failure. If possible, use names registered in the Service Catalog. Required when the team field is not provided. + # Service names impacted by the incident. If possible, use names registered in the Service Catalog. Required when the team field is not provided. attr_accessor :services - # Failure severity. + # Incident severity. attr_accessor :severity - # Unix timestamp when the failure started. It must be in nanoseconds, milliseconds, or seconds. + # Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds. attr_reader :started_at # Name of the team owning the services impacted. If possible, use team handles registered in Datadog. Required when the services field is not provided. diff --git a/lib/datadog_api_client/v2/models/dora_failure_request_data.rb b/lib/datadog_api_client/v2/models/dora_failure_request_data.rb index cc926ebcb70..5507977846f 100644 --- a/lib/datadog_api_client/v2/models/dora_failure_request_data.rb +++ b/lib/datadog_api_client/v2/models/dora_failure_request_data.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class DORAFailureRequestData include BaseGenericModel - # Attributes to create a DORA failure event. + # Attributes to create a DORA incident event. attr_reader :attributes attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/dora_failure_response.rb b/lib/datadog_api_client/v2/models/dora_failure_response.rb index 7197ce2ed17..9f207dfbefc 100644 --- a/lib/datadog_api_client/v2/models/dora_failure_response.rb +++ b/lib/datadog_api_client/v2/models/dora_failure_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response after receiving a DORA failure event. + # Response after receiving a DORA incident event. class DORAFailureResponse include BaseGenericModel - # Response after receiving a DORA failure event. + # Response after receiving a DORA incident event. attr_reader :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/dora_failure_response_data.rb b/lib/datadog_api_client/v2/models/dora_failure_response_data.rb index e316b42cce8..28bc0bac09b 100644 --- a/lib/datadog_api_client/v2/models/dora_failure_response_data.rb +++ b/lib/datadog_api_client/v2/models/dora_failure_response_data.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Response after receiving a DORA failure event. + # Response after receiving a DORA incident event. class DORAFailureResponseData include BaseGenericModel - # The ID of the received DORA failure event. + # The ID of the received DORA incident event. attr_reader :id - # JSON:API type for DORA failure events. + # JSON:API type for DORA incident events. attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/dora_failure_type.rb b/lib/datadog_api_client/v2/models/dora_failure_type.rb index 7378b2cdfdd..517180bc5d1 100644 --- a/lib/datadog_api_client/v2/models/dora_failure_type.rb +++ b/lib/datadog_api_client/v2/models/dora_failure_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API type for DORA failure events. + # JSON:API type for DORA incident events. class DORAFailureType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/dora_failures_list_response.rb b/lib/datadog_api_client/v2/models/dora_failures_list_response.rb index dba0b4db3ca..452348a324e 100644 --- a/lib/datadog_api_client/v2/models/dora_failures_list_response.rb +++ b/lib/datadog_api_client/v2/models/dora_failures_list_response.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Response for the list failures endpoint. + # Response for the list incidents endpoint. class DORAFailuresListResponse include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/dora_incident_object.rb b/lib/datadog_api_client/v2/models/dora_incident_object.rb index a3ab762d30c..f6956985ae5 100644 --- a/lib/datadog_api_client/v2/models/dora_incident_object.rb +++ b/lib/datadog_api_client/v2/models/dora_incident_object.rb @@ -27,7 +27,7 @@ class DORAIncidentObject # The ID of the incident event. attr_accessor :id - # JSON:API type for DORA failure events. + # JSON:API type for DORA incident events. attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/dora_list_failures_request.rb b/lib/datadog_api_client/v2/models/dora_list_failures_request.rb index bd7799574d3..efbd728a9c0 100644 --- a/lib/datadog_api_client/v2/models/dora_list_failures_request.rb +++ b/lib/datadog_api_client/v2/models/dora_list_failures_request.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Request to get a list of failures. + # Request to get a list of incidents. class DORAListFailuresRequest include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/dora_list_failures_request_attributes.rb b/lib/datadog_api_client/v2/models/dora_list_failures_request_attributes.rb index 14ccd71da40..54619c3246e 100644 --- a/lib/datadog_api_client/v2/models/dora_list_failures_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/dora_list_failures_request_attributes.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Attributes to get a list of failures. + # Attributes to get a list of incidents. class DORAListFailuresRequestAttributes include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/dora_list_failures_request_data.rb b/lib/datadog_api_client/v2/models/dora_list_failures_request_data.rb index 3af6b0c9320..a7d36f8e778 100644 --- a/lib/datadog_api_client/v2/models/dora_list_failures_request_data.rb +++ b/lib/datadog_api_client/v2/models/dora_list_failures_request_data.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class DORAListFailuresRequestData include BaseGenericModel - # Attributes to get a list of failures. + # Attributes to get a list of incidents. attr_reader :attributes # The definition of `DORAListFailuresRequestDataType` object.