From 8a8d7cf8dada51b0f318120884df885cf382b66a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Nov 2026 14:19:30 +0000 Subject: [PATCH] Regenerate client from commit 13e4673 of spec repo --- .generator/schemas/v2/openapi.yaml | 451 +++++++++++++++--- examples/v2/rum/CreateRUMApplication.py | 3 +- .../v2/rum/CreateRUMApplication_3241419056.py | 3 +- .../v2/rum/CreateRUMApplication_4210432830.py | 9 +- examples/v2/rum/UpdateRUMApplication.py | 3 +- .../v2/rum/UpdateRUMApplication_394074053.py | 6 +- src/datadog_api_client/v2/api/rum_api.py | 162 +++++-- .../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 | 11 +- .../v2/model/rum_application_create.py | 1 + .../rum_application_create_attributes.py | 87 +++- .../model/rum_application_list_attributes.py | 11 +- .../v2/model/rum_application_platform_type.py | 92 ++++ .../v2/model/rum_application_update.py | 3 +- .../rum_application_update_attributes.py | 97 +++- .../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 +- ...oduct_analytics_retention_state_request.py | 41 ++ .../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 +- src/datadog_api_client/v2/models/__init__.py | 6 + tests/v2/features/rum.feature | 41 +- 35 files changed, 897 insertions(+), 192 deletions(-) create mode 100644 src/datadog_api_client/v2/model/rum_application_platform_type.py create mode 100644 src/datadog_api_client/v2/model/rum_product_analytics_retention_state_request.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 18e4572760..9b13490b50 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -112222,7 +112222,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 is ignored. properties: compute: description: The list of metrics or timeseries to compute for the retrieved buckets. @@ -112249,7 +112251,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" @@ -112258,7 +112260,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"] @@ -112272,7 +112274,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 @@ -112317,9 +112320,11 @@ components: example: false 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. + description: Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. example: 0 format: double + maximum: 1 + minimum: 0 type: number application_id: description: ID of the RUM application. @@ -112388,7 +112393,8 @@ components: description: Sample rate (0-100) of Session Replay for Product Analytics sessions. example: 0 format: int32 - maximum: 2147483647 + maximum: 100 + minimum: 0 type: integer product_scales: $ref: "#/components/schemas/RUMProductScales" @@ -112409,7 +112415,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`, `unreal`." example: browser type: string updated_at: @@ -112444,8 +112450,21 @@ 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: Whether 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: Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. Defaults to `1` (100%). + example: 1 + format: double + maximum: 1 + minimum: 0 + type: number create_default_retention_filters: default: true description: |- @@ -112454,18 +112473,36 @@ 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: Whether 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: 100 + minimum: 0 + type: integer product_analytics_retention_state: - $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" + $ref: "#/components/schemas/RUMProductAnalyticsRetentionStateRequest" 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`." - example: browser - type: string + $ref: "#/components/schemas/RUMApplicationPlatformType" required: - name type: object @@ -112515,9 +112552,11 @@ components: example: false 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. + description: Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. example: 0 format: double + maximum: 1 + minimum: 0 type: number application_id: description: ID of the RUM application. @@ -112582,7 +112621,8 @@ components: description: Sample rate (0-100) of Session Replay for Product Analytics sessions. example: 0 format: int32 - maximum: 2147483647 + maximum: 100 + minimum: 0 type: integer product_scales: $ref: "#/components/schemas/RUMProductScales" @@ -112603,7 +112643,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`, `unreal`. example: browser type: string updated_at: @@ -112634,6 +112674,52 @@ components: type: string x-enum-varnames: - RUM_APPLICATION + RUMApplicationPlatformType: + description: Type of the RUM application, that is the platform of the RUM SDK. Defaults to `browser` on create. + enum: + - browser + - ios + - android + - react-native + - flutter + - roku + - electron + - unity + - kotlin-multiplatform + - react + - nextjs + - angular + - vuejs + - nuxt + - tanstack + - maui + - salesforce-lwc + - shopify + - cpp + - unreal + example: browser + type: string + x-enum-varnames: + - BROWSER + - IOS + - ANDROID + - REACT_NATIVE + - FLUTTER + - ROKU + - ELECTRON + - UNITY + - KOTLIN_MULTIPLATFORM + - REACT + - NEXTJS + - ANGULAR + - VUEJS + - NUXT + - TANSTACK + - MAUI + - SALESFORCE_LWC + - SHOPIFY + - CPP + - UNREAL RUMApplicationResponse: description: RUM application response. properties: @@ -112665,20 +112751,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: Whether flat sampling of Session Replay for APM-correlated RUM sessions is enabled. + example: true + type: boolean + apm_rum_flat_sampling_replay_sample_rate: + description: Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. + example: 1 + format: double + maximum: 1 + minimum: 0 + type: number + error_tracking_exclusion_filter_enabled: + description: Whether Error Tracking exclusion filters are enabled for the application. + example: false + type: boolean name: - description: Name of the RUM application. + description: New name of the RUM application. Between 1 and 255 characters. example: updated_name_for_my_existing_rum_application + maxLength: 255 type: string + product_analytics_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for Product Analytics sessions. + example: 100 + format: int32 + maximum: 100 + minimum: 0 + type: integer product_analytics_retention_state: - $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" + $ref: "#/components/schemas/RUMProductAnalyticsRetentionStateRequest" + 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 for 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`." - example: browser - type: string + $ref: "#/components/schemas/RUMApplicationPlatformType" type: object RUMApplicationUpdateRequest: description: RUM application update request. @@ -112728,19 +112849,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`, and so on, in 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`. Required for all aggregations except `count`. + example: "@view.loading_time" type: string type: $ref: "#/components/schemas/RUMComputeType" @@ -112749,7 +112870,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"] @@ -112770,8 +112891,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: |- @@ -112781,14 +112904,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 @@ -112805,7 +112928,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 @@ -112846,8 +112969,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" @@ -112895,7 +113018,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" @@ -113541,18 +113664,36 @@ 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. + enum: + - MAX + - NONE + example: MAX + type: string + x-enum-descriptions: + - Store Product Analytics data for the maximum available retention period + - Do not store Product Analytics data + x-enum-varnames: + - MAX + - NONE + RUMProductAnalyticsRetentionStateRequest: + description: |- + Retention policy to set for Product Analytics data derived from RUM events. `PREVIEW` is the initial state of a new application and is reported as `NONE` in responses. Setting `MAX` requires the `product_analytics_apps_write` permission. enum: - MAX - NONE + - PREVIEW example: MAX type: string x-enum-descriptions: - Store Product Analytics data for the maximum available retention period - Do not store Product Analytics data + - Initial state of a new application, reported as `NONE` in responses x-enum-varnames: - MAX - NONE + - PREVIEW RUMProductScales: description: Product Scales configuration for the RUM application. properties: @@ -113566,17 +113707,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 @@ -113601,12 +113745,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 @@ -113617,9 +113761,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. You can also make the request with 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: @@ -113651,18 +113795,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" @@ -113679,6 +113824,9 @@ components: - timestamp - -timestamp type: string + x-enum-descriptions: + - Oldest events first + - Newest events first x-enum-varnames: - TIMESTAMP_ASCENDING - TIMESTAMP_DESCENDING @@ -236514,7 +236662,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`, and so on, 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: @@ -236545,6 +236697,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 @@ -236584,8 +236752,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: @@ -236608,6 +236816,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": @@ -236619,7 +236833,10 @@ paths: permissions: - rum_apps_read post: - description: Create a new RUM application in your organization. + description: |- + Create a 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: @@ -236661,7 +236878,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 @@ -237369,18 +237602,36 @@ paths: - product_analytics_apps_write /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 cannot be re-enabled through the API, and its application ID cannot be reused. + 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: @@ -237396,14 +237647,19 @@ paths: permissions: - rum_apps_write get: - description: Get the RUM application with given ID in your organization. + description: |- + Get the RUM application with the 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": @@ -237428,6 +237684,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: @@ -237443,14 +237711,19 @@ paths: permissions: - rum_apps_read patch: - description: Update the RUM application with given ID in your organization. + description: |- + Update the RUM application with the 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: @@ -237493,7 +237766,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: @@ -237504,8 +237787,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 @@ -238804,52 +239087,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`. - Use this endpoint to see your latest RUM events. + The query follows the [RUM search syntax][2]. Without `filter[from]` and `filter[to]`, the endpoint searches the last 15 minutes. + + [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] @@ -238895,12 +239178,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: @@ -238918,6 +239203,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/examples/v2/rum/CreateRUMApplication.py b/examples/v2/rum/CreateRUMApplication.py index aeed17d2a9..183963b899 100644 --- a/examples/v2/rum/CreateRUMApplication.py +++ b/examples/v2/rum/CreateRUMApplication.py @@ -9,12 +9,13 @@ from datadog_api_client.v2.model.rum_application_create_attributes import RUMApplicationCreateAttributes from datadog_api_client.v2.model.rum_application_create_request import RUMApplicationCreateRequest from datadog_api_client.v2.model.rum_application_create_type import RUMApplicationCreateType +from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType body = RUMApplicationCreateRequest( data=RUMApplicationCreate( attributes=RUMApplicationCreateAttributes( name="test-rum-5c67ebb32077e1d9", - type="ios", + type=RUMApplicationPlatformType.IOS, ), type=RUMApplicationCreateType.RUM_APPLICATION_CREATE, ), diff --git a/examples/v2/rum/CreateRUMApplication_3241419056.py b/examples/v2/rum/CreateRUMApplication_3241419056.py index 18b95230d5..236b7515ae 100644 --- a/examples/v2/rum/CreateRUMApplication_3241419056.py +++ b/examples/v2/rum/CreateRUMApplication_3241419056.py @@ -9,12 +9,13 @@ from datadog_api_client.v2.model.rum_application_create_attributes import RUMApplicationCreateAttributes from datadog_api_client.v2.model.rum_application_create_request import RUMApplicationCreateRequest from datadog_api_client.v2.model.rum_application_create_type import RUMApplicationCreateType +from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType body = RUMApplicationCreateRequest( data=RUMApplicationCreate( attributes=RUMApplicationCreateAttributes( name="test-rum-no-default-rf-5c67ebb32077e1d9", - type="browser", + type=RUMApplicationPlatformType.BROWSER, create_default_retention_filters=False, ), type=RUMApplicationCreateType.RUM_APPLICATION_CREATE, diff --git a/examples/v2/rum/CreateRUMApplication_4210432830.py b/examples/v2/rum/CreateRUMApplication_4210432830.py index 685a46edf6..b6a03ead91 100644 --- a/examples/v2/rum/CreateRUMApplication_4210432830.py +++ b/examples/v2/rum/CreateRUMApplication_4210432830.py @@ -9,16 +9,19 @@ from datadog_api_client.v2.model.rum_application_create_attributes import RUMApplicationCreateAttributes from datadog_api_client.v2.model.rum_application_create_request import RUMApplicationCreateRequest from datadog_api_client.v2.model.rum_application_create_type import RUMApplicationCreateType +from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType 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_product_analytics_retention_state_request import ( + RUMProductAnalyticsRetentionStateRequest, +) body = RUMApplicationCreateRequest( data=RUMApplicationCreate( attributes=RUMApplicationCreateAttributes( name="test-rum-with-product-scales-5c67ebb32077e1d9", - type="browser", + type=RUMApplicationPlatformType.BROWSER, rum_event_processing_state=RUMEventProcessingState.ERROR_FOCUSED_MODE, - product_analytics_retention_state=RUMProductAnalyticsRetentionState.NONE, + product_analytics_retention_state=RUMProductAnalyticsRetentionStateRequest.NONE, ), type=RUMApplicationCreateType.RUM_APPLICATION_CREATE, ), diff --git a/examples/v2/rum/UpdateRUMApplication.py b/examples/v2/rum/UpdateRUMApplication.py index 7224e87e1b..4e4717191d 100644 --- a/examples/v2/rum/UpdateRUMApplication.py +++ b/examples/v2/rum/UpdateRUMApplication.py @@ -5,6 +5,7 @@ from os import environ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.rum_api import RUMApi +from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType from datadog_api_client.v2.model.rum_application_update import RUMApplicationUpdate from datadog_api_client.v2.model.rum_application_update_attributes import RUMApplicationUpdateAttributes from datadog_api_client.v2.model.rum_application_update_request import RUMApplicationUpdateRequest @@ -17,7 +18,7 @@ data=RUMApplicationUpdate( attributes=RUMApplicationUpdateAttributes( name="updated_name_for_my_existing_rum_application", - type="browser", + type=RUMApplicationPlatformType.BROWSER, ), id=RUM_APPLICATION_DATA_ID, type=RUMApplicationUpdateType.RUM_APPLICATION_UPDATE, diff --git a/examples/v2/rum/UpdateRUMApplication_394074053.py b/examples/v2/rum/UpdateRUMApplication_394074053.py index 2404f93da2..3453fbb1c8 100644 --- a/examples/v2/rum/UpdateRUMApplication_394074053.py +++ b/examples/v2/rum/UpdateRUMApplication_394074053.py @@ -10,7 +10,9 @@ from datadog_api_client.v2.model.rum_application_update_request import RUMApplicationUpdateRequest from datadog_api_client.v2.model.rum_application_update_type import RUMApplicationUpdateType 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_product_analytics_retention_state_request import ( + RUMProductAnalyticsRetentionStateRequest, +) # there is a valid "rum_application" in the system RUM_APPLICATION_DATA_ID = environ["RUM_APPLICATION_DATA_ID"] @@ -20,7 +22,7 @@ attributes=RUMApplicationUpdateAttributes( name="updated_rum_with_product_scales", rum_event_processing_state=RUMEventProcessingState.ALL, - product_analytics_retention_state=RUMProductAnalyticsRetentionState.MAX, + product_analytics_retention_state=RUMProductAnalyticsRetentionStateRequest.MAX, ), id=RUM_APPLICATION_DATA_ID, type=RUMApplicationUpdateType.RUM_APPLICATION_UPDATE, diff --git a/src/datadog_api_client/v2/api/rum_api.py b/src/datadog_api_client/v2/api/rum_api.py index 4b5f158200..a45eaeb469 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 @@ -98,6 +99,7 @@ def __init__(self, api_client=None): params_map={ "id": { "required": True, + "validation": {}, "openapi_types": (str,), "attribute": "id", "location": "path", @@ -258,6 +260,7 @@ def __init__(self, api_client=None): params_map={ "id": { "required": True, + "validation": {}, "openapi_types": (str,), "attribute": "id", "location": "path", @@ -278,7 +281,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"], }, @@ -358,12 +392,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", }, @@ -717,6 +751,7 @@ def __init__(self, api_client=None): params_map={ "id": { "required": True, + "validation": {}, "openapi_types": (str,), "attribute": "id", "location": "path", @@ -737,7 +772,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`` , and so on, 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 @@ -753,7 +790,9 @@ def create_rum_application( ) -> RUMApplicationResponse: """Create a new RUM application. - Create a new RUM application in your organization. + Create a 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 @@ -770,8 +809,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 cannot be re-enabled through the API, and its application ID cannot be reused. + 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 """ @@ -937,9 +978,10 @@ def get_rum_application( ) -> RUMApplicationResponse: """Get a RUM application. - Get the RUM application with given ID in your organization. + Get the RUM application with the 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 """ @@ -950,14 +992,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( @@ -1051,30 +1132,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 endpoint searches the last 15 minutes. - 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 """ @@ -1103,8 +1185,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, @@ -1113,17 +1195,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. @@ -1577,10 +1659,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 @@ -1626,9 +1709,10 @@ def update_rum_application( ) -> RUMApplicationResponse: """Update a RUM application. - Update the RUM application with given ID in your organization. + Update the RUM application with the 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..fc3ed31e5e 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 is 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..7ad772cb1d 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..59e429069e 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..c56ae95420 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..881d741036 100644 --- a/src/datadog_api_client/v2/model/rum_application_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_attributes.py @@ -22,11 +22,16 @@ class RUMApplicationAttributes(ModelNormal): "api_key_id": { "inclusive_maximum": 2147483647, }, + "apm_rum_flat_sampling_replay_sample_rate": { + "inclusive_maximum": 1, + "inclusive_minimum": 0, + }, "org_id": { "inclusive_maximum": 2147483647, }, "product_analytics_replay_sample_rate": { - "inclusive_maximum": 2147483647, + "inclusive_maximum": 100, + "inclusive_minimum": 0, }, } @@ -128,7 +133,7 @@ def __init__( :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. + :param apm_rum_flat_sampling_replay_sample_rate: Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. :type apm_rum_flat_sampling_replay_sample_rate: float, optional :param application_id: ID of the RUM application. @@ -188,7 +193,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`` , ``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..5aeba85ef5 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, @@ -14,67 +14,128 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + from datadog_api_client.v2.model.rum_product_analytics_retention_state_request import ( + RUMProductAnalyticsRetentionStateRequest, + ) from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType class RUMApplicationCreateAttributes(ModelNormal): + validations = { + "apm_rum_flat_sampling_replay_sample_rate": { + "inclusive_maximum": 1, + "inclusive_minimum": 0, + }, + "name": { + "max_length": 255, + }, + "product_analytics_replay_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + } + @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_product_analytics_retention_state_request import ( + RUMProductAnalyticsRetentionStateRequest, + ) from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType 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_retention_state": (RUMProductAnalyticsRetentionState,), + "product_analytics_replay_sample_rate": (int,), + "product_analytics_retention_state": (RUMProductAnalyticsRetentionStateRequest,), "rum_event_processing_state": (RUMEventProcessingState,), - "type": (str,), + "tags": ([str],), + "type": (RUMApplicationPlatformType,), } 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, - product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, 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[RUMProductAnalyticsRetentionStateRequest, UnsetType] = unset, rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset, - type: Union[str, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + type: Union[RUMApplicationPlatformType, 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: Whether 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: Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. Defaults to ``1`` (100%). + :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: Whether 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_retention_state: Controls the retention policy for Product Analytics data derived from RUM events. - :type product_analytics_retention_state: RUMProductAnalyticsRetentionState, optional + :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: Retention policy to set for Product Analytics data derived from RUM events. ``PREVIEW`` is the initial state of a new application and is reported as ``NONE`` in responses. Setting ``MAX`` requires the ``product_analytics_apps_write`` permission. + :type product_analytics_retention_state: RUMProductAnalyticsRetentionStateRequest, 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``. - :type type: str, optional + :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, that is the platform of the RUM SDK. Defaults to ``browser`` on create. + :type type: RUMApplicationPlatformType, 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..8f5e746abb 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 @@ -22,11 +22,16 @@ class RUMApplicationListAttributes(ModelNormal): "api_key_id": { "inclusive_maximum": 2147483647, }, + "apm_rum_flat_sampling_replay_sample_rate": { + "inclusive_maximum": 1, + "inclusive_minimum": 0, + }, "org_id": { "inclusive_maximum": 2147483647, }, "product_analytics_replay_sample_rate": { - "inclusive_maximum": 2147483647, + "inclusive_maximum": 100, + "inclusive_minimum": 0, }, } @@ -125,7 +130,7 @@ def __init__( :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. + :param apm_rum_flat_sampling_replay_sample_rate: Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. :type apm_rum_flat_sampling_replay_sample_rate: float, optional :param application_id: ID of the RUM application. @@ -182,7 +187,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`` , ``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_platform_type.py b/src/datadog_api_client/v2/model/rum_application_platform_type.py new file mode 100644 index 0000000000..ea7510a9e0 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_application_platform_type.py @@ -0,0 +1,92 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RUMApplicationPlatformType(ModelSimple): + """ + Type of the RUM application, that is the platform of the RUM SDK. Defaults to `browser` on create. + + :param value: Must be one of ["browser", "ios", "android", "react-native", "flutter", "roku", "electron", "unity", "kotlin-multiplatform", "react", "nextjs", "angular", "vuejs", "nuxt", "tanstack", "maui", "salesforce-lwc", "shopify", "cpp", "unreal"]. + :type value: str + """ + + allowed_values = { + "browser", + "ios", + "android", + "react-native", + "flutter", + "roku", + "electron", + "unity", + "kotlin-multiplatform", + "react", + "nextjs", + "angular", + "vuejs", + "nuxt", + "tanstack", + "maui", + "salesforce-lwc", + "shopify", + "cpp", + "unreal", + } + BROWSER: ClassVar["RUMApplicationPlatformType"] + IOS: ClassVar["RUMApplicationPlatformType"] + ANDROID: ClassVar["RUMApplicationPlatformType"] + REACT_NATIVE: ClassVar["RUMApplicationPlatformType"] + FLUTTER: ClassVar["RUMApplicationPlatformType"] + ROKU: ClassVar["RUMApplicationPlatformType"] + ELECTRON: ClassVar["RUMApplicationPlatformType"] + UNITY: ClassVar["RUMApplicationPlatformType"] + KOTLIN_MULTIPLATFORM: ClassVar["RUMApplicationPlatformType"] + REACT: ClassVar["RUMApplicationPlatformType"] + NEXTJS: ClassVar["RUMApplicationPlatformType"] + ANGULAR: ClassVar["RUMApplicationPlatformType"] + VUEJS: ClassVar["RUMApplicationPlatformType"] + NUXT: ClassVar["RUMApplicationPlatformType"] + TANSTACK: ClassVar["RUMApplicationPlatformType"] + MAUI: ClassVar["RUMApplicationPlatformType"] + SALESFORCE_LWC: ClassVar["RUMApplicationPlatformType"] + SHOPIFY: ClassVar["RUMApplicationPlatformType"] + CPP: ClassVar["RUMApplicationPlatformType"] + UNREAL: ClassVar["RUMApplicationPlatformType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RUMApplicationPlatformType.BROWSER = RUMApplicationPlatformType("browser") +RUMApplicationPlatformType.IOS = RUMApplicationPlatformType("ios") +RUMApplicationPlatformType.ANDROID = RUMApplicationPlatformType("android") +RUMApplicationPlatformType.REACT_NATIVE = RUMApplicationPlatformType("react-native") +RUMApplicationPlatformType.FLUTTER = RUMApplicationPlatformType("flutter") +RUMApplicationPlatformType.ROKU = RUMApplicationPlatformType("roku") +RUMApplicationPlatformType.ELECTRON = RUMApplicationPlatformType("electron") +RUMApplicationPlatformType.UNITY = RUMApplicationPlatformType("unity") +RUMApplicationPlatformType.KOTLIN_MULTIPLATFORM = RUMApplicationPlatformType("kotlin-multiplatform") +RUMApplicationPlatformType.REACT = RUMApplicationPlatformType("react") +RUMApplicationPlatformType.NEXTJS = RUMApplicationPlatformType("nextjs") +RUMApplicationPlatformType.ANGULAR = RUMApplicationPlatformType("angular") +RUMApplicationPlatformType.VUEJS = RUMApplicationPlatformType("vuejs") +RUMApplicationPlatformType.NUXT = RUMApplicationPlatformType("nuxt") +RUMApplicationPlatformType.TANSTACK = RUMApplicationPlatformType("tanstack") +RUMApplicationPlatformType.MAUI = RUMApplicationPlatformType("maui") +RUMApplicationPlatformType.SALESFORCE_LWC = RUMApplicationPlatformType("salesforce-lwc") +RUMApplicationPlatformType.SHOPIFY = RUMApplicationPlatformType("shopify") +RUMApplicationPlatformType.CPP = RUMApplicationPlatformType("cpp") +RUMApplicationPlatformType.UNREAL = RUMApplicationPlatformType("unreal") 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..51cedc2542 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..84980beb1e 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, @@ -14,59 +14,128 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + from datadog_api_client.v2.model.rum_product_analytics_retention_state_request import ( + RUMProductAnalyticsRetentionStateRequest, + ) from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType class RUMApplicationUpdateAttributes(ModelNormal): + validations = { + "apm_rum_flat_sampling_replay_sample_rate": { + "inclusive_maximum": 1, + "inclusive_minimum": 0, + }, + "name": { + "max_length": 255, + }, + "product_analytics_replay_sample_rate": { + "inclusive_maximum": 100, + "inclusive_minimum": 0, + }, + } + @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_product_analytics_retention_state_request import ( + RUMProductAnalyticsRetentionStateRequest, + ) from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType return { + "apm_rum_flat_sampling_replay_enabled": (bool,), + "apm_rum_flat_sampling_replay_sample_rate": (float,), + "error_tracking_exclusion_filter_enabled": (bool,), "name": (str,), - "product_analytics_retention_state": (RUMProductAnalyticsRetentionState,), + "product_analytics_replay_sample_rate": (int,), + "product_analytics_retention_state": (RUMProductAnalyticsRetentionStateRequest,), + "remote_config_id": (str,), "rum_event_processing_state": (RUMEventProcessingState,), - "type": (str,), + "tags": ([str],), + "type": (RUMApplicationPlatformType,), } 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", "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, name: Union[str, UnsetType] = unset, - product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset, + product_analytics_replay_sample_rate: Union[int, UnsetType] = unset, + product_analytics_retention_state: Union[RUMProductAnalyticsRetentionStateRequest, UnsetType] = unset, + remote_config_id: Union[str, UnsetType] = unset, rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset, - type: Union[str, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + type: Union[RUMApplicationPlatformType, 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: Whether 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: Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. + :type apm_rum_flat_sampling_replay_sample_rate: float, optional - :param name: Name of the RUM application. + :param error_tracking_exclusion_filter_enabled: Whether Error Tracking exclusion filters are enabled for the application. + :type error_tracking_exclusion_filter_enabled: bool, optional + + :param name: New name of the RUM application. Between 1 and 255 characters. :type name: str, optional - :param product_analytics_retention_state: Controls the retention policy for Product Analytics data derived from RUM events. - :type product_analytics_retention_state: RUMProductAnalyticsRetentionState, 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: Retention policy to set for Product Analytics data derived from RUM events. ``PREVIEW`` is the initial state of a new application and is reported as ``NONE`` in responses. Setting ``MAX`` requires the ``product_analytics_apps_write`` permission. + :type product_analytics_retention_state: RUMProductAnalyticsRetentionStateRequest, 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``. - :type type: str, optional + :param tags: New list of tags for the RUM application, in ``key:value`` format. Replaces the existing tags. + :type tags: [str], optional + + :param type: Type of the RUM application, that is the platform of the RUM SDK. Defaults to ``browser`` on create. + :type type: RUMApplicationPlatformType, 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 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..1ea52d5165 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`` , and so on, in 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``. Required for all aggregations except ``count``. :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..a725d6752f 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..8eb4f529fd 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_state_request.py b/src/datadog_api_client/v2/model/rum_product_analytics_retention_state_request.py new file mode 100644 index 0000000000..24c5f04639 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_product_analytics_retention_state_request.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RUMProductAnalyticsRetentionStateRequest(ModelSimple): + """ + Retention policy to set for Product Analytics data derived from RUM events. `PREVIEW` is the initial state of a new application and is reported as `NONE` in responses. Setting `MAX` requires the `product_analytics_apps_write` permission. + + :param value: Must be one of ["MAX", "NONE", "PREVIEW"]. + :type value: str + """ + + allowed_values = { + "MAX", + "NONE", + "PREVIEW", + } + MAX: ClassVar["RUMProductAnalyticsRetentionStateRequest"] + NONE: ClassVar["RUMProductAnalyticsRetentionStateRequest"] + PREVIEW: ClassVar["RUMProductAnalyticsRetentionStateRequest"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RUMProductAnalyticsRetentionStateRequest.MAX = RUMProductAnalyticsRetentionStateRequest("MAX") +RUMProductAnalyticsRetentionStateRequest.NONE = RUMProductAnalyticsRetentionStateRequest("NONE") +RUMProductAnalyticsRetentionStateRequest.PREVIEW = RUMProductAnalyticsRetentionStateRequest("PREVIEW") 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..c53bde80c6 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..7b3d9e957e 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. You can also make the request with 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/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index f64e232c78..d3c7de9869 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -9741,6 +9741,7 @@ from datadog_api_client.v2.model.rum_application_list import RUMApplicationList from datadog_api_client.v2.model.rum_application_list_attributes import RUMApplicationListAttributes from datadog_api_client.v2.model.rum_application_list_type import RUMApplicationListType +from datadog_api_client.v2.model.rum_application_platform_type import RUMApplicationPlatformType from datadog_api_client.v2.model.rum_application_response import RUMApplicationResponse from datadog_api_client.v2.model.rum_application_type import RUMApplicationType from datadog_api_client.v2.model.rum_application_update import RUMApplicationUpdate @@ -9811,6 +9812,9 @@ from datadog_api_client.v2.model.rum_operations_list_response_meta_page import RUMOperationsListResponseMetaPage from datadog_api_client.v2.model.rum_product_analytics_retention_scale import RUMProductAnalyticsRetentionScale from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState +from datadog_api_client.v2.model.rum_product_analytics_retention_state_request import ( + RUMProductAnalyticsRetentionStateRequest, +) from datadog_api_client.v2.model.rum_product_scales import RUMProductScales from datadog_api_client.v2.model.rum_query_filter import RUMQueryFilter from datadog_api_client.v2.model.rum_query_options import RUMQueryOptions @@ -20531,6 +20535,7 @@ "RUMApplicationList", "RUMApplicationListAttributes", "RUMApplicationListType", + "RUMApplicationPlatformType", "RUMApplicationResponse", "RUMApplicationType", "RUMApplicationUpdate", @@ -20589,6 +20594,7 @@ "RUMOperationsListResponseMetaPage", "RUMProductAnalyticsRetentionScale", "RUMProductAnalyticsRetentionState", + "RUMProductAnalyticsRetentionStateRequest", "RUMProductScales", "RUMQueryFilter", "RUMQueryOptions", diff --git a/tests/v2/features/rum.feature b/tests/v2/features/rum.feature index 52ff370cee..cb0c222ced 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 @@ -138,6 +152,13 @@ Feature: RUM When the request is sent Then the response status is 200 OK + @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 @@ -194,6 +215,12 @@ Feature: RUM Then the response status is 200 OK And the response "data.id" is equal to "00000000-0000-4000-8000-000000000001" + @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 @@ -295,7 +322,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, "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 @@ -303,7 +330,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, "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 @@ -324,6 +351,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, "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