From 0a1c115f7184db888db56eda153dfcaeb8281d1f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 28 Oct 2026 17:03:46 +0000 Subject: [PATCH] Regenerate client from commit 14abaca of spec repo --- .generator/schemas/v2/openapi.yaml | 364 ++++++++++++++---- src/datadog_api_client/v2/api/rum_api.py | 156 ++++++-- .../v2/model/rum_aggregate_request.py | 1 + .../v2/model/rum_aggregate_sort.py | 4 +- .../v2/model/rum_aggregate_sort_type.py | 2 +- .../v2/model/rum_aggregation_function.py | 2 +- .../v2/model/rum_application_attributes.py | 2 +- .../v2/model/rum_application_create.py | 1 + .../rum_application_create_attributes.py | 59 ++- .../model/rum_application_list_attributes.py | 2 +- .../v2/model/rum_application_update.py | 3 +- .../rum_application_update_attributes.py | 74 +++- .../v2/model/rum_compute.py | 12 +- .../v2/model/rum_compute_type.py | 2 +- .../v2/model/rum_event_attributes.py | 7 +- .../v2/model/rum_event_processing_scale.py | 2 +- .../v2/model/rum_event_processing_state.py | 2 +- .../v2/model/rum_group_by.py | 4 +- .../v2/model/rum_group_by_missing.py | 2 +- .../rum_product_analytics_retention_scale.py | 1 + .../rum_product_analytics_retention_state.py | 1 + .../v2/model/rum_query_filter.py | 6 +- .../v2/model/rum_query_page_options.py | 4 +- .../v2/model/rum_response_links.py | 4 +- .../v2/model/rum_response_metadata.py | 2 +- .../v2/model/rum_response_page.py | 2 +- .../v2/model/rum_response_status.py | 2 +- .../v2/model/rum_search_events_request.py | 2 +- tests/v2/features/rum.feature | 41 +- 29 files changed, 617 insertions(+), 149 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 993e6653a1..bce0545fdb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -102352,7 +102352,9 @@ components: type: number type: object RUMAggregateRequest: - description: The object sent with the request to retrieve aggregation buckets of RUM events from your organization. + description: |- + The object sent with the request to retrieve aggregation buckets of RUM events from your organization. + `filter.indexes` is not supported and ignored. properties: compute: description: The list of metrics or timeseries to compute for the retrieved buckets. @@ -102379,7 +102381,7 @@ components: $ref: "#/components/schemas/RUMAggregationFunction" metric: description: The metric to sort by (only used for `type=measure`). - example: "@duration" + example: "@view.loading_time" type: string order: $ref: "#/components/schemas/RUMSortOrder" @@ -102388,7 +102390,7 @@ components: type: object RUMAggregateSortType: default: "alphabetical" - description: The type of sorting algorithm. + description: The type of sorting algorithm. `alphabetical` sorts buckets by the facet value, `measure` sorts them by a computed aggregation. enum: ["alphabetical", "measure"] type: string x-enum-varnames: ["ALPHABETICAL", "MEASURE"] @@ -102402,7 +102404,8 @@ components: type: array type: object RUMAggregationFunction: - description: An aggregation function. + description: |- + An aggregation function. `count` counts events and needs no metric. `cardinality` counts the distinct values of the metric. `sum`, `min`, `max`, `avg`, `median` and the percentiles (`pc75` to `pc99`) apply to a numeric metric such as `@view.loading_time`. enum: ["count", "cardinality", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg", "median"] example: "pc90" type: string @@ -102539,7 +102542,7 @@ components: type: string type: array type: - description: "Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`." + description: "Type of the RUM application. Possible values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`, `react`, `nextjs`, `angular`, `vuejs`, `nuxt`, `tanstack`, `maui`, `salesforce-lwc`, `shopify`, `cpp`, `rum-cpp`, `unreal`." example: browser type: string updated_at: @@ -102574,8 +102577,19 @@ components: - type type: object RUMApplicationCreateAttributes: - description: RUM application creation attributes. + description: |- + RUM application creation attributes. + When `rum_event_processing_state` is omitted, it defaults to `ALL`. When `product_analytics_retention_state` is omitted, Product Analytics is not enabled. Setting it to `MAX` requires the `product_analytics_apps_write` permission. properties: + apm_rum_flat_sampling_replay_enabled: + description: Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. Defaults to `true`. + example: true + type: boolean + apm_rum_flat_sampling_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. Defaults to `1`. + example: 1 + format: double + type: number create_default_retention_filters: default: true description: |- @@ -102584,16 +102598,35 @@ components: This setting doesn't affect permanent retention filters (sessions with forced replays, Synthetics sessions and RUM-APM flat sampling). example: false type: boolean + error_tracking_exclusion_filter_enabled: + description: Indicates if Error Tracking exclusion filters are enabled for the application. Defaults to `false`. + example: false + type: boolean name: - description: Name of the RUM application. + description: Name of the RUM application. Between 1 and 255 characters. example: my_new_rum_application + maxLength: 255 type: string + product_analytics_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for Product Analytics sessions. Defaults to `100`. + example: 100 + format: int32 + maximum: 2147483647 + type: integer product_analytics_retention_state: $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" rum_event_processing_state: $ref: "#/components/schemas/RUMEventProcessingState" + tags: + description: List of tags to associate with the RUM application, in `key:value` format. + example: + - "team:rum" + items: + description: Tag associated with the RUM application. + type: string + type: array type: - description: "Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`." + description: "Type of the RUM application. Defaults to `browser`. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`, `react`, `nextjs`, `angular`, `vuejs`, `nuxt`, `tanstack`, `maui`, `salesforce-lwc`, `shopify`, `cpp`, `rum-cpp`, `unreal`." example: browser type: string required: @@ -102733,7 +102766,7 @@ components: type: string type: array type: - description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. + description: Type of the RUM application. Possible values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`, `react`, `nextjs`, `angular`, `vuejs`, `nuxt`, `tanstack`, `maui`, `salesforce-lwc`, `shopify`, `cpp`, `rum-cpp`, `unreal`. example: browser type: string updated_at: @@ -102795,18 +102828,55 @@ components: - type type: object RUMApplicationUpdateAttributes: - description: RUM application update attributes. + description: |- + RUM application update attributes. Only the attributes you provide are changed, omitted attributes keep their current value. + Changing `product_analytics_retention_state` or `product_analytics_replay_sample_rate` requires the `product_analytics_apps_write` permission. properties: + apm_rum_flat_sampling_replay_enabled: + description: Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. + example: true + type: boolean + apm_rum_flat_sampling_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. + example: 1 + format: double + type: number + error_tracking_exclusion_filter_enabled: + description: Indicates if Error Tracking exclusion filters are enabled for the application. + example: false + type: boolean + instrumentation_type: + description: Instrumentation type of the RUM application. + example: manual + type: string name: - description: Name of the RUM application. + description: New name of the RUM application. example: updated_name_for_my_existing_rum_application type: string + product_analytics_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for Product Analytics sessions. + example: 100 + format: int32 + maximum: 2147483647 + type: integer product_analytics_retention_state: $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" + remote_config_id: + description: ID of the RUM SDK remote configuration to associate with the application. + example: abc12345-1234-5678-abcd-ef1234567890 + type: string rum_event_processing_state: $ref: "#/components/schemas/RUMEventProcessingState" + tags: + description: New list of tags of the RUM application, in `key:value` format. Replaces the existing tags. + example: + - "team:rum" + items: + description: Tag associated with the RUM application. + type: string + type: array type: - description: "Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`." + description: "New type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`, `react`, `nextjs`, `angular`, `vuejs`, `nuxt`, `tanstack`, `maui`, `salesforce-lwc`, `shopify`, `cpp`, `rum-cpp`, `unreal`." example: browser type: string type: object @@ -102858,19 +102928,19 @@ components: type: object type: object RUMCompute: - description: A compute rule to compute metrics or timeseries. + description: A compute rule to compute metrics or timeseries. In the response, the result of each rule is keyed `c0`, `c1`... following the order of the `compute` list. properties: aggregation: $ref: "#/components/schemas/RUMAggregationFunction" interval: description: |- - The time buckets' size (only used for type=timeseries) - Defaults to a resolution of 150 points. + The time buckets' size, for example `5m`, `1h` or `1d` (only used for `type=timeseries`). + Defaults to a resolution of 150 points over the queried time range. example: "5m" type: string metric: - description: The metric to use. - example: "@duration" + description: The attribute to aggregate, for example `@view.loading_time`. Not needed for `count`, required for the other aggregations. + example: "@view.loading_time" type: string type: $ref: "#/components/schemas/RUMComputeType" @@ -102879,7 +102949,7 @@ components: type: object RUMComputeType: default: "total" - description: The type of compute. + description: The type of compute. `total` returns one value per bucket, `timeseries` returns a list of time points per bucket. enum: ["timeseries", "total"] type: string x-enum-varnames: ["TIMESERIES", "TOTAL"] @@ -102900,8 +102970,10 @@ components: properties: attributes: additionalProperties: {} - description: JSON object of attributes from RUM events. - example: {"customAttribute": 123, "duration": 2345} + description: |- + JSON object of attributes from RUM events. Attributes are nested by path: the facet `@view.name` used in queries is returned as `attributes.view.name`. + Common attributes include `type` (the event type: `session`, `view`, `action`, `resource`, `error`, `long_task` or `vital`), `application.id`, `session.id`, `view.id`, `view.name` and `usr.id`. Durations such as `view.time_spent`, `view.loading_time` and `resource.duration` are in nanoseconds. + example: {"application": {"id": "abcd1234-0000-0000-abcd-1234abcd5678"}, "type": "view", "view": {"loading_time": 1200000000, "name": "/checkout"}} type: object service: description: |- @@ -102911,14 +102983,14 @@ components: example: "web-app" type: string tags: - description: Array of tags associated with your event. + description: Array of tags associated with your event, in `key:value` format. example: ["team:A"] items: description: Tag associated with your event. type: string type: array timestamp: - description: Timestamp of your event. + description: Timestamp of your event, in ISO 8601 format. example: "2019-01-02T09:42:36.320Z" format: date-time type: string @@ -102935,7 +103007,7 @@ components: $ref: "#/components/schemas/RUMEventProcessingState" type: object RUMEventProcessingState: - description: Configures which RUM events are processed and stored for the application. + description: Configures which RUM events are processed and stored for the application. Defaults to `ALL` when creating an application. enum: - ALL - ERROR_FOCUSED_MODE @@ -102976,8 +103048,8 @@ components: description: A group-by rule. properties: facet: - description: The name of the facet to use (required). - example: "@view.time_spent" + description: The attribute to group by, for example `@view.name` or `@session.type` (required). + example: "@view.name" type: string histogram: $ref: "#/components/schemas/RUMGroupByHistogram" @@ -103025,7 +103097,7 @@ components: - max type: object RUMGroupByMissing: - description: The value to use for logs that don't have the facet used to group by. + description: The value to use for events that don't have the facet used to group by. oneOf: - $ref: "#/components/schemas/RUMGroupByMissingString" - $ref: "#/components/schemas/RUMGroupByMissingNumber" @@ -103638,7 +103710,9 @@ components: $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" type: object RUMProductAnalyticsRetentionState: - description: Controls the retention policy for Product Analytics data derived from RUM events. + description: |- + Controls the retention policy for Product Analytics data derived from RUM events. + Requests also accept `PREVIEW` (the initial state of a new application, reported as `NONE` in responses). Setting `MAX` requires the `product_analytics_apps_write` permission. enum: - MAX - NONE @@ -103663,17 +103737,20 @@ components: properties: from: default: "now-15m" - description: The minimum time for the requested events; supports date (in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). + description: |- + The minimum time for the requested events, inclusive. Accepts date math relative to now (for example `now-15m`, `now-1h`, `now-7d`), an absolute date in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator (seconds and fractional seconds are optional), or a timestamp in milliseconds since the Unix epoch. example: "now-15m" type: string query: default: "*" - description: The search query following the RUM search syntax. + description: |- + The search query following the [RUM search syntax](https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/). Filter on attributes with `@attribute:value`, for example `@type:view @application.id: @view.name:"/checkout"`, and combine terms with `AND`, `OR` and `-` (negation). Event types are `session`, `view`, `action`, `resource`, `error`, `long_task` and `vital`. example: "@type:session AND @session.type:user" type: string to: default: "now" - description: The maximum time for the requested events; supports date (in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). + description: |- + The maximum time for the requested events. Accepts the same formats as `from`. example: "now" type: string type: object @@ -103698,12 +103775,12 @@ components: properties: cursor: description: |- - List following results with a cursor provided in the previous query. + Cursor to get the next page of results, taken from `meta.page.after` of the previous response. Send it with the same `filter` and `sort` as the request that returned it. example: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" type: string limit: default: 10 - description: Maximum number of events in the response. + description: Maximum number of events in the response. Between 1 and 1000. example: 25 format: int32 maximum: 1000 @@ -103714,9 +103791,9 @@ components: properties: next: description: |- - Link for the next set of results. Note that the request can also be made using the - POST endpoint. - example: "https://app.datadoghq.com/api/v2/rum/event?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" + Link for the next set of results, only present when there are more results. It always points to the `GET /api/v2/rum/events` endpoint, and keeps `filter[query]`, `filter[from]`, `filter[to]`, `sort` and `page[limit]` of the request. Note that the request can also be made using the + POST endpoint with `page.cursor` set to `meta.page.after`. + example: "https://api.datadoghq.com/api/v2/rum/events?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" type: string type: object RUMResponseMetadata: @@ -103748,18 +103825,19 @@ components: properties: after: description: |- - The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]`. + The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]` (`page.cursor` for the POST endpoint). Absent on the last page. example: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" type: string type: object RUMResponseStatus: - description: The status of the response. + description: The status of the response. `timeout` means the query did not complete in time and the results are partial. enum: ["done", "timeout"] example: "done" type: string x-enum-varnames: ["DONE", "TIMEOUT"] RUMSearchEventsRequest: - description: The request for a RUM events list. + description: |- + The request for a RUM events list. All attributes are optional: without any, the request returns the first 10 events of the last 15 minutes. properties: filter: $ref: "#/components/schemas/RUMQueryFilter" @@ -103776,6 +103854,9 @@ components: - timestamp - -timestamp type: string + x-enum-descriptions: + - Oldest events first + - Newest events first x-enum-varnames: - TIMESTAMP_ASCENDING - TIMESTAMP_DESCENDING @@ -220437,7 +220518,11 @@ paths: /api/v2/rum/analytics/aggregate: post: description: |- - The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. + Aggregate RUM events into buckets of computed metrics and timeseries. Use this endpoint for counts, percentiles, top-N breakdowns and timeseries. To read individual events, use `SearchRUMEvents` or `ListRUMEvents`. + + `filter` selects the events with the [RUM search syntax][1] and a time range (`from` and `to` accept date math such as `now-15m`, ISO 8601 dates and timestamps in milliseconds). Each `compute` rule produces one value (`type: total`) or one list of time points (`type: timeseries`) per bucket, keyed `c0`, `c1`... in the response. Each `group_by` rule splits the events into buckets by a facet, returned in `by`. Use `histogram` on a numeric facet to bucket it by ranges. + + [1]: https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/ operationId: AggregateRUMEvents requestBody: content: @@ -220468,6 +220553,22 @@ paths: page: cursor: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== limit: 25 + top_views_by_count: + summary: Top 10 views by number of view events + value: + compute: + - aggregation: count + filter: + from: now-1d + query: "@type:view @application.id:abcd1234-0000-0000-abcd-1234abcd5678" + to: now + group_by: + - facet: "@view.name" + limit: 10 + sort: + aggregation: count + order: desc + type: measure schema: $ref: "#/components/schemas/RUMAggregateRequest" required: true @@ -220507,8 +220608,48 @@ paths: - rum_apps_read /api/v2/rum/applications: get: - description: List all the RUM applications in your organization. + description: |- + List the enabled RUM applications of your organization. Applications deleted with `DeleteRUMApplication` are not returned. + The response is not paginated and does not include the `client_token`, use `GetRUMApplication` to retrieve it. + Use the `application_id` of an item as the `id` path parameter of the other application operations, and as `@application.id` in RUM event queries. operationId: GetRUMApplications + parameters: + - description: Only return applications for which RUM event processing is enabled (`true`) or not (`false`). + in: query + name: filter[rum_enabled] + required: false + schema: + type: boolean + - description: Only return applications for which Product Analytics is enabled (`true`) or not (`false`). + in: query + name: filter[product_analytics_enabled] + required: false + schema: + type: boolean + - description: Only return applications that run in error focused mode (`true`) or not (`false`). + in: query + name: filter[error_focused_mode_enabled] + required: false + schema: + type: boolean + - description: Only return applications that have an SDK remote configuration (`true`) or not (`false`). + in: query + name: filter[remote_config_enabled] + required: false + schema: + type: boolean + - description: Only return applications with this RUM event processing state. + in: query + name: filter[rum_event_processing_state] + required: false + schema: + $ref: "#/components/schemas/RUMEventProcessingState" + - description: Only return applications with this Product Analytics retention state. + in: query + name: filter[product_analytics_retention_state] + required: false + schema: + $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" responses: "200": content: @@ -220531,6 +220672,12 @@ paths: schema: $ref: "#/components/schemas/RUMApplicationsResponse" description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "404": $ref: "#/components/responses/NotFoundResponse" "429": @@ -220542,7 +220689,10 @@ paths: permissions: - rum_apps_read post: - description: Create a new RUM application in your organization. + description: |- + Create a new RUM application in your organization. + The application ID is generated by Datadog and returned in `data.attributes.application_id`. A client token is created with the application and returned in `data.attributes.client_token`, use both to initialize the RUM SDK. + The application is created with the default retention filters unless `create_default_retention_filters` is `false`. operationId: CreateRUMApplication requestBody: content: @@ -220584,7 +220734,23 @@ paths: $ref: "#/components/schemas/RUMApplicationResponse" description: Created "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict "429": $ref: "#/components/responses/TooManyRequestsResponse" summary: Create a new RUM application @@ -221256,18 +221422,36 @@ paths: x-codegen-request-body-name: body /api/v2/rum/applications/{id}: delete: - description: Delete an existing RUM application in your organization. + description: |- + Delete an existing RUM application in your organization. + The application is disabled and its client token is revoked, so the RUM SDK stops sending events for it. The application ID cannot be reused or re-enabled through the API. + Deleting an application with Product Analytics enabled requires the `product_analytics_apps_write` permission. operationId: DeleteRUMApplication parameters: - - description: RUM application ID. + - description: |- + ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. + example: abcd1234-0000-0000-abcd-1234abcd5678 in: path name: id required: true schema: + pattern: "^[a-zA-Z0-9:-]+$" type: string responses: "204": description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": content: application/json: @@ -221283,14 +221467,19 @@ paths: permissions: - rum_apps_write get: - description: Get the RUM application with given ID in your organization. + description: |- + Get the RUM application with given ID in your organization. + Unlike `GetRUMApplications`, the response includes the `client_token` used to initialize the RUM SDK. operationId: GetRUMApplication parameters: - - description: RUM application ID. + - description: |- + ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. + example: abcd1234-0000-0000-abcd-1234abcd5678 in: path name: id required: true schema: + pattern: "^[a-zA-Z0-9:-]+$" type: string responses: "200": @@ -221315,6 +221504,18 @@ paths: schema: $ref: "#/components/schemas/RUMApplicationResponse" description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": content: application/json: @@ -221330,14 +221531,19 @@ paths: permissions: - rum_apps_read patch: - description: Update the RUM application with given ID in your organization. + description: |- + Update the RUM application with given ID in your organization. + This is a partial update: only the attributes present in the request are changed. `data.id` must match the `id` path parameter. operationId: UpdateRUMApplication parameters: - - description: RUM application ID. + - description: |- + ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. + example: abcd1234-0000-0000-abcd-1234abcd5678 in: path name: id required: true schema: + pattern: "^[a-zA-Z0-9:-]+$" type: string requestBody: content: @@ -221380,7 +221586,17 @@ paths: $ref: "#/components/schemas/RUMApplicationResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": content: application/json: @@ -221391,8 +221607,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Unprocessable Entity. + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter. "429": $ref: "#/components/responses/TooManyRequestsResponse" summary: Update a RUM application @@ -222302,52 +222518,52 @@ paths: /api/v2/rum/events: get: description: |- - List endpoint returns events that match a RUM search query. - [Results are paginated][1]. + Returns the RUM events that match a RUM search query within a time range. Use this endpoint to see your latest RUM events with a simple query. For long filters, use `SearchRUMEvents`. To compute counts, percentiles or timeseries, use `AggregateRUMEvents`. + + The query follows the [RUM search syntax][2]. Without `filter[from]` and `filter[to]`, the last 15 minutes are searched. - Use this endpoint to see your latest RUM events. + [Results are paginated][1]: `page[limit]` is at most 1000 (default 10). When more results are available, the response contains `meta.page.after` and `links.next`. Request `links.next`, or send `meta.page.after` as `page[cursor]` with the same other parameters, and repeat until they are absent. [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + [2]: https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/ operationId: ListRUMEvents parameters: - - description: Search query following RUM syntax. - example: "@type:session @application_id:xxxx" + - description: Search query following the [RUM search syntax](https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/). Defaults to `*`. + example: "@type:session @application.id:abcd1234-0000-0000-abcd-1234abcd5678" in: query name: filter[query] required: false schema: type: string - - description: Minimum timestamp for requested events. - example: "2019-01-02T09:42:36.320Z" + - description: Minimum time for requested events, inclusive. Accepts date math (for example `now-15m`), an ISO 8601 date, or a timestamp in milliseconds. Defaults to `now-15m`. + example: "now-1h" in: query name: filter[from] required: false schema: - format: date-time type: string - - description: Maximum timestamp for requested events. - example: "2019-01-03T09:42:36.320Z" + - description: Maximum time for requested events. Accepts the same formats as `filter[from]`. Defaults to `now`. + example: "now" in: query name: filter[to] required: false schema: - format: date-time type: string - - description: Order of events in results. + - description: Order of events in results, by event timestamp. in: query name: sort required: false schema: $ref: "#/components/schemas/RUMSort" - description: |- - List following results with a cursor provided in the previous query. + Cursor to get the next page of results, taken from `meta.page.after` or `links.next` of the previous response. Use it with the same other parameters. example: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" in: query name: page[cursor] required: false schema: type: string - - description: Maximum number of events in the response. + - description: Maximum number of events in the response. Between 1 and 1000. example: 25 in: query name: page[limit] @@ -222393,12 +222609,14 @@ paths: /api/v2/rum/events/search: post: description: |- - List endpoint returns RUM events that match a RUM search query. - [Results are paginated][1]. + Returns the RUM events that match a RUM search query within a time range, as a list of individual events. Use this endpoint when the filter is too long for a query string, or to set `options`. To compute counts, percentiles or timeseries instead of reading events, use `AggregateRUMEvents`. + + The query follows the [RUM search syntax][2]. `filter.from` and `filter.to` accept date math (`now-15m`), ISO 8601 dates and timestamps in milliseconds. - Use this endpoint to build complex RUM events filtering and search. + [Results are paginated][1]: `page.limit` is at most 1000 (default 10). When more results are available, the response contains `meta.page.after`. Send it as `page.cursor`, with the same `filter` and `sort`, to get the next page, and repeat until `meta.page.after` is absent. [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + [2]: https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/ operationId: SearchRUMEvents requestBody: content: @@ -222416,6 +222634,16 @@ paths: cursor: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== limit: 25 sort: timestamp + latest_errors: + summary: Newest errors of an application in the last hour + value: + filter: + from: now-1h + query: "@type:error @application.id:abcd1234-0000-0000-abcd-1234abcd5678" + to: now + page: + limit: 50 + sort: -timestamp schema: $ref: "#/components/schemas/RUMSearchEventsRequest" required: true diff --git a/src/datadog_api_client/v2/api/rum_api.py b/src/datadog_api_client/v2/api/rum_api.py index 2745cb3e20..4afef4235d 100644 --- a/src/datadog_api_client/v2/api/rum_api.py +++ b/src/datadog_api_client/v2/api/rum_api.py @@ -9,7 +9,6 @@ from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration from datadog_api_client.model_utils import ( - datetime, set_attribute_from_path, get_attribute_from_path, UnsetType, @@ -19,6 +18,8 @@ from datadog_api_client.v2.model.rum_analytics_aggregate_response import RUMAnalyticsAggregateResponse from datadog_api_client.v2.model.rum_aggregate_request import RUMAggregateRequest from datadog_api_client.v2.model.rum_applications_response import RUMApplicationsResponse +from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState +from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState from datadog_api_client.v2.model.rum_application_response import RUMApplicationResponse from datadog_api_client.v2.model.rum_application_create_request import RUMApplicationCreateRequest from datadog_api_client.v2.model.rum_application_update_request import RUMApplicationUpdateRequest @@ -97,6 +98,7 @@ def __init__(self, api_client=None): params_map={ "id": { "required": True, + "validation": {}, "openapi_types": (str,), "attribute": "id", "location": "path", @@ -252,6 +254,7 @@ def __init__(self, api_client=None): params_map={ "id": { "required": True, + "validation": {}, "openapi_types": (str,), "attribute": "id", "location": "path", @@ -272,7 +275,38 @@ def __init__(self, api_client=None): "http_method": "GET", "version": "v2", }, - params_map={}, + params_map={ + "filter_rum_enabled": { + "openapi_types": (bool,), + "attribute": "filter[rum_enabled]", + "location": "query", + }, + "filter_product_analytics_enabled": { + "openapi_types": (bool,), + "attribute": "filter[product_analytics_enabled]", + "location": "query", + }, + "filter_error_focused_mode_enabled": { + "openapi_types": (bool,), + "attribute": "filter[error_focused_mode_enabled]", + "location": "query", + }, + "filter_remote_config_enabled": { + "openapi_types": (bool,), + "attribute": "filter[remote_config_enabled]", + "location": "query", + }, + "filter_rum_event_processing_state": { + "openapi_types": (RUMEventProcessingState,), + "attribute": "filter[rum_event_processing_state]", + "location": "query", + }, + "filter_product_analytics_retention_state": { + "openapi_types": (RUMProductAnalyticsRetentionState,), + "attribute": "filter[product_analytics_retention_state]", + "location": "query", + }, + }, headers_map={ "accept": ["application/json"], }, @@ -352,12 +386,12 @@ def __init__(self, api_client=None): "location": "query", }, "filter_from": { - "openapi_types": (datetime,), + "openapi_types": (str,), "attribute": "filter[from]", "location": "query", }, "filter_to": { - "openapi_types": (datetime,), + "openapi_types": (str,), "attribute": "filter[to]", "location": "query", }, @@ -701,6 +735,7 @@ def __init__(self, api_client=None): params_map={ "id": { "required": True, + "validation": {}, "openapi_types": (str,), "attribute": "id", "location": "path", @@ -721,7 +756,9 @@ def aggregate_rum_events( ) -> RUMAnalyticsAggregateResponse: """Aggregate RUM events. - The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. + Aggregate RUM events into buckets of computed metrics and timeseries. Use this endpoint for counts, percentiles, top-N breakdowns and timeseries. To read individual events, use ``SearchRUMEvents`` or ``ListRUMEvents``. + + ``filter`` selects the events with the `RUM search syntax `_ and a time range ( ``from`` and ``to`` accept date math such as ``now-15m`` , ISO 8601 dates and timestamps in milliseconds). Each ``compute`` rule produces one value ( ``type: total`` ) or one list of time points ( ``type: timeseries`` ) per bucket, keyed ``c0`` , ``c1``... in the response. Each ``group_by`` rule splits the events into buckets by a facet, returned in ``by``. Use ``histogram`` on a numeric facet to bucket it by ranges. :type body: RUMAggregateRequest :rtype: RUMAnalyticsAggregateResponse @@ -738,6 +775,8 @@ def create_rum_application( """Create a new RUM application. Create a new RUM application in your organization. + The application ID is generated by Datadog and returned in ``data.attributes.application_id``. A client token is created with the application and returned in ``data.attributes.client_token`` , use both to initialize the RUM SDK. + The application is created with the default retention filters unless ``create_default_retention_filters`` is ``false``. :type body: RUMApplicationCreateRequest :rtype: RUMApplicationResponse @@ -754,8 +793,10 @@ def delete_rum_application( """Delete a RUM application. Delete an existing RUM application in your organization. + The application is disabled and its client token is revoked, so the RUM SDK stops sending events for it. The application ID cannot be reused or re-enabled through the API. + Deleting an application with Product Analytics enabled requires the ``product_analytics_apps_write`` permission. - :param id: RUM application ID. + :param id: ID of the RUM application, returned as ``application_id`` by ``GetRUMApplications`` and ``CreateRUMApplication``. :type id: str :rtype: None """ @@ -910,8 +951,9 @@ def get_rum_application( """Get a RUM application. Get the RUM application with given ID in your organization. + Unlike ``GetRUMApplications`` , the response includes the ``client_token`` used to initialize the RUM SDK. - :param id: RUM application ID. + :param id: ID of the RUM application, returned as ``application_id`` by ``GetRUMApplications`` and ``CreateRUMApplication``. :type id: str :rtype: RUMApplicationResponse """ @@ -922,14 +964,53 @@ def get_rum_application( def get_rum_applications( self, + *, + filter_rum_enabled: Union[bool, UnsetType] = unset, + filter_product_analytics_enabled: Union[bool, UnsetType] = unset, + filter_error_focused_mode_enabled: Union[bool, UnsetType] = unset, + filter_remote_config_enabled: Union[bool, UnsetType] = unset, + filter_rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset, + filter_product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset, ) -> RUMApplicationsResponse: """List all the RUM applications. - List all the RUM applications in your organization. - + List the enabled RUM applications of your organization. Applications deleted with ``DeleteRUMApplication`` are not returned. + The response is not paginated and does not include the ``client_token`` , use ``GetRUMApplication`` to retrieve it. + Use the ``application_id`` of an item as the ``id`` path parameter of the other application operations, and as ``@application.id`` in RUM event queries. + + :param filter_rum_enabled: Only return applications for which RUM event processing is enabled ( ``true`` ) or not ( ``false`` ). + :type filter_rum_enabled: bool, optional + :param filter_product_analytics_enabled: Only return applications for which Product Analytics is enabled ( ``true`` ) or not ( ``false`` ). + :type filter_product_analytics_enabled: bool, optional + :param filter_error_focused_mode_enabled: Only return applications that run in error focused mode ( ``true`` ) or not ( ``false`` ). + :type filter_error_focused_mode_enabled: bool, optional + :param filter_remote_config_enabled: Only return applications that have an SDK remote configuration ( ``true`` ) or not ( ``false`` ). + :type filter_remote_config_enabled: bool, optional + :param filter_rum_event_processing_state: Only return applications with this RUM event processing state. + :type filter_rum_event_processing_state: RUMEventProcessingState, optional + :param filter_product_analytics_retention_state: Only return applications with this Product Analytics retention state. + :type filter_product_analytics_retention_state: RUMProductAnalyticsRetentionState, optional :rtype: RUMApplicationsResponse """ kwargs: Dict[str, Any] = {} + if filter_rum_enabled is not unset: + kwargs["filter_rum_enabled"] = filter_rum_enabled + + if filter_product_analytics_enabled is not unset: + kwargs["filter_product_analytics_enabled"] = filter_product_analytics_enabled + + if filter_error_focused_mode_enabled is not unset: + kwargs["filter_error_focused_mode_enabled"] = filter_error_focused_mode_enabled + + if filter_remote_config_enabled is not unset: + kwargs["filter_remote_config_enabled"] = filter_remote_config_enabled + + if filter_rum_event_processing_state is not unset: + kwargs["filter_rum_event_processing_state"] = filter_rum_event_processing_state + + if filter_product_analytics_retention_state is not unset: + kwargs["filter_product_analytics_retention_state"] = filter_product_analytics_retention_state + return self._get_rum_applications_endpoint.call_with_http_info(**kwargs) def get_service_repository_info( @@ -1022,30 +1103,31 @@ def list_rum_events( self, *, filter_query: Union[str, UnsetType] = unset, - filter_from: Union[datetime, UnsetType] = unset, - filter_to: Union[datetime, UnsetType] = unset, + filter_from: Union[str, UnsetType] = unset, + filter_to: Union[str, UnsetType] = unset, sort: Union[RUMSort, UnsetType] = unset, page_cursor: Union[str, UnsetType] = unset, page_limit: Union[int, UnsetType] = unset, ) -> RUMEventsResponse: """Get a list of RUM events. - List endpoint returns events that match a RUM search query. - `Results are paginated `_. + Returns the RUM events that match a RUM search query within a time range. Use this endpoint to see your latest RUM events with a simple query. For long filters, use ``SearchRUMEvents``. To compute counts, percentiles or timeseries, use ``AggregateRUMEvents``. + + The query follows the `RUM search syntax `_. Without ``filter[from]`` and ``filter[to]`` , the last 15 minutes are searched. - Use this endpoint to see your latest RUM events. + `Results are paginated `_ : ``page[limit]`` is at most 1000 (default 10). When more results are available, the response contains ``meta.page.after`` and ``links.next``. Request ``links.next`` , or send ``meta.page.after`` as ``page[cursor]`` with the same other parameters, and repeat until they are absent. - :param filter_query: Search query following RUM syntax. + :param filter_query: Search query following the `RUM search syntax `_. Defaults to ``*``. :type filter_query: str, optional - :param filter_from: Minimum timestamp for requested events. - :type filter_from: datetime, optional - :param filter_to: Maximum timestamp for requested events. - :type filter_to: datetime, optional - :param sort: Order of events in results. + :param filter_from: Minimum time for requested events, inclusive. Accepts date math (for example ``now-15m`` ), an ISO 8601 date, or a timestamp in milliseconds. Defaults to ``now-15m``. + :type filter_from: str, optional + :param filter_to: Maximum time for requested events. Accepts the same formats as ``filter[from]``. Defaults to ``now``. + :type filter_to: str, optional + :param sort: Order of events in results, by event timestamp. :type sort: RUMSort, optional - :param page_cursor: List following results with a cursor provided in the previous query. + :param page_cursor: Cursor to get the next page of results, taken from ``meta.page.after`` or ``links.next`` of the previous response. Use it with the same other parameters. :type page_cursor: str, optional - :param page_limit: Maximum number of events in the response. + :param page_limit: Maximum number of events in the response. Between 1 and 1000. :type page_limit: int, optional :rtype: RUMEventsResponse """ @@ -1074,8 +1156,8 @@ def list_rum_events_with_pagination( self, *, filter_query: Union[str, UnsetType] = unset, - filter_from: Union[datetime, UnsetType] = unset, - filter_to: Union[datetime, UnsetType] = unset, + filter_from: Union[str, UnsetType] = unset, + filter_to: Union[str, UnsetType] = unset, sort: Union[RUMSort, UnsetType] = unset, page_cursor: Union[str, UnsetType] = unset, page_limit: Union[int, UnsetType] = unset, @@ -1084,17 +1166,17 @@ def list_rum_events_with_pagination( Provide a paginated version of :meth:`list_rum_events`, returning all items. - :param filter_query: Search query following RUM syntax. + :param filter_query: Search query following the `RUM search syntax `_. Defaults to ``*``. :type filter_query: str, optional - :param filter_from: Minimum timestamp for requested events. - :type filter_from: datetime, optional - :param filter_to: Maximum timestamp for requested events. - :type filter_to: datetime, optional - :param sort: Order of events in results. + :param filter_from: Minimum time for requested events, inclusive. Accepts date math (for example ``now-15m`` ), an ISO 8601 date, or a timestamp in milliseconds. Defaults to ``now-15m``. + :type filter_from: str, optional + :param filter_to: Maximum time for requested events. Accepts the same formats as ``filter[from]``. Defaults to ``now``. + :type filter_to: str, optional + :param sort: Order of events in results, by event timestamp. :type sort: RUMSort, optional - :param page_cursor: List following results with a cursor provided in the previous query. + :param page_cursor: Cursor to get the next page of results, taken from ``meta.page.after`` or ``links.next`` of the previous response. Use it with the same other parameters. :type page_cursor: str, optional - :param page_limit: Maximum number of events in the response. + :param page_limit: Maximum number of events in the response. Between 1 and 1000. :type page_limit: int, optional :return: A generator of paginated results. @@ -1524,10 +1606,11 @@ def search_rum_events( ) -> RUMEventsResponse: """Search RUM events. - List endpoint returns RUM events that match a RUM search query. - `Results are paginated `_. + Returns the RUM events that match a RUM search query within a time range, as a list of individual events. Use this endpoint when the filter is too long for a query string, or to set ``options``. To compute counts, percentiles or timeseries instead of reading events, use ``AggregateRUMEvents``. + + The query follows the `RUM search syntax `_. ``filter.from`` and ``filter.to`` accept date math ( ``now-15m`` ), ISO 8601 dates and timestamps in milliseconds. - Use this endpoint to build complex RUM events filtering and search. + `Results are paginated `_ : ``page.limit`` is at most 1000 (default 10). When more results are available, the response contains ``meta.page.after``. Send it as ``page.cursor`` , with the same ``filter`` and ``sort`` , to get the next page, and repeat until ``meta.page.after`` is absent. :type body: RUMSearchEventsRequest :rtype: RUMEventsResponse @@ -1574,8 +1657,9 @@ def update_rum_application( """Update a RUM application. Update the RUM application with given ID in your organization. + This is a partial update: only the attributes present in the request are changed. ``data.id`` must match the ``id`` path parameter. - :param id: RUM application ID. + :param id: ID of the RUM application, returned as ``application_id`` by ``GetRUMApplications`` and ``CreateRUMApplication``. :type id: str :type body: RUMApplicationUpdateRequest :rtype: RUMApplicationResponse diff --git a/src/datadog_api_client/v2/model/rum_aggregate_request.py b/src/datadog_api_client/v2/model/rum_aggregate_request.py index f88371eea1..36a4698697 100644 --- a/src/datadog_api_client/v2/model/rum_aggregate_request.py +++ b/src/datadog_api_client/v2/model/rum_aggregate_request.py @@ -57,6 +57,7 @@ def __init__( ): """ The object sent with the request to retrieve aggregation buckets of RUM events from your organization. + ``filter.indexes`` is not supported and ignored. :param compute: The list of metrics or timeseries to compute for the retrieved buckets. :type compute: [RUMCompute], optional diff --git a/src/datadog_api_client/v2/model/rum_aggregate_sort.py b/src/datadog_api_client/v2/model/rum_aggregate_sort.py index 67ef63b846..f154f9f4ee 100644 --- a/src/datadog_api_client/v2/model/rum_aggregate_sort.py +++ b/src/datadog_api_client/v2/model/rum_aggregate_sort.py @@ -51,7 +51,7 @@ def __init__( """ A sort rule. - :param aggregation: An aggregation function. + :param aggregation: An aggregation function. ``count`` counts events and needs no metric. ``cardinality`` counts the distinct values of the metric. ``sum`` , ``min`` , ``max`` , ``avg`` , ``median`` and the percentiles ( ``pc75`` to ``pc99`` ) apply to a numeric metric such as ``@view.loading_time``. :type aggregation: RUMAggregationFunction, optional :param metric: The metric to sort by (only used for ``type=measure`` ). @@ -60,7 +60,7 @@ def __init__( :param order: The order to use, ascending or descending. :type order: RUMSortOrder, optional - :param type: The type of sorting algorithm. + :param type: The type of sorting algorithm. ``alphabetical`` sorts buckets by the facet value, ``measure`` sorts them by a computed aggregation. :type type: RUMAggregateSortType, optional """ if aggregation is not unset: diff --git a/src/datadog_api_client/v2/model/rum_aggregate_sort_type.py b/src/datadog_api_client/v2/model/rum_aggregate_sort_type.py index 966ff09fe5..24875cd52c 100644 --- a/src/datadog_api_client/v2/model/rum_aggregate_sort_type.py +++ b/src/datadog_api_client/v2/model/rum_aggregate_sort_type.py @@ -14,7 +14,7 @@ class RUMAggregateSortType(ModelSimple): """ - The type of sorting algorithm. + The type of sorting algorithm. `alphabetical` sorts buckets by the facet value, `measure` sorts them by a computed aggregation. :param value: If omitted defaults to "alphabetical". Must be one of ["alphabetical", "measure"]. :type value: str diff --git a/src/datadog_api_client/v2/model/rum_aggregation_function.py b/src/datadog_api_client/v2/model/rum_aggregation_function.py index 8e35051d7c..8a38dc6ecd 100644 --- a/src/datadog_api_client/v2/model/rum_aggregation_function.py +++ b/src/datadog_api_client/v2/model/rum_aggregation_function.py @@ -14,7 +14,7 @@ class RUMAggregationFunction(ModelSimple): """ - An aggregation function. + An aggregation function. `count` counts events and needs no metric. `cardinality` counts the distinct values of the metric. `sum`, `min`, `max`, `avg`, `median` and the percentiles (`pc75` to `pc99`) apply to a numeric metric such as `@view.loading_time`. :param value: Must be one of ["count", "cardinality", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg", "median"]. :type value: str diff --git a/src/datadog_api_client/v2/model/rum_application_attributes.py b/src/datadog_api_client/v2/model/rum_application_attributes.py index b9858c3741..ae8e48a94c 100644 --- a/src/datadog_api_client/v2/model/rum_application_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_attributes.py @@ -188,7 +188,7 @@ def __init__( :param tags: List of tags associated with the RUM application. :type tags: [str], optional - :param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``. + :param type: Type of the RUM application. Possible values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform`` , ``react`` , ``nextjs`` , ``angular`` , ``vuejs`` , ``nuxt`` , ``tanstack`` , ``maui`` , ``salesforce-lwc`` , ``shopify`` , ``cpp`` , ``rum-cpp`` , ``unreal``. :type type: str :param updated_at: Timestamp in ms of the last update date. diff --git a/src/datadog_api_client/v2/model/rum_application_create.py b/src/datadog_api_client/v2/model/rum_application_create.py index 433d751f68..28234d8061 100644 --- a/src/datadog_api_client/v2/model/rum_application_create.py +++ b/src/datadog_api_client/v2/model/rum_application_create.py @@ -37,6 +37,7 @@ def __init__(self_, attributes: RUMApplicationCreateAttributes, type: RUMApplica RUM application creation. :param attributes: RUM application creation attributes. + When ``rum_event_processing_state`` is omitted, it defaults to ``ALL``. When ``product_analytics_retention_state`` is omitted, Product Analytics is not enabled. Setting it to ``MAX`` requires the ``product_analytics_apps_write`` permission. :type attributes: RUMApplicationCreateAttributes :param type: RUM application creation type. diff --git a/src/datadog_api_client/v2/model/rum_application_create_attributes.py b/src/datadog_api_client/v2/model/rum_application_create_attributes.py index 626ee5fbc2..ab4596cf3a 100644 --- a/src/datadog_api_client/v2/model/rum_application_create_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_create_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -19,62 +19,113 @@ class RUMApplicationCreateAttributes(ModelNormal): + validations = { + "name": { + "max_length": 255, + }, + "product_analytics_replay_sample_rate": { + "inclusive_maximum": 2147483647, + }, + } + @cached_property def openapi_types(_): from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState return { + "apm_rum_flat_sampling_replay_enabled": (bool,), + "apm_rum_flat_sampling_replay_sample_rate": (float,), "create_default_retention_filters": (bool,), + "error_tracking_exclusion_filter_enabled": (bool,), "name": (str,), + "product_analytics_replay_sample_rate": (int,), "product_analytics_retention_state": (RUMProductAnalyticsRetentionState,), "rum_event_processing_state": (RUMEventProcessingState,), + "tags": ([str],), "type": (str,), } attribute_map = { + "apm_rum_flat_sampling_replay_enabled": "apm_rum_flat_sampling_replay_enabled", + "apm_rum_flat_sampling_replay_sample_rate": "apm_rum_flat_sampling_replay_sample_rate", "create_default_retention_filters": "create_default_retention_filters", + "error_tracking_exclusion_filter_enabled": "error_tracking_exclusion_filter_enabled", "name": "name", + "product_analytics_replay_sample_rate": "product_analytics_replay_sample_rate", "product_analytics_retention_state": "product_analytics_retention_state", "rum_event_processing_state": "rum_event_processing_state", + "tags": "tags", "type": "type", } def __init__( self_, name: str, + apm_rum_flat_sampling_replay_enabled: Union[bool, UnsetType] = unset, + apm_rum_flat_sampling_replay_sample_rate: Union[float, UnsetType] = unset, create_default_retention_filters: Union[bool, UnsetType] = unset, + error_tracking_exclusion_filter_enabled: Union[bool, UnsetType] = unset, + product_analytics_replay_sample_rate: Union[int, UnsetType] = unset, product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset, rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, type: Union[str, UnsetType] = unset, **kwargs, ): """ RUM application creation attributes. + When ``rum_event_processing_state`` is omitted, it defaults to ``ALL``. When ``product_analytics_retention_state`` is omitted, Product Analytics is not enabled. Setting it to ``MAX`` requires the ``product_analytics_apps_write`` permission. + + :param apm_rum_flat_sampling_replay_enabled: Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. Defaults to ``true``. + :type apm_rum_flat_sampling_replay_enabled: bool, optional + + :param apm_rum_flat_sampling_replay_sample_rate: Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. Defaults to ``1``. + :type apm_rum_flat_sampling_replay_sample_rate: float, optional :param create_default_retention_filters: Whether to create the default retention filters when the application is created: ``Sessions with errors`` and ``Sessions`` , each with a 100% retention rate. Set to ``false`` to create the application without them, for example when you add your own retention filters right after creating it. Until you add retention filters, the application only retains sessions matched by its `permanent retention filters `_. This setting doesn't affect permanent retention filters (sessions with forced replays, Synthetics sessions and RUM-APM flat sampling). :type create_default_retention_filters: bool, optional - :param name: Name of the RUM application. + :param error_tracking_exclusion_filter_enabled: Indicates if Error Tracking exclusion filters are enabled for the application. Defaults to ``false``. + :type error_tracking_exclusion_filter_enabled: bool, optional + + :param name: Name of the RUM application. Between 1 and 255 characters. :type name: str + :param product_analytics_replay_sample_rate: Sample rate (0-100) of Session Replay for Product Analytics sessions. Defaults to ``100``. + :type product_analytics_replay_sample_rate: int, optional + :param product_analytics_retention_state: Controls the retention policy for Product Analytics data derived from RUM events. + Requests also accept ``PREVIEW`` (the initial state of a new application, reported as ``NONE`` in responses). Setting ``MAX`` requires the ``product_analytics_apps_write`` permission. :type product_analytics_retention_state: RUMProductAnalyticsRetentionState, optional - :param rum_event_processing_state: Configures which RUM events are processed and stored for the application. + :param rum_event_processing_state: Configures which RUM events are processed and stored for the application. Defaults to ``ALL`` when creating an application. :type rum_event_processing_state: RUMEventProcessingState, optional - :param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``. + :param tags: List of tags to associate with the RUM application, in ``key:value`` format. + :type tags: [str], optional + + :param type: Type of the RUM application. Defaults to ``browser``. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform`` , ``react`` , ``nextjs`` , ``angular`` , ``vuejs`` , ``nuxt`` , ``tanstack`` , ``maui`` , ``salesforce-lwc`` , ``shopify`` , ``cpp`` , ``rum-cpp`` , ``unreal``. :type type: str, optional """ + if apm_rum_flat_sampling_replay_enabled is not unset: + kwargs["apm_rum_flat_sampling_replay_enabled"] = apm_rum_flat_sampling_replay_enabled + if apm_rum_flat_sampling_replay_sample_rate is not unset: + kwargs["apm_rum_flat_sampling_replay_sample_rate"] = apm_rum_flat_sampling_replay_sample_rate if create_default_retention_filters is not unset: kwargs["create_default_retention_filters"] = create_default_retention_filters + if error_tracking_exclusion_filter_enabled is not unset: + kwargs["error_tracking_exclusion_filter_enabled"] = error_tracking_exclusion_filter_enabled + if product_analytics_replay_sample_rate is not unset: + kwargs["product_analytics_replay_sample_rate"] = product_analytics_replay_sample_rate if product_analytics_retention_state is not unset: kwargs["product_analytics_retention_state"] = product_analytics_retention_state if rum_event_processing_state is not unset: kwargs["rum_event_processing_state"] = rum_event_processing_state + if tags is not unset: + kwargs["tags"] = tags if type is not unset: kwargs["type"] = type super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_application_list_attributes.py b/src/datadog_api_client/v2/model/rum_application_list_attributes.py index 10375cd8ae..23b825c13c 100644 --- a/src/datadog_api_client/v2/model/rum_application_list_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_list_attributes.py @@ -182,7 +182,7 @@ def __init__( :param tags: List of tags associated with the RUM application. :type tags: [str], optional - :param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``. + :param type: Type of the RUM application. Possible values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform`` , ``react`` , ``nextjs`` , ``angular`` , ``vuejs`` , ``nuxt`` , ``tanstack`` , ``maui`` , ``salesforce-lwc`` , ``shopify`` , ``cpp`` , ``rum-cpp`` , ``unreal``. :type type: str :param updated_at: Timestamp in ms of the last update date. diff --git a/src/datadog_api_client/v2/model/rum_application_update.py b/src/datadog_api_client/v2/model/rum_application_update.py index 47bc01a3de..ac7d7e8666 100644 --- a/src/datadog_api_client/v2/model/rum_application_update.py +++ b/src/datadog_api_client/v2/model/rum_application_update.py @@ -46,7 +46,8 @@ def __init__( """ RUM application update. - :param attributes: RUM application update attributes. + :param attributes: RUM application update attributes. Only the attributes you provide are changed, omitted attributes keep their current value. + Changing ``product_analytics_retention_state`` or ``product_analytics_replay_sample_rate`` requires the ``product_analytics_apps_write`` permission. :type attributes: RUMApplicationUpdateAttributes, optional :param id: RUM application ID. diff --git a/src/datadog_api_client/v2/model/rum_application_update_attributes.py b/src/datadog_api_client/v2/model/rum_application_update_attributes.py index fd8543199f..d49a062233 100644 --- a/src/datadog_api_client/v2/model/rum_application_update_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_update_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -19,54 +19,118 @@ class RUMApplicationUpdateAttributes(ModelNormal): + validations = { + "product_analytics_replay_sample_rate": { + "inclusive_maximum": 2147483647, + }, + } + @cached_property def openapi_types(_): from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState return { + "apm_rum_flat_sampling_replay_enabled": (bool,), + "apm_rum_flat_sampling_replay_sample_rate": (float,), + "error_tracking_exclusion_filter_enabled": (bool,), + "instrumentation_type": (str,), "name": (str,), + "product_analytics_replay_sample_rate": (int,), "product_analytics_retention_state": (RUMProductAnalyticsRetentionState,), + "remote_config_id": (str,), "rum_event_processing_state": (RUMEventProcessingState,), + "tags": ([str],), "type": (str,), } attribute_map = { + "apm_rum_flat_sampling_replay_enabled": "apm_rum_flat_sampling_replay_enabled", + "apm_rum_flat_sampling_replay_sample_rate": "apm_rum_flat_sampling_replay_sample_rate", + "error_tracking_exclusion_filter_enabled": "error_tracking_exclusion_filter_enabled", + "instrumentation_type": "instrumentation_type", "name": "name", + "product_analytics_replay_sample_rate": "product_analytics_replay_sample_rate", "product_analytics_retention_state": "product_analytics_retention_state", + "remote_config_id": "remote_config_id", "rum_event_processing_state": "rum_event_processing_state", + "tags": "tags", "type": "type", } def __init__( self_, + apm_rum_flat_sampling_replay_enabled: Union[bool, UnsetType] = unset, + apm_rum_flat_sampling_replay_sample_rate: Union[float, UnsetType] = unset, + error_tracking_exclusion_filter_enabled: Union[bool, UnsetType] = unset, + instrumentation_type: Union[str, UnsetType] = unset, name: Union[str, UnsetType] = unset, + product_analytics_replay_sample_rate: Union[int, UnsetType] = unset, product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset, + remote_config_id: Union[str, UnsetType] = unset, rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, type: Union[str, UnsetType] = unset, **kwargs, ): """ - RUM application update attributes. + RUM application update attributes. Only the attributes you provide are changed, omitted attributes keep their current value. + Changing ``product_analytics_retention_state`` or ``product_analytics_replay_sample_rate`` requires the ``product_analytics_apps_write`` permission. + + :param apm_rum_flat_sampling_replay_enabled: Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. + :type apm_rum_flat_sampling_replay_enabled: bool, optional + + :param apm_rum_flat_sampling_replay_sample_rate: Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. + :type apm_rum_flat_sampling_replay_sample_rate: float, optional + + :param error_tracking_exclusion_filter_enabled: Indicates if Error Tracking exclusion filters are enabled for the application. + :type error_tracking_exclusion_filter_enabled: bool, optional - :param name: Name of the RUM application. + :param instrumentation_type: Instrumentation type of the RUM application. + :type instrumentation_type: str, optional + + :param name: New name of the RUM application. :type name: str, optional + :param product_analytics_replay_sample_rate: Sample rate (0-100) of Session Replay for Product Analytics sessions. + :type product_analytics_replay_sample_rate: int, optional + :param product_analytics_retention_state: Controls the retention policy for Product Analytics data derived from RUM events. + Requests also accept ``PREVIEW`` (the initial state of a new application, reported as ``NONE`` in responses). Setting ``MAX`` requires the ``product_analytics_apps_write`` permission. :type product_analytics_retention_state: RUMProductAnalyticsRetentionState, optional - :param rum_event_processing_state: Configures which RUM events are processed and stored for the application. + :param remote_config_id: ID of the RUM SDK remote configuration to associate with the application. + :type remote_config_id: str, optional + + :param rum_event_processing_state: Configures which RUM events are processed and stored for the application. Defaults to ``ALL`` when creating an application. :type rum_event_processing_state: RUMEventProcessingState, optional - :param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``. + :param tags: New list of tags of the RUM application, in ``key:value`` format. Replaces the existing tags. + :type tags: [str], optional + + :param type: New type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform`` , ``react`` , ``nextjs`` , ``angular`` , ``vuejs`` , ``nuxt`` , ``tanstack`` , ``maui`` , ``salesforce-lwc`` , ``shopify`` , ``cpp`` , ``rum-cpp`` , ``unreal``. :type type: str, optional """ + if apm_rum_flat_sampling_replay_enabled is not unset: + kwargs["apm_rum_flat_sampling_replay_enabled"] = apm_rum_flat_sampling_replay_enabled + if apm_rum_flat_sampling_replay_sample_rate is not unset: + kwargs["apm_rum_flat_sampling_replay_sample_rate"] = apm_rum_flat_sampling_replay_sample_rate + if error_tracking_exclusion_filter_enabled is not unset: + kwargs["error_tracking_exclusion_filter_enabled"] = error_tracking_exclusion_filter_enabled + if instrumentation_type is not unset: + kwargs["instrumentation_type"] = instrumentation_type if name is not unset: kwargs["name"] = name + if product_analytics_replay_sample_rate is not unset: + kwargs["product_analytics_replay_sample_rate"] = product_analytics_replay_sample_rate if product_analytics_retention_state is not unset: kwargs["product_analytics_retention_state"] = product_analytics_retention_state + if remote_config_id is not unset: + kwargs["remote_config_id"] = remote_config_id if rum_event_processing_state is not unset: kwargs["rum_event_processing_state"] = rum_event_processing_state + if tags is not unset: + kwargs["tags"] = tags if type is not unset: kwargs["type"] = type super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_compute.py b/src/datadog_api_client/v2/model/rum_compute.py index 84ba89c887..e86e5c62aa 100644 --- a/src/datadog_api_client/v2/model/rum_compute.py +++ b/src/datadog_api_client/v2/model/rum_compute.py @@ -47,19 +47,19 @@ def __init__( **kwargs, ): """ - A compute rule to compute metrics or timeseries. + A compute rule to compute metrics or timeseries. In the response, the result of each rule is keyed ``c0`` , ``c1``... following the order of the ``compute`` list. - :param aggregation: An aggregation function. + :param aggregation: An aggregation function. ``count`` counts events and needs no metric. ``cardinality`` counts the distinct values of the metric. ``sum`` , ``min`` , ``max`` , ``avg`` , ``median`` and the percentiles ( ``pc75`` to ``pc99`` ) apply to a numeric metric such as ``@view.loading_time``. :type aggregation: RUMAggregationFunction - :param interval: The time buckets' size (only used for type=timeseries) - Defaults to a resolution of 150 points. + :param interval: The time buckets' size, for example ``5m`` , ``1h`` or ``1d`` (only used for ``type=timeseries`` ). + Defaults to a resolution of 150 points over the queried time range. :type interval: str, optional - :param metric: The metric to use. + :param metric: The attribute to aggregate, for example ``@view.loading_time``. Not needed for ``count`` , required for the other aggregations. :type metric: str, optional - :param type: The type of compute. + :param type: The type of compute. ``total`` returns one value per bucket, ``timeseries`` returns a list of time points per bucket. :type type: RUMComputeType, optional """ if interval is not unset: diff --git a/src/datadog_api_client/v2/model/rum_compute_type.py b/src/datadog_api_client/v2/model/rum_compute_type.py index 80790427f4..aae007104a 100644 --- a/src/datadog_api_client/v2/model/rum_compute_type.py +++ b/src/datadog_api_client/v2/model/rum_compute_type.py @@ -14,7 +14,7 @@ class RUMComputeType(ModelSimple): """ - The type of compute. + The type of compute. `total` returns one value per bucket, `timeseries` returns a list of time points per bucket. :param value: If omitted defaults to "total". Must be one of ["timeseries", "total"]. :type value: str diff --git a/src/datadog_api_client/v2/model/rum_event_attributes.py b/src/datadog_api_client/v2/model/rum_event_attributes.py index cf3907df82..57d863a9b3 100644 --- a/src/datadog_api_client/v2/model/rum_event_attributes.py +++ b/src/datadog_api_client/v2/model/rum_event_attributes.py @@ -60,7 +60,8 @@ def __init__( """ JSON object containing all event attributes and their associated values. - :param attributes: JSON object of attributes from RUM events. + :param attributes: JSON object of attributes from RUM events. Attributes are nested by path: the facet ``@view.name`` used in queries is returned as ``attributes.view.name``. + Common attributes include ``type`` (the event type: ``session`` , ``view`` , ``action`` , ``resource`` , ``error`` , ``long_task`` or ``vital`` ), ``application.id`` , ``session.id`` , ``view.id`` , ``view.name`` and ``usr.id``. Durations such as ``view.time_spent`` , ``view.loading_time`` and ``resource.duration`` are in nanoseconds. :type attributes: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional :param service: The name of the application or service generating RUM events. @@ -68,10 +69,10 @@ def __init__( value when you use both products. :type service: str, optional - :param tags: Array of tags associated with your event. + :param tags: Array of tags associated with your event, in ``key:value`` format. :type tags: [str], optional - :param timestamp: Timestamp of your event. + :param timestamp: Timestamp of your event, in ISO 8601 format. :type timestamp: datetime, optional """ if attributes is not unset: diff --git a/src/datadog_api_client/v2/model/rum_event_processing_scale.py b/src/datadog_api_client/v2/model/rum_event_processing_scale.py index 73d162889a..39e7d6cefe 100644 --- a/src/datadog_api_client/v2/model/rum_event_processing_scale.py +++ b/src/datadog_api_client/v2/model/rum_event_processing_scale.py @@ -44,7 +44,7 @@ def __init__( :param last_modified_at: Timestamp in milliseconds when this scale was last modified. :type last_modified_at: int, optional - :param state: Configures which RUM events are processed and stored for the application. + :param state: Configures which RUM events are processed and stored for the application. Defaults to ``ALL`` when creating an application. :type state: RUMEventProcessingState, optional """ if last_modified_at is not unset: diff --git a/src/datadog_api_client/v2/model/rum_event_processing_state.py b/src/datadog_api_client/v2/model/rum_event_processing_state.py index bf341176eb..92e48add6d 100644 --- a/src/datadog_api_client/v2/model/rum_event_processing_state.py +++ b/src/datadog_api_client/v2/model/rum_event_processing_state.py @@ -14,7 +14,7 @@ class RUMEventProcessingState(ModelSimple): """ - Configures which RUM events are processed and stored for the application. + Configures which RUM events are processed and stored for the application. Defaults to `ALL` when creating an application. :param value: Must be one of ["ALL", "ERROR_FOCUSED_MODE", "NONE"]. :type value: str diff --git a/src/datadog_api_client/v2/model/rum_group_by.py b/src/datadog_api_client/v2/model/rum_group_by.py index 89d94e4307..1b62967c27 100644 --- a/src/datadog_api_client/v2/model/rum_group_by.py +++ b/src/datadog_api_client/v2/model/rum_group_by.py @@ -59,7 +59,7 @@ def __init__( """ A group-by rule. - :param facet: The name of the facet to use (required). + :param facet: The attribute to group by, for example ``@view.name`` or ``@session.type`` (required). :type facet: str :param histogram: Used to perform a histogram computation (only for measure facets). @@ -69,7 +69,7 @@ def __init__( :param limit: The maximum buckets to return for this group-by. :type limit: int, optional - :param missing: The value to use for logs that don't have the facet used to group by. + :param missing: The value to use for events that don't have the facet used to group by. :type missing: RUMGroupByMissing, optional :param sort: A sort rule. diff --git a/src/datadog_api_client/v2/model/rum_group_by_missing.py b/src/datadog_api_client/v2/model/rum_group_by_missing.py index 4b3a12304d..39de8dd9ab 100644 --- a/src/datadog_api_client/v2/model/rum_group_by_missing.py +++ b/src/datadog_api_client/v2/model/rum_group_by_missing.py @@ -13,7 +13,7 @@ class RUMGroupByMissing(ModelComposed): def __init__(self, **kwargs): """ - The value to use for logs that don't have the facet used to group by. + The value to use for events that don't have the facet used to group by. """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_product_analytics_retention_scale.py b/src/datadog_api_client/v2/model/rum_product_analytics_retention_scale.py index bac5ffe9fb..5266ce06b4 100644 --- a/src/datadog_api_client/v2/model/rum_product_analytics_retention_scale.py +++ b/src/datadog_api_client/v2/model/rum_product_analytics_retention_scale.py @@ -45,6 +45,7 @@ def __init__( :type last_modified_at: int, optional :param state: Controls the retention policy for Product Analytics data derived from RUM events. + Requests also accept ``PREVIEW`` (the initial state of a new application, reported as ``NONE`` in responses). Setting ``MAX`` requires the ``product_analytics_apps_write`` permission. :type state: RUMProductAnalyticsRetentionState, optional """ if last_modified_at is not unset: diff --git a/src/datadog_api_client/v2/model/rum_product_analytics_retention_state.py b/src/datadog_api_client/v2/model/rum_product_analytics_retention_state.py index e1ffff859e..a6407e0be6 100644 --- a/src/datadog_api_client/v2/model/rum_product_analytics_retention_state.py +++ b/src/datadog_api_client/v2/model/rum_product_analytics_retention_state.py @@ -15,6 +15,7 @@ class RUMProductAnalyticsRetentionState(ModelSimple): """ Controls the retention policy for Product Analytics data derived from RUM events. + Requests also accept `PREVIEW` (the initial state of a new application, reported as `NONE` in responses). Setting `MAX` requires the `product_analytics_apps_write` permission. :param value: Must be one of ["MAX", "NONE"]. :type value: str diff --git a/src/datadog_api_client/v2/model/rum_query_filter.py b/src/datadog_api_client/v2/model/rum_query_filter.py index cd14daa723..a7bbc7178c 100644 --- a/src/datadog_api_client/v2/model/rum_query_filter.py +++ b/src/datadog_api_client/v2/model/rum_query_filter.py @@ -38,13 +38,13 @@ def __init__( """ The search and filter query settings. - :param _from: The minimum time for the requested events; supports date (in `ISO 8601 `_ format with full date, hours, minutes, and the ``Z`` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). + :param _from: The minimum time for the requested events, inclusive. Accepts date math relative to now (for example ``now-15m`` , ``now-1h`` , ``now-7d`` ), an absolute date in `ISO 8601 `_ format with full date, hours, minutes, and the ``Z`` UTC indicator (seconds and fractional seconds are optional), or a timestamp in milliseconds since the Unix epoch. :type _from: str, optional - :param query: The search query following the RUM search syntax. + :param query: The search query following the `RUM search syntax `_. Filter on attributes with ``@attribute:value`` , for example ``@type:view @application.id: @view.name:"/checkout"`` , and combine terms with ``AND`` , ``OR`` and ``-`` (negation). Event types are ``session`` , ``view`` , ``action`` , ``resource`` , ``error`` , ``long_task`` and ``vital``. :type query: str, optional - :param to: The maximum time for the requested events; supports date (in `ISO 8601 `_ format with full date, hours, minutes, and the ``Z`` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). + :param to: The maximum time for the requested events. Accepts the same formats as ``from``. :type to: str, optional """ if _from is not unset: diff --git a/src/datadog_api_client/v2/model/rum_query_page_options.py b/src/datadog_api_client/v2/model/rum_query_page_options.py index 503ddd5072..243c002f5b 100644 --- a/src/datadog_api_client/v2/model/rum_query_page_options.py +++ b/src/datadog_api_client/v2/model/rum_query_page_options.py @@ -36,10 +36,10 @@ def __init__(self_, cursor: Union[str, UnsetType] = unset, limit: Union[int, Uns """ Paging attributes for listing events. - :param cursor: List following results with a cursor provided in the previous query. + :param cursor: Cursor to get the next page of results, taken from ``meta.page.after`` of the previous response. Send it with the same ``filter`` and ``sort`` as the request that returned it. :type cursor: str, optional - :param limit: Maximum number of events in the response. + :param limit: Maximum number of events in the response. Between 1 and 1000. :type limit: int, optional """ if cursor is not unset: diff --git a/src/datadog_api_client/v2/model/rum_response_links.py b/src/datadog_api_client/v2/model/rum_response_links.py index 00056fade1..9f53fc92ef 100644 --- a/src/datadog_api_client/v2/model/rum_response_links.py +++ b/src/datadog_api_client/v2/model/rum_response_links.py @@ -28,8 +28,8 @@ def __init__(self_, next: Union[str, UnsetType] = unset, **kwargs): """ Links attributes. - :param next: Link for the next set of results. Note that the request can also be made using the - POST endpoint. + :param next: Link for the next set of results, only present when there are more results. It always points to the ``GET /api/v2/rum/events`` endpoint, and keeps ``filter[query]`` , ``filter[from]`` , ``filter[to]`` , ``sort`` and ``page[limit]`` of the request. Note that the request can also be made using the + POST endpoint with ``page.cursor`` set to ``meta.page.after``. :type next: str, optional """ if next is not unset: diff --git a/src/datadog_api_client/v2/model/rum_response_metadata.py b/src/datadog_api_client/v2/model/rum_response_metadata.py index 0570bc396b..9b64a153d7 100644 --- a/src/datadog_api_client/v2/model/rum_response_metadata.py +++ b/src/datadog_api_client/v2/model/rum_response_metadata.py @@ -63,7 +63,7 @@ def __init__( :param request_id: The identifier of the request. :type request_id: str, optional - :param status: The status of the response. + :param status: The status of the response. ``timeout`` means the query did not complete in time and the results are partial. :type status: RUMResponseStatus, optional :param warnings: A list of warnings (non-fatal errors) encountered. Partial results may return if diff --git a/src/datadog_api_client/v2/model/rum_response_page.py b/src/datadog_api_client/v2/model/rum_response_page.py index d97d703d1e..a34cc4311f 100644 --- a/src/datadog_api_client/v2/model/rum_response_page.py +++ b/src/datadog_api_client/v2/model/rum_response_page.py @@ -28,7 +28,7 @@ def __init__(self_, after: Union[str, UnsetType] = unset, **kwargs): """ Paging attributes. - :param after: The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of ``page[cursor]``. + :param after: The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of ``page[cursor]`` ( ``page.cursor`` for the POST endpoint). Absent on the last page. :type after: str, optional """ if after is not unset: diff --git a/src/datadog_api_client/v2/model/rum_response_status.py b/src/datadog_api_client/v2/model/rum_response_status.py index 83303095e3..beceef8613 100644 --- a/src/datadog_api_client/v2/model/rum_response_status.py +++ b/src/datadog_api_client/v2/model/rum_response_status.py @@ -14,7 +14,7 @@ class RUMResponseStatus(ModelSimple): """ - The status of the response. + The status of the response. `timeout` means the query did not complete in time and the results are partial. :param value: Must be one of ["done", "timeout"]. :type value: str diff --git a/src/datadog_api_client/v2/model/rum_search_events_request.py b/src/datadog_api_client/v2/model/rum_search_events_request.py index 720333ed6d..6f7c827d14 100644 --- a/src/datadog_api_client/v2/model/rum_search_events_request.py +++ b/src/datadog_api_client/v2/model/rum_search_events_request.py @@ -51,7 +51,7 @@ def __init__( **kwargs, ): """ - The request for a RUM events list. + The request for a RUM events list. All attributes are optional: without any, the request returns the first 10 events of the last 15 minutes. :param filter: The search and filter query settings. :type filter: RUMQueryFilter, optional diff --git a/tests/v2/features/rum.feature b/tests/v2/features/rum.feature index 3fa9ce6776..b6abadf38d 100644 --- a/tests/v2/features/rum.feature +++ b/tests/v2/features/rum.feature @@ -13,7 +13,7 @@ Feature: RUM @generated @skip @team:ddoghq/rum-backend Scenario: Aggregate RUM events returns "Bad Request" response Given new "AggregateRUMEvents" request - And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.time_spent", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}} + And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@view.loading_time", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.name", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}} When the request is sent Then the response status is 400 Bad Request @@ -33,6 +33,13 @@ Feature: RUM When the request is sent Then the response status is 400 Bad Request + @generated @skip @team:ddoghq/rum-backend + Scenario: Create a new RUM application returns "Conflict" response + Given new "CreateRUMApplication" request + And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "create_default_retention_filters": false, "error_tracking_exclusion_filter_enabled": false, "name": "my_new_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "type": "rum_application_create"}} + When the request is sent + Then the response status is 409 Conflict + @skip-validation @team:ddoghq/rum-backend Scenario: Create a new RUM application returns "Created" response Given new "CreateRUMApplication" request @@ -70,6 +77,13 @@ Feature: RUM And the response "data.attributes.name" is equal to "test-rum-no-default-rf-{{ unique_hash }}" And the response "data.attributes.type" is equal to "browser" + @generated @skip @team:ddoghq/rum-backend + Scenario: Delete a RUM application returns "Bad Request" response + Given new "DeleteRUMApplication" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + @skip-validation @team:ddoghq/rum-backend Scenario: Delete a RUM application returns "No Content" response Given there is a valid "rum_application" in the system @@ -85,6 +99,13 @@ Feature: RUM When the request is sent Then the response status is 404 Not Found + @generated @skip @team:ddoghq/rum-backend + Scenario: Get a RUM application returns "Bad Request" response + Given new "GetRUMApplication" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + @team:ddoghq/rum-backend Scenario: Get a RUM application returns "Not Found" response Given new "GetRUMApplication" request @@ -124,6 +145,12 @@ Feature: RUM Then the response status is 200 OK And the response has 3 items + @generated @skip @team:ddoghq/rum-backend + Scenario: List all the RUM applications returns "Bad Request" response + Given new "GetRUMApplications" request + When the request is sent + Then the response status is 400 Bad Request + @generated @skip @team:ddoghq/rum-backend Scenario: List all the RUM applications returns "Not Found" response Given new "GetRUMApplications" request @@ -166,7 +193,7 @@ Feature: RUM Scenario: Update a RUM application returns "Bad Request" response Given new "UpdateRUMApplication" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "instrumentation_type": "manual", "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} When the request is sent Then the response status is 400 Bad Request @@ -174,7 +201,7 @@ Feature: RUM Scenario: Update a RUM application returns "Not Found" response Given new "UpdateRUMApplication" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "instrumentation_type": "manual", "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} When the request is sent Then the response status is 404 Not Found @@ -195,6 +222,14 @@ Feature: RUM And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" + @generated @skip @team:ddoghq/rum-backend + Scenario: Update a RUM application returns "Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter." response + Given new "UpdateRUMApplication" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "instrumentation_type": "manual", "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + When the request is sent + Then the response status is 422 Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter. + @skip-validation @team:ddoghq/rum-backend Scenario: Update a RUM application returns "Unprocessable Entity." response Given there is a valid "rum_application" in the system