Skip to content
Open
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
30 changes: 18 additions & 12 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121295,7 +121295,7 @@ components:
type: array
type: object
TimeseriesAnomalyInvestigationAnomaly:
description: Most significant anomaly detected in the request.
description: One of the most significant anomalies detected in the request.
properties:
anomaly_detection:
$ref: '#/components/schemas/TimeseriesAnomalyInvestigationDetection'
Expand Down Expand Up @@ -121471,8 +121471,11 @@ components:
description: Formula evaluated by the timeseries request.
properties:
formula:
description: Formula expression referencing one or more named queries.
example: "anomalies(query1, 'agile', 3)"
description: |-
Formula expression referencing one or more named queries.
When the expression does not contain an explicit `anomalies()` call,
the endpoint applies the default Watchdog Explains anomaly detection configuration.
example: query1
minLength: 1
type: string
limit:
Expand Down Expand Up @@ -121663,7 +121666,7 @@ components:
description: Timeseries requests to investigate. This API version accepts exactly one request.
example:
- formulas:
- formula: "anomalies(query1, 'agile', 3)"
- formula: query1
from: 1754406000000
queries:
- data_source: metrics
Expand Down Expand Up @@ -121785,11 +121788,13 @@ components:
description: Completed result for one timeseries request. The anomalies array is empty when no qualifying anomaly is found.
properties:
anomalies:
description: Detected anomalies. This API version returns at most one anomaly.
description: |-
Detected anomalies, ordered by significance. This API version returns at most
three anomalies across the submitted request.
example: []
items:
$ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomaly'
maxItems: 1
maxItems: 3
type: array
status:
$ref: '#/components/schemas/TimeseriesAnomalyInvestigationCompleteStatus'
Expand Down Expand Up @@ -121887,7 +121892,7 @@ components:
formulas:
description: Formulas to evaluate. Each formula may contain an explicit `anomalies()` call or a supported metrics expression.
example:
- formula: "anomalies(query1, 'agile', 3)"
- formula: query1
items:
$ref: '#/components/schemas/TimeseriesAnomalyInvestigationFormula'
minItems: 1
Expand Down Expand Up @@ -223611,8 +223616,9 @@ paths:
/api/v2/timeseries-anomaly-investigations:
post:
description: |-
Investigates a metrics timeseries request for its most significant anomaly and returns deterministic findings.
Metrics queries with or without grouping are supported. This API version accepts exactly one request and returns at most one anomaly.
Investigates a metrics timeseries request for its most significant anomalies and returns
deterministic findings. Metrics queries with or without grouping are supported. This
API version accepts exactly one request and returns at most three anomalies.
operationId: CreateTimeseriesAnomalyInvestigation
requestBody:
content:
Expand All @@ -223624,7 +223630,7 @@ paths:
attributes:
requests:
- formulas:
- formula: "anomalies(query1, 'agile', 3)"
- formula: query1
from: 1754406000000
queries:
- data_source: metrics
Expand All @@ -223648,8 +223654,8 @@ paths:
results:
- anomalies:
- anomaly_detection:
configuration_source: request_formula
profile:
configuration_source: watchdog_explains_default
profile: watchdog_explains_v1
detected_interval:
end: 1754406120000
start: 1754406060000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void main(String[] args) {
.formulas(
Collections.singletonList(
new TimeseriesAnomalyInvestigationFormula()
.formula("anomalies(query1, 'agile', 3)")))
.formula("query1")))
.from(1754406000000L)
.queries(
Collections.singletonList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public TimeseriesAnomalyInvestigationResponse createTimeseriesAnomalyInvestigati
}

/**
* Investigates a metrics timeseries request for its most significant anomaly and returns
* Investigates a metrics timeseries request for its most significant anomalies and returns
* deterministic findings. Metrics queries with or without grouping are supported. This API
* version accepts exactly one request and returns at most one anomaly.
* version accepts exactly one request and returns at most three anomalies.
*
* @param body Metrics timeseries request to investigate. The request body must not exceed 2 MiB.
* (required)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.Map;
import java.util.Objects;

/** Most significant anomaly detected in the request. */
/** One of the most significant anomalies detected in the request. */
@JsonPropertyOrder({
TimeseriesAnomalyInvestigationAnomaly.JSON_PROPERTY_ANOMALY_DETECTION,
TimeseriesAnomalyInvestigationAnomaly.JSON_PROPERTY_DETECTED_INTERVAL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public TimeseriesAnomalyInvestigationFormula formula(String formula) {
}

/**
* Formula expression referencing one or more named queries.
* Formula expression referencing one or more named queries. When the expression does not contain
* an explicit <code>anomalies()</code> call, the endpoint applies the default Watchdog Explains
* anomaly detection configuration.
*
* @return formula
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public TimeseriesAnomalyInvestigationResult addAnomaliesItem(
}

/**
* Detected anomalies. This API version returns at most one anomaly.
* Detected anomalies, ordered by significance. This API version returns at most three anomalies
* across the submitted request.
*
* @return anomalies
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Timeseries Anomaly Investigations
And an instance of "TimeseriesAnomalyInvestigations" API
And operation "CreateTimeseriesAnomalyInvestigation" enabled
And new "CreateTimeseriesAnomalyInvestigation" request
And body with value {"data": {"attributes": {"requests": [{"formulas": [{"formula": "anomalies(query1, 'agile', 3)"}], "from": 1754406000000, "queries": [{"data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{env:prod} by {service}"}], "to": 1754423940000}]}, "type": "timeseries_anomaly_investigation"}}
And body with value {"data": {"attributes": {"requests": [{"formulas": [{"formula": "query1"}], "from": 1754406000000, "queries": [{"data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{env:prod} by {service}"}], "to": 1754423940000}]}, "type": "timeseries_anomaly_investigation"}}

@generated @skip @team:DataDog/dataviz-backend-maintainers
Scenario: Investigate a timeseries anomaly returns "Bad Request" response
Expand Down
Loading