이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

DORA Metrics

Send events for DORA Metrics to measure and improve software delivery. See the DORA Metrics page for more information.

Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.

POST https://api.ap1.datadoghq.com/api/v2/dora/deploymenthttps://api.datadoghq.eu/api/v2/dora/deploymenthttps://api.ddog-gov.com/api/v2/dora/deploymenthttps://api.datadoghq.com/api/v2/dora/deploymenthttps://api.us3.datadoghq.com/api/v2/dora/deploymenthttps://api.us5.datadoghq.com/api/v2/dora/deployment

개요

Use this API endpoint to provide data about deployments for DORA metrics.

This is necessary for:

  • Deployment Frequency
  • Change Lead Time
  • Change Failure Rate

요청

Body Data (required)

Expand All

항목

유형

설명

data [required]

object

The JSON:API data.

attributes [required]

object

Attributes to create a DORA deployment event.

env

string

Environment name to where the service was deployed.

finished_at [required]

int64

Unix timestamp when the deployment finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour.

git

object

Git info for DORA Metrics events.

commit_sha [required]

string

Git Commit SHA.

repository_url [required]

string

Git Repository URL

id

string

Deployment ID.

service [required]

string

Service name.

started_at [required]

int64

Unix timestamp when the deployment started. It must be in nanoseconds, milliseconds, or seconds.

team

string

Name of the team owning the deployed service. If not provided, this is automatically populated with the team associated with the service in the Service Catalog.

version

string

Version to correlate with APM Deployment Tracking.

{
  "data": {
    "attributes": {
      "finished_at": 1693491984000000000,
      "git": {
        "commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588",
        "repository_url": "https://github.com/organization/example-repository"
      },
      "service": "shopist",
      "started_at": 1693491974000000000,
      "version": "v1.12.07"
    }
  }
}

응답

OK

Response after receiving a DORA deployment event.

Expand All

항목

유형

설명

data [required]

object

The JSON:API data.

id [required]

string

The ID of the received DORA deployment event.

type

enum

JSON:API type for DORA deployment events. Allowed enum values: dora_deployment

default: dora_deployment

{
  "data": {
    "id": "4242fcdd31586083",
    "type": "dora_deployment"
  }
}

OK - but delayed due to incident

Response after receiving a DORA deployment event.

Expand All

항목

유형

설명

data [required]

object

The JSON:API data.

id [required]

string

The ID of the received DORA deployment event.

type

enum

JSON:API type for DORA deployment events. Allowed enum values: dora_deployment

default: dora_deployment

{
  "data": {
    "id": "4242fcdd31586083",
    "type": "dora_deployment"
  }
}

Bad Request

API error response.

Expand All

항목

유형

설명

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Not Authorized

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

# Send a deployment event for DORA Metrics returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.create_dora_deployment".to_sym] = true
end
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new

body = DatadogAPIClient::V2::DORADeploymentRequest.new({
  data: DatadogAPIClient::V2::DORADeploymentRequestData.new({
    attributes: DatadogAPIClient::V2::DORADeploymentRequestAttributes.new({
      finished_at: 1693491984000000000,
      git: DatadogAPIClient::V2::DORAGitInfo.new({
        commit_sha: "66adc9350f2cc9b250b69abddab733dd55e1a588",
        repository_url: "https://github.com/organization/example-repository",
      }),
      service: "shopist",
      started_at: 1693491974000000000,
      version: "v1.12.07",
    }),
  }),
})
p api_instance.create_dora_deployment(body)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" rb "example.rb"

Note: This endpoint is in public beta. If you have any feedback, contact Datadog support.

POST https://api.ap1.datadoghq.com/api/v2/dora/incidenthttps://api.datadoghq.eu/api/v2/dora/incidenthttps://api.ddog-gov.com/api/v2/dora/incidenthttps://api.datadoghq.com/api/v2/dora/incidenthttps://api.us3.datadoghq.com/api/v2/dora/incidenthttps://api.us5.datadoghq.com/api/v2/dora/incident

개요

Use this API endpoint to provide data about incidents for DORA metrics.

This is necessary for:

  • Change Failure Rate
  • Time to Restore

요청

Body Data (required)

Expand All

항목

유형

설명

data [required]

object

The JSON:API data.

attributes [required]

object

Attributes to create a DORA incident event.

env

string

Environment name that was impacted by the incident.

finished_at

int64

Unix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds, and it should not be older than 1 hour.

git

object

Git info for DORA Metrics events.

commit_sha [required]

string

Git Commit SHA.

repository_url [required]

string

Git Repository URL

id

string

Incident ID. Required to update a previously sent incident.

name

string

Incident name.

services

[string]

Service names impacted by the incident. If possible, use names registered in the Service Catalog. Required when the team field is not provided.

severity

string

Incident severity.

started_at [required]

int64

Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds.

team

string

Name of the team owning the services impacted. If possible, use team handles registered in Datadog. Required when the services field is not provided.

version

string

Version to correlate with APM Deployment Tracking.

{
  "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"
    }
  }
}

응답

OK

Response after receiving a DORA incident event.

Expand All

항목

유형

설명

data [required]

object

Response after receiving a DORA incident event.

id [required]

string

The ID of the received DORA incident event.

type

enum

JSON:API type for DORA incident events. Allowed enum values: dora_incident

default: dora_incident

{
  "data": {
    "id": "4242fcdd31586083",
    "type": "dora_incident"
  }
}

OK - but delayed due to incident

Response after receiving a DORA incident event.

Expand All

항목

유형

설명

data [required]

object

Response after receiving a DORA incident event.

id [required]

string

The ID of the received DORA incident event.

type

enum

JSON:API type for DORA incident events. Allowed enum values: dora_incident

default: dora_incident

{
  "data": {
    "id": "4242fcdd31586083",
    "type": "dora_incident"
  }
}

Bad Request

API error response.

Expand All

항목

유형

설명

errors [required]

[object]

A list of errors.

detail

string

A human-readable explanation specific to this occurrence of the error.

meta

object

Non-standard meta-information about the error

source

object

References to the source of the error.

header

string

A string indicating the name of a single request header which caused the error.

parameter

string

A string indicating which URI query parameter caused the error.

pointer

string

A JSON pointer to the value in the request document that caused the error.

status

string

Status code of the response.

title

string

Short human-readable summary of the error.

{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}

Not Authorized

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

코드 사례

# Send an incident event for DORA Metrics returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.unstable_operations["v2.create_dora_incident".to_sym] = true
end
api_instance = DatadogAPIClient::V2::DORAMetricsAPI.new

body = DatadogAPIClient::V2::DORAIncidentRequest.new({
  data: DatadogAPIClient::V2::DORAIncidentRequestData.new({
    attributes: DatadogAPIClient::V2::DORAIncidentRequestAttributes.new({
      finished_at: 1707842944600000000,
      git: DatadogAPIClient::V2::DORAGitInfo.new({
        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",
    }),
  }),
})
p api_instance.create_dora_incident(body)

Instructions

First install the library and its dependencies and then save the example to example.rb and run following commands:

    
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" rb "example.rb"

PREVIEWING: gorkavicente/appsec-serverless-library-compatibility