Skip to content

Commit

Permalink
Add network performance monitor type to API spec (#1674)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Jul 2, 2024
1 parent 65ab464 commit 84500a9
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 4 deletions.
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": "2024-07-02 14:51:00.055693",
"spec_repo_commit": "1e8d5fca"
"regenerated": "2024-07-02 18:17:50.120632",
"spec_repo_commit": "464f0cec"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-02 14:51:00.073237",
"spec_repo_commit": "1e8d5fca"
"regenerated": "2024-07-02 18:17:50.138246",
"spec_repo_commit": "464f0cec"
}
}
}
28 changes: 28 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6831,6 +6831,7 @@ components:
- logs
- spans
- database_queries
- network_performance_queries
example: rum
type: string
x-enum-varnames:
Expand All @@ -6842,6 +6843,7 @@ components:
- LOGS
- SPANS
- DATABASE_QUERIES
- NETWORK_PERFORMANCE_QUERIES
MonitorFormulaAndFunctionQueryDefinition:
description: A formula and function query.
oneOf:
Expand Down Expand Up @@ -7665,6 +7667,7 @@ components:
- ci-tests alert
- error-tracking alert
- database-monitoring alert
- network-performance alert
example: query alert
type: string
x-enum-varnames:
Expand All @@ -7685,6 +7688,7 @@ components:
- CI_TESTS_ALERT
- ERROR_TRACKING_ALERT
- DATABASE_MONITORING_ALERT
- NETWORK_PERFORMANCE_ALERT
MonitorUpdateRequest:
description: Object describing a monitor update request.
properties:
Expand Down Expand Up @@ -27009,6 +27013,8 @@ paths:

- database-monitoring: `database-monitoring alert`

- network-performance: `network-performance alert`


**Notes**:

Expand Down Expand Up @@ -27308,6 +27314,28 @@ paths:
operator #`


- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).

- `rollup_method` The stats roll-up method - supports `count`, `avg`, and
`cardinality`.

- `measure` For `avg` and cardinality `rollup_method` - specify the measure
or the facet name you want to use.

- `time_window` #m (between 1 and 2880), #h (between 1 and 48).

- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.

- `#` an integer or decimal number used to set the threshold.


**Network Performance Alert Query**


Example: `network-performance(query).rollup(rollup_method[, measure]).last(time_window)
operator #`


- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).

- `rollup_method` The stats roll-up method - supports `count`, `avg`, and
Expand Down
12 changes: 12 additions & 0 deletions packages/datadog-api-client-v1/apis/MonitorsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,7 @@ export class MonitorsApi {
* - audit: `audit alert`
* - error-tracking: `error-tracking alert`
* - database-monitoring: `database-monitoring alert`
* - network-performance: `network-performance alert`
*
* **Notes**:
* - Synthetic monitors are created through the Synthetics API. See the [Synthetics API](https://docs.datadoghq.com/api/latest/synthetics/) documentation for more information.
Expand Down Expand Up @@ -1569,6 +1570,17 @@ export class MonitorsApi {
* - `time_window` #m (between 1 and 2880), #h (between 1 and 48).
* - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
* - `#` an integer or decimal number used to set the threshold.
*
* **Network Performance Alert Query**
*
* Example: `network-performance(query).rollup(rollup_method[, measure]).last(time_window) operator #`
*
* - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
* - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.
* - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use.
* - `time_window` #m (between 1 and 2880), #h (between 1 and 48).
* - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.
* - `#` an integer or decimal number used to set the threshold.
* @param param The request object
*/
public createMonitor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type MonitorFormulaAndFunctionEventsDataSource =
| typeof LOGS
| typeof SPANS
| typeof DATABASE_QUERIES
| typeof NETWORK_PERFORMANCE_QUERIES
| UnparsedObject;
export const RUM = "rum";
export const CI_PIPELINES = "ci_pipelines";
Expand All @@ -28,3 +29,4 @@ export const EVENTS = "events";
export const LOGS = "logs";
export const SPANS = "spans";
export const DATABASE_QUERIES = "database_queries";
export const NETWORK_PERFORMANCE_QUERIES = "network_performance_queries";
2 changes: 2 additions & 0 deletions packages/datadog-api-client-v1/models/MonitorType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type MonitorType =
| typeof CI_TESTS_ALERT
| typeof ERROR_TRACKING_ALERT
| typeof DATABASE_MONITORING_ALERT
| typeof NETWORK_PERFORMANCE_ALERT
| UnparsedObject;
export const COMPOSITE = "composite";
export const EVENT_ALERT = "event alert";
Expand All @@ -46,3 +47,4 @@ export const CI_PIPELINES_ALERT = "ci-pipelines alert";
export const CI_TESTS_ALERT = "ci-tests alert";
export const ERROR_TRACKING_ALERT = "error-tracking alert";
export const DATABASE_MONITORING_ALERT = "database-monitoring alert";
export const NETWORK_PERFORMANCE_ALERT = "network-performance alert";
2 changes: 2 additions & 0 deletions packages/datadog-api-client-v1/models/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ const enumsMap: { [key: string]: any[] } = {
"logs",
"spans",
"database_queries",
"network_performance_queries",
],
MonitorOptionsNotificationPresets: [
"show_all",
Expand Down Expand Up @@ -960,6 +961,7 @@ const enumsMap: { [key: string]: any[] } = {
"ci-tests alert",
"error-tracking alert",
"database-monitoring alert",
"network-performance alert",
],
MonthlyUsageAttributionSupportedMetrics: [
"api_usage",
Expand Down

0 comments on commit 84500a9

Please sign in to comment.