-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update retention filters public API (#1594)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
- Loading branch information
1 parent
dc91a19
commit ac173a4
Showing
10 changed files
with
232 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...5078/Create-a-default-retention-filter-returns-Bad-Request-response_652075659/frozen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"2024-04-10T12:31:19.300Z" |
67 changes: 67 additions & 0 deletions
67
...78/Create-a-default-retention-filter-returns-Bad-Request-response_652075659/recording.har
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"log": { | ||
"_recordingName": "APM Retention Filters/Create a default retention filter returns \"Bad Request\" response", | ||
"creator": { | ||
"comment": "persister:fs", | ||
"name": "Polly.JS", | ||
"version": "6.0.5" | ||
}, | ||
"entries": [ | ||
{ | ||
"_id": "23cb9ef503c91078cfb54a6f43add906", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 218, | ||
"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-errors-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": 91, | ||
"content": { | ||
"mimeType": "application/json", | ||
"size": 91, | ||
"text": "{\"errors\":[\"Field 'filter_type' is invalid, expected value is 'spans-sampling-processor'\"]}" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 516, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 400, | ||
"statusText": "Bad Request" | ||
}, | ||
"startedDateTime": "2024-04-10T12:31:19.304Z", | ||
"time": 436 | ||
} | ||
], | ||
"pages": [], | ||
"version": "1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
packages/datadog-api-client-v2/models/RetentionFilterUpdateAttributes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/** | ||
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. | ||
* This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
* Copyright 2020-Present Datadog, Inc. | ||
*/ | ||
import { RetentionFilterAllType } from "./RetentionFilterAllType"; | ||
import { SpansFilterCreate } from "./SpansFilterCreate"; | ||
|
||
import { AttributeTypeMap } from "../../datadog-api-client-common/util"; | ||
|
||
/** | ||
* The object describing the configuration of the retention filter to create/update. | ||
*/ | ||
export class RetentionFilterUpdateAttributes { | ||
/** | ||
* Enable/Disable the retention filter. | ||
*/ | ||
"enabled": boolean; | ||
/** | ||
* The spans filter. Spans matching this filter will be indexed and stored. | ||
*/ | ||
"filter": SpansFilterCreate; | ||
/** | ||
* The type of retention filter. | ||
*/ | ||
"filterType": RetentionFilterAllType; | ||
/** | ||
* The name of the retention filter. | ||
*/ | ||
"name": string; | ||
/** | ||
* Sample rate to apply to spans going through this retention filter, | ||
* a value of 1.0 keeps all spans matching the query. | ||
*/ | ||
"rate": number; | ||
|
||
/** | ||
* A container for additional, undeclared properties. | ||
* This is a holder for any undeclared properties as specified with | ||
* the 'additionalProperties' keyword in the OAS document. | ||
*/ | ||
"additionalProperties"?: { [key: string]: any }; | ||
|
||
/** | ||
* @ignore | ||
*/ | ||
"_unparsed"?: boolean; | ||
|
||
/** | ||
* @ignore | ||
*/ | ||
static readonly attributeTypeMap: AttributeTypeMap = { | ||
enabled: { | ||
baseName: "enabled", | ||
type: "boolean", | ||
required: true, | ||
}, | ||
filter: { | ||
baseName: "filter", | ||
type: "SpansFilterCreate", | ||
required: true, | ||
}, | ||
filterType: { | ||
baseName: "filter_type", | ||
type: "RetentionFilterAllType", | ||
required: true, | ||
}, | ||
name: { | ||
baseName: "name", | ||
type: "string", | ||
required: true, | ||
}, | ||
rate: { | ||
baseName: "rate", | ||
type: "number", | ||
required: true, | ||
format: "double", | ||
}, | ||
additionalProperties: { | ||
baseName: "additionalProperties", | ||
type: "any", | ||
}, | ||
}; | ||
|
||
/** | ||
* @ignore | ||
*/ | ||
static getAttributeTypeMap(): AttributeTypeMap { | ||
return RetentionFilterUpdateAttributes.attributeTypeMap; | ||
} | ||
|
||
public constructor() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters