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
254 changes: 254 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,13 @@ components:
required: true
schema:
type: string
RumPermanentRetentionFilterIDParameter:
description: The identifier of the permanent RUM retention filter.
in: path
name: permanent_rf_id
required: true
schema:
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
RumRetentionFilterIDParameter:
description: Retention filter ID.
in: path
Expand Down Expand Up @@ -68515,6 +68522,100 @@ components:
$ref: "#/components/schemas/RumMetricResponseData"
type: array
type: object
RumPermanentRetentionFilterAttributes:
description: The attributes of a permanent RUM retention filter.
properties:
cross_product_sampling:
$ref: "#/components/schemas/RumCrossProductSampling"
description:
description: A description of what the filter retains.
example: "All sessions generated by Synthetics are retained at 100%."
type: string
editability:
$ref: "#/components/schemas/RumPermanentRetentionFilterEditability"
name:
description: The display name of the permanent retention filter.
example: "Synthetics Sessions"
type: string
type: object
RumPermanentRetentionFilterData:
description: A permanent RUM retention filter.
properties:
attributes:
$ref: "#/components/schemas/RumPermanentRetentionFilterAttributes"
id:
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
type:
$ref: "#/components/schemas/RumPermanentRetentionFilterType"
type: object
RumPermanentRetentionFilterEditability:
description: Indicates which cross-product fields of a permanent RUM retention filter can be updated.
properties:
trace_editable:
description: Whether the APM trace cross-product configuration of the filter can be updated.
example: true
type: boolean
type: object
RumPermanentRetentionFilterID:
description: The identifier of a permanent RUM retention filter.
enum:
- rum_apm_flat_sampling
- synthetic_sessions
- forced_replay_sessions
example: synthetic_sessions
type: string
x-enum-varnames: ["RUM_APM_FLAT_SAMPLING", "SYNTHETIC_SESSIONS", "FORCED_REPLAY_SESSIONS"]
RumPermanentRetentionFilterResponse:
description: A permanent RUM retention filter object.
properties:
data:
$ref: "#/components/schemas/RumPermanentRetentionFilterData"
type: object
RumPermanentRetentionFilterType:
default: permanent_retention_filters
description: The type of the resource. The value should always be `permanent_retention_filters`.
enum:
- permanent_retention_filters
example: permanent_retention_filters
type: string
x-enum-varnames: ["PERMANENT_RETENTION_FILTERS"]
RumPermanentRetentionFilterUpdateAttributes:
description: The configuration to update on a permanent RUM retention filter.
properties:
cross_product_sampling:
$ref: "#/components/schemas/RumCrossProductSamplingUpdate"
type: object
RumPermanentRetentionFilterUpdateData:
description: The new permanent RUM retention filter configuration to update.
properties:
attributes:
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateAttributes"
id:
$ref: "#/components/schemas/RumPermanentRetentionFilterID"
type:
$ref: "#/components/schemas/RumPermanentRetentionFilterType"
required:
- id
- type
- attributes
type: object
RumPermanentRetentionFilterUpdateRequest:
description: The permanent RUM retention filter body to update.
properties:
data:
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateData"
required:
- data
type: object
RumPermanentRetentionFiltersResponse:
description: All permanent RUM retention filters for a RUM application.
properties:
data:
description: A list of permanent RUM retention filters.
items:
$ref: "#/components/schemas/RumPermanentRetentionFilterData"
type: array
type: object
RumRetentionFilterAttributes:
description: The object describing attributes of a RUM retention filter.
properties:
Expand Down Expand Up @@ -140956,6 +141057,159 @@ paths:
tags:
- Rum Retention Filters
x-codegen-request-body-name: body
/api/v2/rum/applications/{app_id}/retention_filters/permanent:
get:
description: |-
Get the list of permanent RUM retention filters for a RUM application.
Permanent retention filters are predefined filters that cannot be created or deleted.
For each filter, the `editability` block indicates which cross-product fields can be updated.
operationId: ListPermanentRetentionFilters
parameters:
- $ref: "#/components/parameters/RumApplicationIDParameter"
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
- attributes:
cross_product_sampling:
trace_enabled: true
trace_sample_rate: 100.0
description: RUM retains all Synthetics sessions.
editability:
trace_editable: true
name: Synthetics Sessions
id: synthetic_sessions
type: permanent_retention_filters
- attributes:
cross_product_sampling:
trace_enabled: true
trace_sample_rate: 100.0
description: RUM retains all sessions with forced replays.
editability:
trace_editable: true
name: Forced Replay Sessions
id: forced_replay_sessions
type: permanent_retention_filters
- attributes:
cross_product_sampling:
trace_enabled: true
trace_sample_rate: 100.0
description: Configures APM trace sampling for RUM sessions using flat sampling.
editability:
trace_editable: false
name: RUM APM Flat Sampling
id: rum_apm_flat_sampling
type: permanent_retention_filters
schema:
$ref: "#/components/schemas/RumPermanentRetentionFiltersResponse"
description: OK
"403":
$ref: "#/components/responses/NotAuthorizedResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Get all permanent RUM retention filters
tags:
- Rum Retention Filters
/api/v2/rum/applications/{app_id}/retention_filters/permanent/{permanent_rf_id}:
get:
description: Get a permanent RUM retention filter for a RUM application by its identifier.
operationId: GetPermanentRetentionFilter
parameters:
- $ref: "#/components/parameters/RumApplicationIDParameter"
- $ref: "#/components/parameters/RumPermanentRetentionFilterIDParameter"
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
cross_product_sampling:
trace_enabled: true
trace_sample_rate: 75.0
description: RUM retains all Synthetics sessions.
editability:
trace_editable: true
name: Synthetics Sessions
id: synthetic_sessions
type: permanent_retention_filters
schema:
$ref: "#/components/schemas/RumPermanentRetentionFilterResponse"
description: OK
"403":
$ref: "#/components/responses/NotAuthorizedResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Get a permanent RUM retention filter
tags:
- Rum Retention Filters
patch:
description: |-
Update the cross-product sampling configuration of a permanent RUM retention filter for a RUM application.
Only fields marked as editable in the `editability` block of the filter can be updated.
Updating a non-editable field returns a `400` response.
operationId: UpdatePermanentRetentionFilter
parameters:
- $ref: "#/components/parameters/RumApplicationIDParameter"
- $ref: "#/components/parameters/RumPermanentRetentionFilterIDParameter"
requestBody:
content:
application/json:
examples:
default:
value:
data:
attributes:
cross_product_sampling:
trace_enabled: true
trace_sample_rate: 50.0
id: synthetic_sessions
type: permanent_retention_filters
schema:
$ref: "#/components/schemas/RumPermanentRetentionFilterUpdateRequest"
description: New configuration of the permanent RUM retention filter.
required: true
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
cross_product_sampling:
trace_enabled: true
trace_sample_rate: 50.0
description: RUM retains all Synthetics sessions.
editability:
trace_editable: true
name: Synthetics Sessions
id: synthetic_sessions
type: permanent_retention_filters
schema:
$ref: "#/components/schemas/RumPermanentRetentionFilterResponse"
description: Updated
"400":
$ref: "#/components/responses/BadRequestResponse"
"403":
$ref: "#/components/responses/NotAuthorizedResponse"
"404":
$ref: "#/components/responses/NotFoundResponse"
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Update a permanent RUM retention filter
tags:
- Rum Retention Filters
x-codegen-request-body-name: body
/api/v2/rum/applications/{app_id}/retention_filters/{rf_id}:
delete:
description: Delete a RUM retention filter for a RUM application.
Expand Down
50 changes: 50 additions & 0 deletions features/v2/rum_retention_filters.feature
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,22 @@ Feature: Rum Retention Filters
And the response "data.attributes.query" is equal to "custom_query"
And the response "data.attributes.sample_rate" is equal to 25

@generated @skip @team:DataDog/rum-backend
Scenario: Get a permanent RUM retention filter returns "Not Found" response
Given new "GetPermanentRetentionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/rum-backend
Scenario: Get a permanent RUM retention filter returns "OK" response
Given new "GetPermanentRetentionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/rum-backend
Scenario: Get all RUM retention filters returns "OK" response
Given new "ListRetentionFilters" request
Expand All @@ -78,6 +94,13 @@ Feature: Rum Retention Filters
Then the response status is 200 OK
And the response "data" has length 3

@generated @skip @team:DataDog/rum-backend
Scenario: Get all permanent RUM retention filters returns "OK" response
Given new "ListPermanentRetentionFilters" request
And request contains "app_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@team:DataDog/rum-backend
Scenario: Order RUM retention filters returns "Bad Request" response
Given new "OrderRetentionFilters" request
Expand Down Expand Up @@ -130,3 +153,30 @@ Feature: Rum Retention Filters
And the response "data.attributes.enabled" is equal to true
And the response "data.attributes.query" is equal to "view_query"
And the response "data.attributes.sample_rate" is equal to 100

@generated @skip @team:DataDog/rum-backend
Scenario: Update a permanent RUM retention filter returns "Bad Request" response
Given new "UpdatePermanentRetentionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"cross_product_sampling": {"trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "synthetic_sessions", "type": "permanent_retention_filters"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/rum-backend
Scenario: Update a permanent RUM retention filter returns "Not Found" response
Given new "UpdatePermanentRetentionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"cross_product_sampling": {"trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "synthetic_sessions", "type": "permanent_retention_filters"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/rum-backend
Scenario: Update a permanent RUM retention filter returns "Updated" response
Given new "UpdatePermanentRetentionFilter" request
And request contains "app_id" parameter from "REPLACE.ME"
And request contains "permanent_rf_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"cross_product_sampling": {"trace_enabled": true, "trace_sample_rate": 25.0}}, "id": "synthetic_sessions", "type": "permanent_retention_filters"}}
When the request is sent
Then the response status is 200 Updated
18 changes: 18 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5703,6 +5703,24 @@
"type": "safe"
}
},
"ListPermanentRetentionFilters": {
"tag": "Rum Retention Filters",
"undo": {
"type": "safe"
}
},
"GetPermanentRetentionFilter": {
"tag": "Rum Retention Filters",
"undo": {
"type": "safe"
}
},
"UpdatePermanentRetentionFilter": {
"tag": "Rum Retention Filters",
"undo": {
"type": "idempotent"
}
},
"DeleteRetentionFilter": {
"tag": "Rum Retention Filters",
"undo": {
Expand Down
Loading
Loading