Skip to content

Add quality_issues to monitor schema on monitor search API #2743

New issue

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

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

Already on GitHub? # 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-03-05 15:56:05.282215",
"spec_repo_commit": "fe5af5dc"
"regenerated": "2025-03-05 21:00:41.557576",
"spec_repo_commit": "6105a175"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-03-05 15:56:05.298364",
"spec_repo_commit": "fe5af5dc"
"regenerated": "2025-03-05 21:00:41.573086",
"spec_repo_commit": "6105a175"
}
}
}
11 changes: 11 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7551,6 +7551,9 @@ components:
- handle: jane@datadoghq.com
name: Jane Doe
org_id: 1234
quality_issues:
- broken_at_handle
- noisy_monitor
scopes:
- '!availability-zone:us-east-1c'
- name:cassandra
Expand Down Expand Up @@ -7650,6 +7653,14 @@ components:
format: int64
readOnly: true
type: integer
quality_issues:
description: Quality issues detected with the monitor.
items:
description: A quality issue detected with the monitor.
readOnly: true
type: string
readOnly: true
type: array
query:
description: The monitor query.
example: avg(last_5m):sum:system.net.bytes_rcvd{host:host0} > 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
MonitorSearchResult.JSON_PROPERTY_NAME,
MonitorSearchResult.JSON_PROPERTY_NOTIFICATIONS,
MonitorSearchResult.JSON_PROPERTY_ORG_ID,
MonitorSearchResult.JSON_PROPERTY_QUALITY_ISSUES,
MonitorSearchResult.JSON_PROPERTY_QUERY,
MonitorSearchResult.JSON_PROPERTY_SCOPES,
MonitorSearchResult.JSON_PROPERTY_STATUS,
Expand Down Expand Up @@ -63,6 +64,9 @@ public class MonitorSearchResult {
public static final String JSON_PROPERTY_ORG_ID = "org_id";
private Long orgId;

public static final String JSON_PROPERTY_QUALITY_ISSUES = "quality_issues";
private List<String> qualityIssues = null;

public static final String JSON_PROPERTY_QUERY = "query";
private String query;

Expand Down Expand Up @@ -188,6 +192,18 @@ public Long getOrgId() {
return orgId;
}

/**
* Quality issues detected with the monitor.
*
* @return qualityIssues
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_QUALITY_ISSUES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getQualityIssues() {
return qualityIssues;
}

public MonitorSearchResult query(String query) {
this.query = query;
return this;
Expand Down Expand Up @@ -355,6 +371,7 @@ public boolean equals(Object o) {
&& Objects.equals(this.name, monitorSearchResult.name)
&& Objects.equals(this.notifications, monitorSearchResult.notifications)
&& Objects.equals(this.orgId, monitorSearchResult.orgId)
&& Objects.equals(this.qualityIssues, monitorSearchResult.qualityIssues)
&& Objects.equals(this.query, monitorSearchResult.query)
&& Objects.equals(this.scopes, monitorSearchResult.scopes)
&& Objects.equals(this.status, monitorSearchResult.status)
Expand All @@ -374,6 +391,7 @@ public int hashCode() {
name,
notifications,
orgId,
qualityIssues,
query,
scopes,
status,
Expand All @@ -394,6 +412,7 @@ public String toString() {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" notifications: ").append(toIndentedString(notifications)).append("\n");
sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n");
sb.append(" qualityIssues: ").append(toIndentedString(qualityIssues)).append("\n");
sb.append(" query: ").append(toIndentedString(query)).append("\n");
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
Expand Down