인시던트 이벤트 보내기
https://api.datadoghq.com/api/v2/dora/failurehttps://api.us3.datadoghq.com/api/v2/dora/failurehttps://api.us5.datadoghq.com/api/v2/dora/failurehttps://api.datadoghq.eu/api/v2/dora/failurehttps://api.ap1.datadoghq.com/api/v2/dora/failurehttps://api.ap2.datadoghq.com/api/v2/dora/failurehttps://api.uk1.datadoghq.com/api/v2/dora/failurehttps://api.ddog-gov.com/api/v2/dora/failurehttps://api.us2.ddog-gov.com/api/v2/dora/failure개요
이 API 엔드포인트를 사용하여 DORA Metrics에 대한 인시던트 데이터를 제공합니다. 변경 실패율과 실패한 배포 복구 시간은 이 엔드포인트를 통해 전송된 인시던트 이벤트가 아니라 배포에서 탐지된 변경 실패를 기준으로 계산됩니다. 인시던트를 추적하면 실패한 배포가 실제 인시던트로 변환되는 방식을 해당 인시던트의 심각도 및 빈도를 포함해 나란히 비교해 볼 수 있습니다.
요청
Body Data (required)
data [required]DORA 인시던트 이벤트를 생성하도록 요청합니다.
attributes [required]Attributes to create a DORA incident event.
custom_tagsA list of user-defined tags. The tags must follow the key:value pattern. Up to 100 may be added per event.
envEnvironment name that was impacted by the incident.
finished_atUnix timestamp when the incident finished. It must be in nanoseconds, milliseconds, or seconds.
gitGit info for DORA Metrics events.
commit_sha [required]Git Commit SHA.
repository_url [required]Git Repository URL
idIncident ID. Must be 16-128 characters and contain only alphanumeric characters, hyphens, underscores, periods, and colons (a-z, A-Z, 0-9, -, _, ., :).
nameIncident name.
servicesService names impacted by the incident. If possible, use names registered in the Service Catalog. Required when the team field is not provided.
severityIncident severity.
started_at [required]Unix timestamp when the incident started. It must be in nanoseconds, milliseconds, or seconds.
teamName of the team owning the services impacted. If possible, use team handles registered in Datadog. Required when the services field is not provided.
{
"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"
},
"id": "string",
"name": "Webserver is down failing all requests.",
"services": [
"shopist"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}응답
OK
Response after receiving a DORA incident event.
data [required]Response after receiving a DORA incident event.
id [required]The ID of the received DORA incident event.
typeJSON:API type for DORA incident events.
dora_failuredora_failure{
"data": {
"id": "4242fcdd31586083",
"type": "dora_failure"
}
}OK - but delayed due to incident
Response after receiving a DORA incident event.
data [required]Response after receiving a DORA incident event.
id [required]The ID of the received DORA incident event.
typeJSON:API type for DORA incident events.
dora_failuredora_failure{
"data": {
"id": "4242fcdd31586083",
"type": "dora_failure"
}
}Bad Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort 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.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}코드 예시
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
export DD_API_KEY="<DD_API_KEY>"
curl -X POST "https://api.${DD_SITE}/api/v2/dora/failure" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-d @- << EOF
{
"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": [
"test-service"
],
"severity": "High",
"started_at": 1693491974000000000,
"team": "backend",
"version": "v1.12.07"
}
}
}
EOF