Skip to content

Add test for APM create retention filter #1382

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": "2023-10-18 20:16:44.113785",
"spec_repo_commit": "a1e5664c"
"regenerated": "2023-10-19 13:23:59.746797",
"spec_repo_commit": "823e1cf6"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-18 20:16:44.132808",
"spec_repo_commit": "a1e5664c"
"regenerated": "2023-10-19 13:23:59.762506",
"spec_repo_commit": "823e1cf6"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"2023-10-19T12:28:01.048Z"
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"log": {
"_recordingName": "APM Retention Filters/Create a retention filter returns \"OK\" response",
"creator": {
"comment": "persister:fs",
"name": "Polly.JS",
"version": "6.0.5"
},
"entries": [
{
"_id": "7a697c95a508933d64da7d94bc8da12e",
"_order": 0,
"cache": {},
"request": {
"bodySize": 211,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "application/json"
},
{
"_fromType": "array",
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 587,
"httpVersion": "HTTP/1.1",
"method": "POST",
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{\"data\":{\"attributes\":{\"enabled\":true,\"filter\":{\"query\":\"@http.status_code:200 service:my-service\"},\"filter_type\":\"spans-sampling-processor\",\"name\":\"my retention filter\",\"rate\":1},\"type\":\"apm_retention_filter\"}}"
},
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters"
},
"response": {
"bodySize": 414,
"content": {
"mimeType": "application/json",
"size": 414,
"text": "{\"data\":{\"id\":\"kkZkTzFaR_Oy4OWzOJQbcw\",\"attributes\":{\"name\":\"my retention filter\",\"rate\":1.0,\"enabled\":true,\"filter_type\":\"spans-sampling-processor\",\"filter\":{\"query\":\"@http.status_code:200 service:my-service\"},\"editable\":true,\"modified_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"modified_at\":1697718481,\"created_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"created_at\":1697718481},\"type\":\"apm_retention_filter\"}}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 517,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-10-19T12:28:01.335Z",
"time": 153
},
{
"_id": "08b88a2ab9800d90f3fc626041e1e05d",
"_order": 0,
"cache": {},
"request": {
"bodySize": 0,
"cookies": [],
"headers": [
{
"_fromType": "array",
"name": "accept",
"value": "*/*"
}
],
"headersSize": 546,
"httpVersion": "HTTP/1.1",
"method": "DELETE",
"queryString": [],
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters/kkZkTzFaR_Oy4OWzOJQbcw"
},
"response": {
"bodySize": 3,
"content": {
"mimeType": "application/json",
"size": 3,
"text": "{}\n"
},
"cookies": [],
"headers": [
{
"name": "content-type",
"value": "application/json"
}
],
"headersSize": 492,
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
},
"startedDateTime": "2023-10-19T12:28:01.496Z",
"time": 148
}
],
"pages": [],
"version": "1.2"
}
}
3 changes: 2 additions & 1 deletion features/v2/apm_retention_filters.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ Feature: APM Retention Filters
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:DataDog/apm-trace-intake
@team:DataDog/apm-trace-intake
Scenario: Create a retention filter returns "OK" response
Given new "CreateApmRetentionFilter" request
And body with value {"data": {"attributes": {"enabled": true, "filter": {"query": "@http.status_code:200 service:my-service"}, "filter_type": "spans-sampling-processor", "name": "my retention filter", "rate": 1.0}, "type": "apm_retention_filter"}}
When the request is sent
Then the response status is 200 OK
And the response "data.attributes.name" is equal to "my retention filter"

@team:DataDog/apm-trace-intake
Scenario: Delete a retention filter returns "Not Found" response
Expand Down