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
15 changes: 0 additions & 15 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215513,9 +215513,6 @@ paths:
summary: Get all RUM exclusion filters
tags:
- Rum Retention Filters
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
post:
description: |-
Create an exclusion filter for a RUM application.
Expand Down Expand Up @@ -215572,9 +215569,6 @@ paths:
tags:
- Rum Retention Filters
x-codegen-request-body-name: body
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}:
delete:
description: |-
Expand All @@ -215599,9 +215593,6 @@ paths:
summary: Delete a RUM exclusion filter
tags:
- Rum Retention Filters
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
get:
description: Get a single exclusion filter for a RUM application.
operationId: GetExclusionFilter
Expand Down Expand Up @@ -215639,9 +215630,6 @@ paths:
summary: Get a RUM exclusion filter
tags:
- Rum Retention Filters
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
patch:
description: |-
Update an exclusion filter for a RUM application.
Expand Down Expand Up @@ -215706,9 +215694,6 @@ paths:
tags:
- Rum Retention Filters
x-codegen-request-body-name: body
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/rum/applications/{app_id}/retention_filters/permanent:
get:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ async fn main() {
.query("@error.message:*extension*".to_string()),
RumExclusionFilterType::EXCLUSION_FILTERS,
));
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.create_exclusion_filter", true);
let configuration = datadog::Configuration::new();
let api = RumRetentionFiltersAPI::with_config(configuration);
let resp = api
.create_exclusion_filter("app_id".to_string(), body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use datadog_api_client::datadogV2::api_rum_retention_filters::RumRetentionFilter

#[tokio::main]
async fn main() {
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.delete_exclusion_filter", true);
let configuration = datadog::Configuration::new();
let api = RumRetentionFiltersAPI::with_config(configuration);
let resp = api
.delete_exclusion_filter("app_id".to_string(), "ef_id".to_string())
Expand Down
3 changes: 1 addition & 2 deletions examples/v2_rum-retention-filters_GetExclusionFilter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use datadog_api_client::datadogV2::api_rum_retention_filters::RumRetentionFilter

#[tokio::main]
async fn main() {
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.get_exclusion_filter", true);
let configuration = datadog::Configuration::new();
let api = RumRetentionFiltersAPI::with_config(configuration);
let resp = api
.get_exclusion_filter("app_id".to_string(), "ef_id".to_string())
Expand Down
3 changes: 1 addition & 2 deletions examples/v2_rum-retention-filters_ListExclusionFilters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use datadog_api_client::datadogV2::api_rum_retention_filters::RumRetentionFilter

#[tokio::main]
async fn main() {
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.list_exclusion_filters", true);
let configuration = datadog::Configuration::new();
let api = RumRetentionFiltersAPI::with_config(configuration);
let resp = api.list_exclusion_filters("app_id".to_string()).await;
if let Ok(value) = resp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ async fn main() {
"051601eb-54a0-abc0-03f9-cc02efa18892".to_string(),
RumExclusionFilterType::EXCLUSION_FILTERS,
));
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.update_exclusion_filter", true);
let configuration = datadog::Configuration::new();
let api = RumRetentionFiltersAPI::with_config(configuration);
let resp = api
.update_exclusion_filter("app_id".to_string(), "ef_id".to_string(), body)
Expand Down
5 changes: 0 additions & 5 deletions src/datadog/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -977,11 +977,6 @@ impl Default for Configuration {
("v2.get_sourcemaps".to_owned(), false),
("v2.list_sourcemaps".to_owned(), false),
("v2.restore_sourcemaps".to_owned(), false),
("v2.create_exclusion_filter".to_owned(), false),
("v2.delete_exclusion_filter".to_owned(), false),
("v2.get_exclusion_filter".to_owned(), false),
("v2.list_exclusion_filters".to_owned(), false),
("v2.update_exclusion_filter".to_owned(), false),
("v2.create_rum_config".to_owned(), false),
("v2.get_rum_config".to_owned(), false),
("v2.update_rum_config".to_owned(), false),
Expand Down
41 changes: 0 additions & 41 deletions src/datadogV2/api/api_rum_retention_filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use flate2::{
write::{GzEncoder, ZlibEncoder},
Compression,
};
use log::warn;
use reqwest::header::{HeaderMap, HeaderValue};
use serde::{Deserialize, Serialize};
use std::io::Write;
Expand Down Expand Up @@ -236,14 +235,6 @@ impl RumRetentionFiltersAPI {
> {
let local_configuration = &self.config;
let local_operation_id = "v2.create_exclusion_filter";
if local_configuration.is_unstable_operation_enabled(local_operation_id) {
warn!("Using unstable operation {local_operation_id}");
} else {
let local_error = datadog::UnstableOperationDisabledError {
msg: "Operation 'v2.create_exclusion_filter' is not enabled".to_string(),
};
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
}

let local_client = &self.client;

Expand Down Expand Up @@ -558,14 +549,6 @@ impl RumRetentionFiltersAPI {
) -> Result<datadog::ResponseContent<()>, datadog::Error<DeleteExclusionFilterError>> {
let local_configuration = &self.config;
let local_operation_id = "v2.delete_exclusion_filter";
if local_configuration.is_unstable_operation_enabled(local_operation_id) {
warn!("Using unstable operation {local_operation_id}");
} else {
let local_error = datadog::UnstableOperationDisabledError {
msg: "Operation 'v2.delete_exclusion_filter' is not enabled".to_string(),
};
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
}

let local_client = &self.client;

Expand Down Expand Up @@ -768,14 +751,6 @@ impl RumRetentionFiltersAPI {
> {
let local_configuration = &self.config;
let local_operation_id = "v2.get_exclusion_filter";
if local_configuration.is_unstable_operation_enabled(local_operation_id) {
warn!("Using unstable operation {local_operation_id}");
} else {
let local_error = datadog::UnstableOperationDisabledError {
msg: "Operation 'v2.get_exclusion_filter' is not enabled".to_string(),
};
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
}

let local_client = &self.client;

Expand Down Expand Up @@ -1118,14 +1093,6 @@ impl RumRetentionFiltersAPI {
> {
let local_configuration = &self.config;
let local_operation_id = "v2.list_exclusion_filters";
if local_configuration.is_unstable_operation_enabled(local_operation_id) {
warn!("Using unstable operation {local_operation_id}");
} else {
let local_error = datadog::UnstableOperationDisabledError {
msg: "Operation 'v2.list_exclusion_filters' is not enabled".to_string(),
};
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
}

let local_client = &self.client;

Expand Down Expand Up @@ -1637,14 +1604,6 @@ impl RumRetentionFiltersAPI {
> {
let local_configuration = &self.config;
let local_operation_id = "v2.update_exclusion_filter";
if local_configuration.is_unstable_operation_enabled(local_operation_id) {
warn!("Using unstable operation {local_operation_id}");
} else {
let local_error = datadog::UnstableOperationDisabledError {
msg: "Operation 'v2.update_exclusion_filter' is not enabled".to_string(),
};
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
}

let local_client = &self.client;

Expand Down
36 changes: 12 additions & 24 deletions tests/scenarios/features/v2/rum_retention_filters.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ Feature: Rum Retention Filters

@generated @skip @team:ddoghq/rum-backend
Scenario: Create a RUM exclusion filter returns "Bad Request" response
Given operation "CreateExclusionFilter" enabled
And new "CreateExclusionFilter" request
Given new "CreateExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "type": "exclusion_filters"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/rum-backend
Scenario: Create a RUM exclusion filter returns "Created" response
Given operation "CreateExclusionFilter" enabled
And new "CreateExclusionFilter" request
Given new "CreateExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "type": "exclusion_filters"}}
When the request is sent
Expand Down Expand Up @@ -51,26 +49,23 @@ Feature: Rum Retention Filters

@generated @skip @team:ddoghq/rum-backend
Scenario: Delete a RUM exclusion filter returns "Method Not Allowed" response
Given operation "DeleteExclusionFilter" enabled
And new "DeleteExclusionFilter" request
Given new "DeleteExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 405 Method Not Allowed

@generated @skip @team:ddoghq/rum-backend
Scenario: Delete a RUM exclusion filter returns "No Content" response
Given operation "DeleteExclusionFilter" enabled
And new "DeleteExclusionFilter" request
Given new "DeleteExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:ddoghq/rum-backend
Scenario: Delete a RUM exclusion filter returns "Not Found" response
Given operation "DeleteExclusionFilter" enabled
And new "DeleteExclusionFilter" request
Given new "DeleteExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
When the request is sent
Expand All @@ -94,17 +89,15 @@ Feature: Rum Retention Filters

@generated @skip @team:ddoghq/rum-backend
Scenario: Get a RUM exclusion filter returns "Not Found" response
Given operation "GetExclusionFilter" enabled
And new "GetExclusionFilter" request
Given new "GetExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:ddoghq/rum-backend
Scenario: Get a RUM exclusion filter returns "OK" response
Given operation "GetExclusionFilter" enabled
And new "GetExclusionFilter" request
Given new "GetExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
When the request is sent
Expand Down Expand Up @@ -151,8 +144,7 @@ Feature: Rum Retention Filters

@generated @skip @team:ddoghq/rum-backend
Scenario: Get all RUM exclusion filters returns "OK" response
Given operation "ListExclusionFilters" enabled
And new "ListExclusionFilters" request
Given new "ListExclusionFilters" request
And request contains "app_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
Expand Down Expand Up @@ -193,8 +185,7 @@ Feature: Rum Retention Filters

@generated @skip @team:ddoghq/rum-backend
Scenario: Update a RUM exclusion filter returns "Bad Request" response
Given operation "UpdateExclusionFilter" enabled
And new "UpdateExclusionFilter" request
Given new "UpdateExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "id": "051601eb-54a0-abc0-03f9-cc02efa18892", "type": "exclusion_filters"}}
Expand All @@ -203,8 +194,7 @@ Feature: Rum Retention Filters

@generated @skip @team:ddoghq/rum-backend
Scenario: Update a RUM exclusion filter returns "Conflict" response
Given operation "UpdateExclusionFilter" enabled
And new "UpdateExclusionFilter" request
Given new "UpdateExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "id": "051601eb-54a0-abc0-03f9-cc02efa18892", "type": "exclusion_filters"}}
Expand All @@ -213,8 +203,7 @@ Feature: Rum Retention Filters

@generated @skip @team:ddoghq/rum-backend
Scenario: Update a RUM exclusion filter returns "Not Found" response
Given operation "UpdateExclusionFilter" enabled
And new "UpdateExclusionFilter" request
Given new "UpdateExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "id": "051601eb-54a0-abc0-03f9-cc02efa18892", "type": "exclusion_filters"}}
Expand All @@ -223,8 +212,7 @@ Feature: Rum Retention Filters

@generated @skip @team:ddoghq/rum-backend
Scenario: Update a RUM exclusion filter returns "Updated" response
Given operation "UpdateExclusionFilter" enabled
And new "UpdateExclusionFilter" request
Given new "UpdateExclusionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "ef_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "id": "051601eb-54a0-abc0-03f9-cc02efa18892", "type": "exclusion_filters"}}
Expand Down
Loading