Skip to content

SDCD-1142: adding custom_tags optional attribute to DORA API spec #2319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-13 19:38:20.922353",
"spec_repo_commit": "6eb36f2b"
"regenerated": "2025-06-16 08:24:51.425950",
"spec_repo_commit": "b2c4e7e8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-06-13 19:38:20.939768",
"spec_repo_commit": "6eb36f2b"
"regenerated": "2025-06-16 08:24:51.442050",
"spec_repo_commit": "b2c4e7e8"
}
}
}
15 changes: 15 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11095,6 +11095,17 @@ components:
- version
- name
type: object
DORACustomTags:
description: A list of user-defined tags. The tags must follow the `key:value`
pattern. Up to 100 may be added per event.
example:
- language:java
- department:engineering
items:
description: Tags in the form of `key:value`.
type: string
nullable: true
type: array
DORADeploymentRequest:
description: Request to create a DORA deployment event.
properties:
Expand All @@ -11106,6 +11117,8 @@ components:
DORADeploymentRequestAttributes:
description: Attributes to create a DORA deployment event.
properties:
custom_tags:
$ref: '#/components/schemas/DORACustomTags'
env:
description: Environment name to where the service was deployed.
example: staging
Expand Down Expand Up @@ -11208,6 +11221,8 @@ components:
DORAFailureRequestAttributes:
description: Attributes to create a DORA failure event.
properties:
custom_tags:
$ref: '#/components/schemas/DORACustomTags'
env:
description: Environment name that was impacted by the failure.
example: staging
Expand Down
1 change: 1 addition & 0 deletions examples/v2/dora-metrics/CreateDORAFailure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const params: v2.DORAMetricsApiCreateDORAFailureRequest = {
body: {
data: {
attributes: {
customTags: ["language:java", "department:engineering"],
env: "staging",
finishedAt: 1693491984000000000,
git: {
Expand Down
1 change: 1 addition & 0 deletions examples/v2/dora-metrics/CreateDORAIncident.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const params: v2.DORAMetricsApiCreateDORAIncidentRequest = {
body: {
data: {
attributes: {
customTags: ["language:java", "department:engineering"],
env: "staging",
finishedAt: 1693491984000000000,
git: {
Expand Down
10 changes: 5 additions & 5 deletions features/v2/dora_metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Feature: DORA Metrics
@generated @skip @team:DataDog/ci-app-backend
Scenario: Send a deployment event for DORA Metrics returns "OK - but delayed due to incident" response
Given new "CreateDORADeployment" request
And body with value {"data": {"attributes": {"env": "staging", "finished_at": 1693491984000000000, "git": {"commit_sha": "66adc9350f2cc9b250b69abddab733dd55e1a588", "repository_url": "https://github.com/organization/example-repository"}, "service": "shopist", "started_at": 1693491974000000000, "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"}, "service": "shopist", "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

Expand All @@ -100,7 +100,7 @@ Feature: DORA Metrics
@generated @skip @team:DataDog/ci-app-backend
Scenario: Send a failure event for DORA Metrics returns "OK - but delayed due to incident" response
Given new "CreateDORAFailure" request
And body with value {"data": {"attributes": {"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"}}}
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

Expand All @@ -114,20 +114,20 @@ Feature: DORA Metrics
@generated @skip @team:DataDog/ci-app-backend
Scenario: Send an incident event for DORA Metrics returns "Bad Request" response
Given new "CreateDORAIncident" request
And body with value {"data": {"attributes": {"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"}}}
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 for DORA Metrics returns "OK - but delayed due to incident" response
Given new "CreateDORAIncident" request
And body with value {"data": {"attributes": {"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"}}}
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 for DORA Metrics returns "OK" response
Given new "CreateDORAIncident" request
And body with value {"data": {"attributes": {"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"}}}
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
* Attributes to create a DORA deployment event.
*/
export class DORADeploymentRequestAttributes {
/**
* A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event.
*/
"customTags"?: Array<string>;
/**
* Environment name to where the service was deployed.
*/
Expand Down Expand Up @@ -60,6 +64,10 @@ export class DORADeploymentRequestAttributes {
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
customTags: {
baseName: "custom_tags",
type: "Array<string>",
},
env: {
baseName: "env",
type: "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
* Attributes to create a DORA failure event.
*/
export class DORAFailureRequestAttributes {
/**
* A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event.
*/
"customTags"?: Array<string>;
/**
* Environment name that was impacted by the failure.
*/
Expand Down Expand Up @@ -68,6 +72,10 @@ export class DORAFailureRequestAttributes {
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
customTags: {
baseName: "custom_tags",
type: "Array<string>",
},
env: {
baseName: "env",
type: "string",
Expand Down
Loading