diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 18e45727600d..9b13490b5083 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.rb b/examples/v2/rum/CreateRUMApplication.rb index ef02e3e56a8b..98b83d017917 100644 --- a/examples/v2/rum/CreateRUMApplication.rb +++ b/examples/v2/rum/CreateRUMApplication.rb @@ -10,7 +10,7 @@ data: DatadogAPIClient::V2::RUMApplicationCreate.new({ attributes: DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({ name: "test-rum-5c67ebb32077e1d9", - type: "ios", + type: DatadogAPIClient::V2::RUMApplicationPlatformType::IOS, }), type: DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE, }), diff --git a/examples/v2/rum/CreateRUMApplication_3241419056.rb b/examples/v2/rum/CreateRUMApplication_3241419056.rb index c2ef7b808ef1..32845320e54e 100644 --- a/examples/v2/rum/CreateRUMApplication_3241419056.rb +++ b/examples/v2/rum/CreateRUMApplication_3241419056.rb @@ -10,7 +10,7 @@ data: DatadogAPIClient::V2::RUMApplicationCreate.new({ attributes: DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({ name: "test-rum-no-default-rf-5c67ebb32077e1d9", - type: "browser", + type: DatadogAPIClient::V2::RUMApplicationPlatformType::BROWSER, create_default_retention_filters: false, }), type: DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE, diff --git a/examples/v2/rum/CreateRUMApplication_4210432830.rb b/examples/v2/rum/CreateRUMApplication_4210432830.rb index b8d6dfe5dc88..7dd259075447 100644 --- a/examples/v2/rum/CreateRUMApplication_4210432830.rb +++ b/examples/v2/rum/CreateRUMApplication_4210432830.rb @@ -10,9 +10,9 @@ data: DatadogAPIClient::V2::RUMApplicationCreate.new({ attributes: DatadogAPIClient::V2::RUMApplicationCreateAttributes.new({ name: "test-rum-with-product-scales-5c67ebb32077e1d9", - type: "browser", + type: DatadogAPIClient::V2::RUMApplicationPlatformType::BROWSER, rum_event_processing_state: DatadogAPIClient::V2::RUMEventProcessingState::ERROR_FOCUSED_MODE, - product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionState::NONE, + product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionStateRequest::NONE, }), type: DatadogAPIClient::V2::RUMApplicationCreateType::RUM_APPLICATION_CREATE, }), diff --git a/examples/v2/rum/UpdateRUMApplication.rb b/examples/v2/rum/UpdateRUMApplication.rb index d416d06cf65b..e38cf4704820 100644 --- a/examples/v2/rum/UpdateRUMApplication.rb +++ b/examples/v2/rum/UpdateRUMApplication.rb @@ -13,7 +13,7 @@ data: DatadogAPIClient::V2::RUMApplicationUpdate.new({ attributes: DatadogAPIClient::V2::RUMApplicationUpdateAttributes.new({ name: "updated_name_for_my_existing_rum_application", - type: "browser", + type: DatadogAPIClient::V2::RUMApplicationPlatformType::BROWSER, }), id: RUM_APPLICATION_DATA_ID, type: DatadogAPIClient::V2::RUMApplicationUpdateType::RUM_APPLICATION_UPDATE, diff --git a/examples/v2/rum/UpdateRUMApplication_394074053.rb b/examples/v2/rum/UpdateRUMApplication_394074053.rb index 7b7cd8cfcc42..5a5dca61a754 100644 --- a/examples/v2/rum/UpdateRUMApplication_394074053.rb +++ b/examples/v2/rum/UpdateRUMApplication_394074053.rb @@ -14,7 +14,7 @@ attributes: DatadogAPIClient::V2::RUMApplicationUpdateAttributes.new({ name: "updated_rum_with_product_scales", rum_event_processing_state: DatadogAPIClient::V2::RUMEventProcessingState::ALL, - product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionState::MAX, + product_analytics_retention_state: DatadogAPIClient::V2::RUMProductAnalyticsRetentionStateRequest::MAX, }), id: RUM_APPLICATION_DATA_ID, type: DatadogAPIClient::V2::RUMApplicationUpdateType::RUM_APPLICATION_UPDATE, diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 07274057c608..9a086a1928e8 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -6281,6 +6281,14 @@ "v2.AggregateRUMEvents" => { "body" => "RUMAggregateRequest", }, + "v2.GetRUMApplications" => { + "filter_rum_enabled" => "Boolean", + "filter_product_analytics_enabled" => "Boolean", + "filter_error_focused_mode_enabled" => "Boolean", + "filter_remote_config_enabled" => "Boolean", + "filter_rum_event_processing_state" => "RUMEventProcessingState", + "filter_product_analytics_retention_state" => "RUMProductAnalyticsRetentionState", + }, "v2.CreateRUMApplication" => { "body" => "RUMApplicationCreateRequest", }, @@ -6296,8 +6304,8 @@ }, "v2.ListRUMEvents" => { "filter_query" => "String", - "filter_from" => "Time", - "filter_to" => "Time", + "filter_from" => "String", + "filter_to" => "String", "sort" => "RUMSort", "page_cursor" => "String", "page_limit" => "Integer", diff --git a/features/v2/rum.feature b/features/v2/rum.feature index 52ff370ceeea..cb0c222ced41 100644 --- a/features/v2/rum.feature +++ b/features/v2/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 diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 01c6d5579703..aa15db3abebd 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -8006,6 +8006,7 @@ def overrides "v2.rum_application_list" => "RUMApplicationList", "v2.rum_application_list_attributes" => "RUMApplicationListAttributes", "v2.rum_application_list_type" => "RUMApplicationListType", + "v2.rum_application_platform_type" => "RUMApplicationPlatformType", "v2.rum_application_response" => "RUMApplicationResponse", "v2.rum_applications_response" => "RUMApplicationsResponse", "v2.rum_application_type" => "RUMApplicationType", @@ -8144,6 +8145,7 @@ def overrides "v2.rum_permanent_retention_filter_update_request" => "RumPermanentRetentionFilterUpdateRequest", "v2.rum_product_analytics_retention_scale" => "RUMProductAnalyticsRetentionScale", "v2.rum_product_analytics_retention_state" => "RUMProductAnalyticsRetentionState", + "v2.rum_product_analytics_retention_state_request" => "RUMProductAnalyticsRetentionStateRequest", "v2.rum_product_scales" => "RUMProductScales", "v2.rum_query_filter" => "RUMQueryFilter", "v2.rum_query_options" => "RUMQueryOptions", diff --git a/lib/datadog_api_client/v2/api/rum_api.rb b/lib/datadog_api_client/v2/api/rum_api.rb index 4f03767ab7e4..56fffabc247d 100644 --- a/lib/datadog_api_client/v2/api/rum_api.rb +++ b/lib/datadog_api_client/v2/api/rum_api.rb @@ -33,7 +33,11 @@ def aggregate_rum_events(body, opts = {}) # 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][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/ # # @param body [RUMAggregateRequest] # @param opts [Hash] the optional parameters @@ -100,7 +104,9 @@ def create_rum_application(body, opts = {}) # 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`. # # @param body [RUMApplicationCreateRequest] # @param opts [Hash] the optional parameters @@ -168,8 +174,10 @@ def delete_rum_application(id, opts = {}) # 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 [String] RUM application ID. + # @param id [String] ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_rum_application_with_http_info(id, opts = {}) @@ -181,6 +189,10 @@ def delete_rum_application_with_http_info(id, opts = {}) if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RUMAPI.delete_rum_application" end + pattern = Regexp.new("^[a-zA-Z0-9:-]+$") + if @api_client.config.client_side_validation && id !~ pattern + fail ArgumentError, "invalid value for 'id' when calling RUMAPI.delete_rum_application, must conform to the pattern #{pattern}." + end # resource path local_var_path = '/api/v2/rum/applications/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) @@ -360,9 +372,10 @@ def get_rum_application(id, opts = {}) # 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 [String] RUM application ID. + # @param id [String] ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. # @param opts [Hash] the optional parameters # @return [Array<(RUMApplicationResponse, Integer, Hash)>] RUMApplicationResponse data, response status code and response headers def get_rum_application_with_http_info(id, opts = {}) @@ -374,6 +387,10 @@ def get_rum_application_with_http_info(id, opts = {}) if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RUMAPI.get_rum_application" end + pattern = Regexp.new("^[a-zA-Z0-9:-]+$") + if @api_client.config.client_side_validation && id !~ pattern + fail ArgumentError, "invalid value for 'id' when calling RUMAPI.get_rum_application, must conform to the pattern #{pattern}." + end # resource path local_var_path = '/api/v2/rum/applications/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) @@ -425,20 +442,42 @@ def get_rum_applications(opts = {}) # 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 opts [Hash] the optional parameters + # @option opts [Boolean] :filter_rum_enabled Only return applications for which RUM event processing is enabled (`true`) or not (`false`). + # @option opts [Boolean] :filter_product_analytics_enabled Only return applications for which Product Analytics is enabled (`true`) or not (`false`). + # @option opts [Boolean] :filter_error_focused_mode_enabled Only return applications that run in error-focused mode (`true`) or not (`false`). + # @option opts [Boolean] :filter_remote_config_enabled Only return applications that have an SDK remote configuration (`true`) or not (`false`). + # @option opts [RUMEventProcessingState] :filter_rum_event_processing_state Only return applications with this RUM event processing state. + # @option opts [RUMProductAnalyticsRetentionState] :filter_product_analytics_retention_state Only return applications with this Product Analytics retention state. # @return [Array<(RUMApplicationsResponse, Integer, Hash)>] RUMApplicationsResponse data, response status code and response headers def get_rum_applications_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RUMAPI.get_rum_applications ...' end + allowable_values = ['ALL', 'ERROR_FOCUSED_MODE', 'NONE'] + if @api_client.config.client_side_validation && opts[:'filter_rum_event_processing_state'] && !allowable_values.include?(opts[:'filter_rum_event_processing_state']) + fail ArgumentError, "invalid value for \"filter_rum_event_processing_state\", must be one of #{allowable_values}" + end + allowable_values = ['MAX', 'NONE'] + if @api_client.config.client_side_validation && opts[:'filter_product_analytics_retention_state'] && !allowable_values.include?(opts[:'filter_product_analytics_retention_state']) + fail ArgumentError, "invalid value for \"filter_product_analytics_retention_state\", must be one of #{allowable_values}" + end # resource path local_var_path = '/api/v2/rum/applications' # query parameters query_params = opts[:query_params] || {} + query_params[:'filter[rum_enabled]'] = opts[:'filter_rum_enabled'] if !opts[:'filter_rum_enabled'].nil? + query_params[:'filter[product_analytics_enabled]'] = opts[:'filter_product_analytics_enabled'] if !opts[:'filter_product_analytics_enabled'].nil? + query_params[:'filter[error_focused_mode_enabled]'] = opts[:'filter_error_focused_mode_enabled'] if !opts[:'filter_error_focused_mode_enabled'].nil? + query_params[:'filter[remote_config_enabled]'] = opts[:'filter_remote_config_enabled'] if !opts[:'filter_remote_config_enabled'].nil? + query_params[:'filter[rum_event_processing_state]'] = opts[:'filter_rum_event_processing_state'] if !opts[:'filter_rum_event_processing_state'].nil? + query_params[:'filter[product_analytics_retention_state]'] = opts[:'filter_product_analytics_retention_state'] if !opts[:'filter_product_analytics_retention_state'].nil? # header parameters header_params = opts[:header_params] || {} @@ -665,20 +704,22 @@ def list_rum_events(opts = {}) # Get a list of RUM events. # - # List endpoint returns events that match a RUM search query. - # [Results are paginated][1]. + # Returns the RUM events that match a RUM search query within a time range. Use this endpoint to see your latest RUM events with a simple query. For long filters, use `SearchRUMEvents`. To compute counts, percentiles, or timeseries, use `AggregateRUMEvents`. + # + # The query follows the [RUM search syntax][2]. Without `filter[from]` and `filter[to]`, the endpoint searches the last 15 minutes. # - # Use this endpoint to see your latest RUM events. + # [Results are paginated][1]: `page[limit]` is at most 1000 (default 10). When more results are available, the response contains `meta.page.after` and `links.next`. Request `links.next`, or send `meta.page.after` as `page[cursor]` with the same other parameters, and repeat until they are absent. # # [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + # [2]: https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/ # # @param opts [Hash] the optional parameters - # @option opts [String] :filter_query Search query following RUM syntax. - # @option opts [Time] :filter_from Minimum timestamp for requested events. - # @option opts [Time] :filter_to Maximum timestamp for requested events. - # @option opts [RUMSort] :sort Order of events in results. - # @option opts [String] :page_cursor List following results with a cursor provided in the previous query. - # @option opts [Integer] :page_limit Maximum number of events in the response. + # @option opts [String] :filter_query Search query following the [RUM search syntax](https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/). Defaults to `*`. + # @option opts [String] :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`. + # @option opts [String] :filter_to Maximum time for requested events. Accepts the same formats as `filter[from]`. Defaults to `now`. + # @option opts [RUMSort] :sort Order of events in results, by event timestamp. + # @option opts [String] :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. + # @option opts [Integer] :page_limit Maximum number of events in the response. Between 1 and 1000. # @return [Array<(RUMEventsResponse, Integer, Hash)>] RUMEventsResponse data, response status code and response headers def list_rum_events_with_http_info(opts = {}) @@ -1112,12 +1153,14 @@ def search_rum_events(body, opts = {}) # Search RUM events. # - # 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`. # - # Use this endpoint to build complex RUM events filtering and search. + # 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. + # + # [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/ # # @param body [RUMSearchEventsRequest] # @param opts [Hash] the optional parameters @@ -1205,9 +1248,10 @@ def update_rum_application(id, body, opts = {}) # 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 [String] RUM application ID. + # @param id [String] ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. # @param body [RUMApplicationUpdateRequest] # @param opts [Hash] the optional parameters # @return [Array<(RUMApplicationResponse, Integer, Hash)>] RUMApplicationResponse data, response status code and response headers @@ -1220,6 +1264,10 @@ def update_rum_application_with_http_info(id, body, opts = {}) if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RUMAPI.update_rum_application" end + pattern = Regexp.new("^[a-zA-Z0-9:-]+$") + if @api_client.config.client_side_validation && id !~ pattern + fail ArgumentError, "invalid value for 'id' when calling RUMAPI.update_rum_application, must conform to the pattern #{pattern}." + end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling RUMAPI.update_rum_application" diff --git a/lib/datadog_api_client/v2/models/rum_aggregate_request.rb b/lib/datadog_api_client/v2/models/rum_aggregate_request.rb index abd6169dce5c..0b99d0c970ac 100644 --- a/lib/datadog_api_client/v2/models/rum_aggregate_request.rb +++ b/lib/datadog_api_client/v2/models/rum_aggregate_request.rb @@ -18,6 +18,7 @@ module DatadogAPIClient::V2 # The object sent with the request to retrieve aggregation buckets of RUM events from your organization. + # `filter.indexes` is not supported and is ignored. class RUMAggregateRequest include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/rum_aggregate_sort.rb b/lib/datadog_api_client/v2/models/rum_aggregate_sort.rb index 9a90d4b3f5ef..60474fe4d46e 100644 --- a/lib/datadog_api_client/v2/models/rum_aggregate_sort.rb +++ b/lib/datadog_api_client/v2/models/rum_aggregate_sort.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class RUMAggregateSort include BaseGenericModel - # 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`. attr_accessor :aggregation # The metric to sort by (only used for `type=measure`). @@ -30,7 +30,7 @@ class RUMAggregateSort # The order to use, ascending or descending. attr_accessor :order - # The type of sorting algorithm. + # The type of sorting algorithm. `alphabetical` sorts buckets by the facet value. `measure` sorts them by a computed aggregation. attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/rum_aggregate_sort_type.rb b/lib/datadog_api_client/v2/models/rum_aggregate_sort_type.rb index 512ae992e16b..62ba7296aa7a 100644 --- a/lib/datadog_api_client/v2/models/rum_aggregate_sort_type.rb +++ b/lib/datadog_api_client/v2/models/rum_aggregate_sort_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The type of sorting algorithm. + # The type of sorting algorithm. `alphabetical` sorts buckets by the facet value. `measure` sorts them by a computed aggregation. class RUMAggregateSortType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/rum_aggregation_function.rb b/lib/datadog_api_client/v2/models/rum_aggregation_function.rb index 88a7659f6faa..c7d743d67226 100644 --- a/lib/datadog_api_client/v2/models/rum_aggregation_function.rb +++ b/lib/datadog_api_client/v2/models/rum_aggregation_function.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # 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`. class RUMAggregationFunction include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/rum_application_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_attributes.rb index fa36ef154bd5..78c4349c77e2 100644 --- a/lib/datadog_api_client/v2/models/rum_application_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_attributes.rb @@ -27,8 +27,8 @@ class RUMApplicationAttributes # Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. attr_accessor :apm_rum_flat_sampling_replay_enabled - # Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. - attr_accessor :apm_rum_flat_sampling_replay_sample_rate + # Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. + attr_reader :apm_rum_flat_sampling_replay_sample_rate # ID of the RUM application. attr_reader :application_id @@ -87,7 +87,7 @@ class RUMApplicationAttributes # List of tags associated with the RUM application. attr_accessor :tags - # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. + # 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`. attr_reader :type # Timestamp in ms of the last update date. @@ -290,6 +290,8 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if !@api_key_id.nil? && @api_key_id > 2147483647 + return false if !@apm_rum_flat_sampling_replay_sample_rate.nil? && @apm_rum_flat_sampling_replay_sample_rate > 1 + return false if !@apm_rum_flat_sampling_replay_sample_rate.nil? && @apm_rum_flat_sampling_replay_sample_rate < 0 return false if @application_id.nil? return false if @client_token.nil? return false if @created_at.nil? @@ -297,7 +299,8 @@ def valid? return false if @name.nil? return false if @org_id.nil? return false if @org_id > 2147483647 - return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate > 2147483647 + return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate > 100 + return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate < 0 return false if @type.nil? return false if @updated_at.nil? return false if @updated_by_handle.nil? @@ -314,6 +317,19 @@ def api_key_id=(api_key_id) @api_key_id = api_key_id end + # Custom attribute writer method with validation + # @param apm_rum_flat_sampling_replay_sample_rate [Object] Object to be assigned + # @!visibility private + def apm_rum_flat_sampling_replay_sample_rate=(apm_rum_flat_sampling_replay_sample_rate) + if !apm_rum_flat_sampling_replay_sample_rate.nil? && apm_rum_flat_sampling_replay_sample_rate > 1 + fail ArgumentError, 'invalid value for "apm_rum_flat_sampling_replay_sample_rate", must be smaller than or equal to 1.' + end + if !apm_rum_flat_sampling_replay_sample_rate.nil? && apm_rum_flat_sampling_replay_sample_rate < 0 + fail ArgumentError, 'invalid value for "apm_rum_flat_sampling_replay_sample_rate", must be greater than or equal to 0.' + end + @apm_rum_flat_sampling_replay_sample_rate = apm_rum_flat_sampling_replay_sample_rate + end + # Custom attribute writer method with validation # @param application_id [Object] Object to be assigned # @!visibility private @@ -381,8 +397,11 @@ def org_id=(org_id) # @param product_analytics_replay_sample_rate [Object] Object to be assigned # @!visibility private def product_analytics_replay_sample_rate=(product_analytics_replay_sample_rate) - if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate > 2147483647 - fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be smaller than or equal to 2147483647.' + if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate > 100 + fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be smaller than or equal to 100.' + end + if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate < 0 + fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be greater than or equal to 0.' end @product_analytics_replay_sample_rate = product_analytics_replay_sample_rate end diff --git a/lib/datadog_api_client/v2/models/rum_application_create.rb b/lib/datadog_api_client/v2/models/rum_application_create.rb index fb5f6e329276..bac165ede544 100644 --- a/lib/datadog_api_client/v2/models/rum_application_create.rb +++ b/lib/datadog_api_client/v2/models/rum_application_create.rb @@ -22,6 +22,7 @@ class RUMApplicationCreate include BaseGenericModel # 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. attr_reader :attributes # RUM application creation type. diff --git a/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb index 8be4ed13145d..dc5b41f115e8 100644 --- a/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_create_attributes.rb @@ -18,24 +18,40 @@ module DatadogAPIClient::V2 # 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. class RUMApplicationCreateAttributes include BaseGenericModel + # Whether flat sampling of Session Replay for APM-correlated RUM sessions is enabled. Defaults to `true`. + attr_accessor :apm_rum_flat_sampling_replay_enabled + + # Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. Defaults to `1` (100%). + attr_reader :apm_rum_flat_sampling_replay_sample_rate + # 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](https://docs.datadoghq.com/real_user_monitoring/rum_without_limits/retention_filters/#permanent-retention-filters). # This setting doesn't affect permanent retention filters (sessions with forced replays, Synthetics sessions and RUM-APM flat sampling). attr_accessor :create_default_retention_filters - # Name of the RUM application. + # Whether Error Tracking exclusion filters are enabled for the application. Defaults to `false`. + attr_accessor :error_tracking_exclusion_filter_enabled + + # Name of the RUM application. Between 1 and 255 characters. attr_reader :name - # Controls the retention policy for Product Analytics data derived from RUM events. + # Sample rate (0-100) of Session Replay for Product Analytics sessions. Defaults to `100`. + attr_reader :product_analytics_replay_sample_rate + + # 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. attr_accessor :product_analytics_retention_state - # 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. attr_accessor :rum_event_processing_state - # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. + # List of tags to associate with the RUM application, in `key:value` format. + attr_accessor :tags + + # Type of the RUM application, that is the platform of the RUM SDK. Defaults to `browser` on create. attr_accessor :type attr_accessor :additional_properties @@ -44,10 +60,15 @@ class RUMApplicationCreateAttributes # @!visibility private def self.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' } end @@ -56,11 +77,16 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'apm_rum_flat_sampling_replay_enabled' => :'Boolean', + :'apm_rum_flat_sampling_replay_sample_rate' => :'Float', :'create_default_retention_filters' => :'Boolean', + :'error_tracking_exclusion_filter_enabled' => :'Boolean', :'name' => :'String', - :'product_analytics_retention_state' => :'RUMProductAnalyticsRetentionState', + :'product_analytics_replay_sample_rate' => :'Integer', + :'product_analytics_retention_state' => :'RUMProductAnalyticsRetentionStateRequest', :'rum_event_processing_state' => :'RUMEventProcessingState', - :'type' => :'String' + :'tags' => :'Array', + :'type' => :'RUMApplicationPlatformType' } end @@ -82,14 +108,30 @@ def initialize(attributes = {}) end } + if attributes.key?(:'apm_rum_flat_sampling_replay_enabled') + self.apm_rum_flat_sampling_replay_enabled = attributes[:'apm_rum_flat_sampling_replay_enabled'] + end + + if attributes.key?(:'apm_rum_flat_sampling_replay_sample_rate') + self.apm_rum_flat_sampling_replay_sample_rate = attributes[:'apm_rum_flat_sampling_replay_sample_rate'] + end + if attributes.key?(:'create_default_retention_filters') self.create_default_retention_filters = attributes[:'create_default_retention_filters'] end + if attributes.key?(:'error_tracking_exclusion_filter_enabled') + self.error_tracking_exclusion_filter_enabled = attributes[:'error_tracking_exclusion_filter_enabled'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end + if attributes.key?(:'product_analytics_replay_sample_rate') + self.product_analytics_replay_sample_rate = attributes[:'product_analytics_replay_sample_rate'] + end + if attributes.key?(:'product_analytics_retention_state') self.product_analytics_retention_state = attributes[:'product_analytics_retention_state'] end @@ -98,6 +140,12 @@ def initialize(attributes = {}) self.rum_event_processing_state = attributes[:'rum_event_processing_state'] end + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -107,10 +155,28 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@apm_rum_flat_sampling_replay_sample_rate.nil? && @apm_rum_flat_sampling_replay_sample_rate > 1 + return false if !@apm_rum_flat_sampling_replay_sample_rate.nil? && @apm_rum_flat_sampling_replay_sample_rate < 0 return false if @name.nil? + return false if @name.to_s.length > 255 + return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate > 100 + return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate < 0 true end + # Custom attribute writer method with validation + # @param apm_rum_flat_sampling_replay_sample_rate [Object] Object to be assigned + # @!visibility private + def apm_rum_flat_sampling_replay_sample_rate=(apm_rum_flat_sampling_replay_sample_rate) + if !apm_rum_flat_sampling_replay_sample_rate.nil? && apm_rum_flat_sampling_replay_sample_rate > 1 + fail ArgumentError, 'invalid value for "apm_rum_flat_sampling_replay_sample_rate", must be smaller than or equal to 1.' + end + if !apm_rum_flat_sampling_replay_sample_rate.nil? && apm_rum_flat_sampling_replay_sample_rate < 0 + fail ArgumentError, 'invalid value for "apm_rum_flat_sampling_replay_sample_rate", must be greater than or equal to 0.' + end + @apm_rum_flat_sampling_replay_sample_rate = apm_rum_flat_sampling_replay_sample_rate + end + # Custom attribute writer method with validation # @param name [Object] Object to be assigned # @!visibility private @@ -118,9 +184,25 @@ def name=(name) if name.nil? fail ArgumentError, 'invalid value for "name", name cannot be nil.' end + if name.to_s.length > 255 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.' + end @name = name end + # Custom attribute writer method with validation + # @param product_analytics_replay_sample_rate [Object] Object to be assigned + # @!visibility private + def product_analytics_replay_sample_rate=(product_analytics_replay_sample_rate) + if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate > 100 + fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be smaller than or equal to 100.' + end + if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate < 0 + fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be greater than or equal to 0.' + end + @product_analytics_replay_sample_rate = product_analytics_replay_sample_rate + end + # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -147,10 +229,15 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + apm_rum_flat_sampling_replay_enabled == o.apm_rum_flat_sampling_replay_enabled && + apm_rum_flat_sampling_replay_sample_rate == o.apm_rum_flat_sampling_replay_sample_rate && create_default_retention_filters == o.create_default_retention_filters && + error_tracking_exclusion_filter_enabled == o.error_tracking_exclusion_filter_enabled && name == o.name && + product_analytics_replay_sample_rate == o.product_analytics_replay_sample_rate && product_analytics_retention_state == o.product_analytics_retention_state && rum_event_processing_state == o.rum_event_processing_state && + tags == o.tags && type == o.type && additional_properties == o.additional_properties end @@ -159,7 +246,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [create_default_retention_filters, name, product_analytics_retention_state, rum_event_processing_state, type, additional_properties].hash + [apm_rum_flat_sampling_replay_enabled, apm_rum_flat_sampling_replay_sample_rate, create_default_retention_filters, error_tracking_exclusion_filter_enabled, name, product_analytics_replay_sample_rate, product_analytics_retention_state, rum_event_processing_state, tags, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb index 852f2de7b799..0fac774f39f3 100644 --- a/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_list_attributes.rb @@ -27,8 +27,8 @@ class RUMApplicationListAttributes # Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. attr_accessor :apm_rum_flat_sampling_replay_enabled - # Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. - attr_accessor :apm_rum_flat_sampling_replay_sample_rate + # Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. + attr_reader :apm_rum_flat_sampling_replay_sample_rate # ID of the RUM application. attr_reader :application_id @@ -84,7 +84,7 @@ class RUMApplicationListAttributes # List of tags associated with the RUM application. attr_accessor :tags - # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. + # 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`. attr_reader :type # Timestamp in ms of the last update date. @@ -281,13 +281,16 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if !@api_key_id.nil? && @api_key_id > 2147483647 + return false if !@apm_rum_flat_sampling_replay_sample_rate.nil? && @apm_rum_flat_sampling_replay_sample_rate > 1 + return false if !@apm_rum_flat_sampling_replay_sample_rate.nil? && @apm_rum_flat_sampling_replay_sample_rate < 0 return false if @application_id.nil? return false if @created_at.nil? return false if @created_by_handle.nil? return false if @name.nil? return false if @org_id.nil? return false if @org_id > 2147483647 - return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate > 2147483647 + return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate > 100 + return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate < 0 return false if @type.nil? return false if @updated_at.nil? return false if @updated_by_handle.nil? @@ -304,6 +307,19 @@ def api_key_id=(api_key_id) @api_key_id = api_key_id end + # Custom attribute writer method with validation + # @param apm_rum_flat_sampling_replay_sample_rate [Object] Object to be assigned + # @!visibility private + def apm_rum_flat_sampling_replay_sample_rate=(apm_rum_flat_sampling_replay_sample_rate) + if !apm_rum_flat_sampling_replay_sample_rate.nil? && apm_rum_flat_sampling_replay_sample_rate > 1 + fail ArgumentError, 'invalid value for "apm_rum_flat_sampling_replay_sample_rate", must be smaller than or equal to 1.' + end + if !apm_rum_flat_sampling_replay_sample_rate.nil? && apm_rum_flat_sampling_replay_sample_rate < 0 + fail ArgumentError, 'invalid value for "apm_rum_flat_sampling_replay_sample_rate", must be greater than or equal to 0.' + end + @apm_rum_flat_sampling_replay_sample_rate = apm_rum_flat_sampling_replay_sample_rate + end + # Custom attribute writer method with validation # @param application_id [Object] Object to be assigned # @!visibility private @@ -361,8 +377,11 @@ def org_id=(org_id) # @param product_analytics_replay_sample_rate [Object] Object to be assigned # @!visibility private def product_analytics_replay_sample_rate=(product_analytics_replay_sample_rate) - if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate > 2147483647 - fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be smaller than or equal to 2147483647.' + if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate > 100 + fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be smaller than or equal to 100.' + end + if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate < 0 + fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be greater than or equal to 0.' end @product_analytics_replay_sample_rate = product_analytics_replay_sample_rate end diff --git a/lib/datadog_api_client/v2/models/rum_application_platform_type.rb b/lib/datadog_api_client/v2/models/rum_application_platform_type.rb new file mode 100644 index 000000000000..b7c9eb24b819 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_application_platform_type.rb @@ -0,0 +1,45 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type of the RUM application, that is the platform of the RUM SDK. Defaults to `browser` on create. + class RUMApplicationPlatformType + include BaseEnumModel + + BROWSER = "browser".freeze + IOS = "ios".freeze + ANDROID = "android".freeze + REACT_NATIVE = "react-native".freeze + FLUTTER = "flutter".freeze + ROKU = "roku".freeze + ELECTRON = "electron".freeze + UNITY = "unity".freeze + KOTLIN_MULTIPLATFORM = "kotlin-multiplatform".freeze + REACT = "react".freeze + NEXTJS = "nextjs".freeze + ANGULAR = "angular".freeze + VUEJS = "vuejs".freeze + NUXT = "nuxt".freeze + TANSTACK = "tanstack".freeze + MAUI = "maui".freeze + SALESFORCE_LWC = "salesforce-lwc".freeze + SHOPIFY = "shopify".freeze + CPP = "cpp".freeze + UNREAL = "unreal".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_application_update.rb b/lib/datadog_api_client/v2/models/rum_application_update.rb index 5f64233669c9..98c18d393489 100644 --- a/lib/datadog_api_client/v2/models/rum_application_update.rb +++ b/lib/datadog_api_client/v2/models/rum_application_update.rb @@ -21,7 +21,8 @@ module DatadogAPIClient::V2 class RUMApplicationUpdate include BaseGenericModel - # 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. attr_accessor :attributes # RUM application ID. diff --git a/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb b/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb index d84b5c722dce..7f07eda035ea 100644 --- a/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_application_update_attributes.rb @@ -17,20 +17,39 @@ require 'time' module DatadogAPIClient::V2 - # 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. class RUMApplicationUpdateAttributes include BaseGenericModel - # Name of the RUM application. - attr_accessor :name + # Whether flat sampling of Session Replay for APM-correlated RUM sessions is enabled. + attr_accessor :apm_rum_flat_sampling_replay_enabled - # Controls the retention policy for Product Analytics data derived from RUM events. + # Fraction (0 to 1) of APM-correlated RUM sessions with Session Replay when flat sampling is enabled. + attr_reader :apm_rum_flat_sampling_replay_sample_rate + + # Whether Error Tracking exclusion filters are enabled for the application. + attr_accessor :error_tracking_exclusion_filter_enabled + + # New name of the RUM application. Between 1 and 255 characters. + attr_reader :name + + # Sample rate (0-100) of Session Replay for Product Analytics sessions. + attr_reader :product_analytics_replay_sample_rate + + # 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. attr_accessor :product_analytics_retention_state - # Configures which RUM events are processed and stored for the application. + # ID of the RUM SDK remote configuration to associate with the application. + attr_accessor :remote_config_id + + # Configures which RUM events are processed and stored for the application. Defaults to `ALL` when creating an application. attr_accessor :rum_event_processing_state - # Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. + # New list of tags for the RUM application, in `key:value` format. Replaces the existing tags. + attr_accessor :tags + + # Type of the RUM application, that is the platform of the RUM SDK. Defaults to `browser` on create. attr_accessor :type attr_accessor :additional_properties @@ -39,9 +58,15 @@ class RUMApplicationUpdateAttributes # @!visibility private def self.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' } end @@ -50,10 +75,16 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'apm_rum_flat_sampling_replay_enabled' => :'Boolean', + :'apm_rum_flat_sampling_replay_sample_rate' => :'Float', + :'error_tracking_exclusion_filter_enabled' => :'Boolean', :'name' => :'String', - :'product_analytics_retention_state' => :'RUMProductAnalyticsRetentionState', + :'product_analytics_replay_sample_rate' => :'Integer', + :'product_analytics_retention_state' => :'RUMProductAnalyticsRetentionStateRequest', + :'remote_config_id' => :'String', :'rum_event_processing_state' => :'RUMEventProcessingState', - :'type' => :'String' + :'tags' => :'Array', + :'type' => :'RUMApplicationPlatformType' } end @@ -75,23 +106,97 @@ def initialize(attributes = {}) end } + if attributes.key?(:'apm_rum_flat_sampling_replay_enabled') + self.apm_rum_flat_sampling_replay_enabled = attributes[:'apm_rum_flat_sampling_replay_enabled'] + end + + if attributes.key?(:'apm_rum_flat_sampling_replay_sample_rate') + self.apm_rum_flat_sampling_replay_sample_rate = attributes[:'apm_rum_flat_sampling_replay_sample_rate'] + end + + if attributes.key?(:'error_tracking_exclusion_filter_enabled') + self.error_tracking_exclusion_filter_enabled = attributes[:'error_tracking_exclusion_filter_enabled'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end + if attributes.key?(:'product_analytics_replay_sample_rate') + self.product_analytics_replay_sample_rate = attributes[:'product_analytics_replay_sample_rate'] + end + if attributes.key?(:'product_analytics_retention_state') self.product_analytics_retention_state = attributes[:'product_analytics_retention_state'] end + if attributes.key?(:'remote_config_id') + self.remote_config_id = attributes[:'remote_config_id'] + end + if attributes.key?(:'rum_event_processing_state') self.rum_event_processing_state = attributes[:'rum_event_processing_state'] end + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + if attributes.key?(:'type') self.type = attributes[:'type'] end end + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@apm_rum_flat_sampling_replay_sample_rate.nil? && @apm_rum_flat_sampling_replay_sample_rate > 1 + return false if !@apm_rum_flat_sampling_replay_sample_rate.nil? && @apm_rum_flat_sampling_replay_sample_rate < 0 + return false if !@name.nil? && @name.to_s.length > 255 + return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate > 100 + return false if !@product_analytics_replay_sample_rate.nil? && @product_analytics_replay_sample_rate < 0 + true + end + + # Custom attribute writer method with validation + # @param apm_rum_flat_sampling_replay_sample_rate [Object] Object to be assigned + # @!visibility private + def apm_rum_flat_sampling_replay_sample_rate=(apm_rum_flat_sampling_replay_sample_rate) + if !apm_rum_flat_sampling_replay_sample_rate.nil? && apm_rum_flat_sampling_replay_sample_rate > 1 + fail ArgumentError, 'invalid value for "apm_rum_flat_sampling_replay_sample_rate", must be smaller than or equal to 1.' + end + if !apm_rum_flat_sampling_replay_sample_rate.nil? && apm_rum_flat_sampling_replay_sample_rate < 0 + fail ArgumentError, 'invalid value for "apm_rum_flat_sampling_replay_sample_rate", must be greater than or equal to 0.' + end + @apm_rum_flat_sampling_replay_sample_rate = apm_rum_flat_sampling_replay_sample_rate + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if !name.nil? && name.to_s.length > 255 + fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param product_analytics_replay_sample_rate [Object] Object to be assigned + # @!visibility private + def product_analytics_replay_sample_rate=(product_analytics_replay_sample_rate) + if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate > 100 + fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be smaller than or equal to 100.' + end + if !product_analytics_replay_sample_rate.nil? && product_analytics_replay_sample_rate < 0 + fail ArgumentError, 'invalid value for "product_analytics_replay_sample_rate", must be greater than or equal to 0.' + end + @product_analytics_replay_sample_rate = product_analytics_replay_sample_rate + end + # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -118,9 +223,15 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + apm_rum_flat_sampling_replay_enabled == o.apm_rum_flat_sampling_replay_enabled && + apm_rum_flat_sampling_replay_sample_rate == o.apm_rum_flat_sampling_replay_sample_rate && + error_tracking_exclusion_filter_enabled == o.error_tracking_exclusion_filter_enabled && name == o.name && + product_analytics_replay_sample_rate == o.product_analytics_replay_sample_rate && product_analytics_retention_state == o.product_analytics_retention_state && + remote_config_id == o.remote_config_id && rum_event_processing_state == o.rum_event_processing_state && + tags == o.tags && type == o.type && additional_properties == o.additional_properties end @@ -129,7 +240,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [name, product_analytics_retention_state, rum_event_processing_state, type, additional_properties].hash + [apm_rum_flat_sampling_replay_enabled, apm_rum_flat_sampling_replay_sample_rate, error_tracking_exclusion_filter_enabled, name, product_analytics_replay_sample_rate, product_analytics_retention_state, remote_config_id, rum_event_processing_state, tags, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/rum_compute.rb b/lib/datadog_api_client/v2/models/rum_compute.rb index 5265e626c59d..e64c2b40dbd7 100644 --- a/lib/datadog_api_client/v2/models/rum_compute.rb +++ b/lib/datadog_api_client/v2/models/rum_compute.rb @@ -17,21 +17,21 @@ require 'time' module DatadogAPIClient::V2 - # 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. class RUMCompute include BaseGenericModel - # 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`. attr_reader :aggregation - # 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. attr_accessor :interval - # The metric to use. + # The attribute to aggregate, for example `@view.loading_time`. Required for all aggregations except `count`. attr_accessor :metric - # The type of compute. + # The type of compute. `total` returns one value per bucket. `timeseries` returns a list of time points per bucket. attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/rum_compute_type.rb b/lib/datadog_api_client/v2/models/rum_compute_type.rb index c30c16b65835..b88668abb833 100644 --- a/lib/datadog_api_client/v2/models/rum_compute_type.rb +++ b/lib/datadog_api_client/v2/models/rum_compute_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The type of compute. + # The type of compute. `total` returns one value per bucket. `timeseries` returns a list of time points per bucket. class RUMComputeType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/rum_event_attributes.rb b/lib/datadog_api_client/v2/models/rum_event_attributes.rb index 8c2945f8a041..42f57e73b763 100644 --- a/lib/datadog_api_client/v2/models/rum_event_attributes.rb +++ b/lib/datadog_api_client/v2/models/rum_event_attributes.rb @@ -21,7 +21,8 @@ module DatadogAPIClient::V2 class RUMEventAttributes include BaseGenericModel - # JSON object of attributes from RUM events. + # 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. attr_accessor :attributes # The name of the application or service generating RUM events. @@ -29,10 +30,10 @@ class RUMEventAttributes # value when you use both products. attr_accessor :service - # Array of tags associated with your event. + # Array of tags associated with your event, in `key:value` format. attr_accessor :tags - # Timestamp of your event. + # Timestamp of your event, in ISO 8601 format. attr_accessor :timestamp attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/rum_event_processing_scale.rb b/lib/datadog_api_client/v2/models/rum_event_processing_scale.rb index 016ef80e8c32..488fdf55bd3f 100644 --- a/lib/datadog_api_client/v2/models/rum_event_processing_scale.rb +++ b/lib/datadog_api_client/v2/models/rum_event_processing_scale.rb @@ -24,7 +24,7 @@ class RUMEventProcessingScale # Timestamp in milliseconds when this scale was last modified. attr_accessor :last_modified_at - # 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. attr_accessor :state attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/rum_event_processing_state.rb b/lib/datadog_api_client/v2/models/rum_event_processing_state.rb index f4517c105340..913572e0ece2 100644 --- a/lib/datadog_api_client/v2/models/rum_event_processing_state.rb +++ b/lib/datadog_api_client/v2/models/rum_event_processing_state.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # 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. class RUMEventProcessingState include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/rum_group_by.rb b/lib/datadog_api_client/v2/models/rum_group_by.rb index b115dd85548e..64442fc82c4a 100644 --- a/lib/datadog_api_client/v2/models/rum_group_by.rb +++ b/lib/datadog_api_client/v2/models/rum_group_by.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class RUMGroupBy include BaseGenericModel - # The name of the facet to use (required). + # The attribute to group by, for example `@view.name` or `@session.type` (required). attr_reader :facet # Used to perform a histogram computation (only for measure facets). @@ -31,7 +31,7 @@ class RUMGroupBy # The maximum buckets to return for this group-by. attr_accessor :limit - # 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. attr_accessor :missing # A sort rule. diff --git a/lib/datadog_api_client/v2/models/rum_group_by_missing.rb b/lib/datadog_api_client/v2/models/rum_group_by_missing.rb index 12604d924756..0d93782b0dc4 100644 --- a/lib/datadog_api_client/v2/models/rum_group_by_missing.rb +++ b/lib/datadog_api_client/v2/models/rum_group_by_missing.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # 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. module RUMGroupByMissing class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/rum_product_analytics_retention_state_request.rb b/lib/datadog_api_client/v2/models/rum_product_analytics_retention_state_request.rb new file mode 100644 index 000000000000..2a9cb66fa553 --- /dev/null +++ b/lib/datadog_api_client/v2/models/rum_product_analytics_retention_state_request.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # 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. + class RUMProductAnalyticsRetentionStateRequest + include BaseEnumModel + + MAX = "MAX".freeze + NONE = "NONE".freeze + PREVIEW = "PREVIEW".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/rum_query_filter.rb b/lib/datadog_api_client/v2/models/rum_query_filter.rb index 7206070dcb20..7fde74e9117f 100644 --- a/lib/datadog_api_client/v2/models/rum_query_filter.rb +++ b/lib/datadog_api_client/v2/models/rum_query_filter.rb @@ -21,13 +21,13 @@ module DatadogAPIClient::V2 class RUMQueryFilter include BaseGenericModel - # 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). + # 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. attr_accessor :from - # The search query following the RUM search syntax. + # 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`. attr_accessor :query - # 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). + # The maximum time for the requested events. Accepts the same formats as `from`. attr_accessor :to attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/rum_query_page_options.rb b/lib/datadog_api_client/v2/models/rum_query_page_options.rb index 61009eb6666a..68af5dee332c 100644 --- a/lib/datadog_api_client/v2/models/rum_query_page_options.rb +++ b/lib/datadog_api_client/v2/models/rum_query_page_options.rb @@ -21,10 +21,10 @@ module DatadogAPIClient::V2 class RUMQueryPageOptions include BaseGenericModel - # 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. attr_accessor :cursor - # Maximum number of events in the response. + # Maximum number of events in the response. Between 1 and 1000. attr_reader :limit attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/rum_response_links.rb b/lib/datadog_api_client/v2/models/rum_response_links.rb index cbd5bad0fc40..2b61a73b6cae 100644 --- a/lib/datadog_api_client/v2/models/rum_response_links.rb +++ b/lib/datadog_api_client/v2/models/rum_response_links.rb @@ -21,8 +21,8 @@ module DatadogAPIClient::V2 class RUMResponseLinks include BaseGenericModel - # Link for the next set of results. Note that the request can also be made using the - # POST endpoint. + # 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`. attr_accessor :_next attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/rum_response_metadata.rb b/lib/datadog_api_client/v2/models/rum_response_metadata.rb index 92078682fb19..f38562b9d9b2 100644 --- a/lib/datadog_api_client/v2/models/rum_response_metadata.rb +++ b/lib/datadog_api_client/v2/models/rum_response_metadata.rb @@ -30,7 +30,7 @@ class RUMResponseMetadata # The identifier of the request. attr_accessor :request_id - # The status of the response. + # The status of the response. `timeout` means the query did not complete in time and the results are partial. attr_accessor :status # A list of warnings (non-fatal errors) encountered. Partial results may return if diff --git a/lib/datadog_api_client/v2/models/rum_response_page.rb b/lib/datadog_api_client/v2/models/rum_response_page.rb index 2658d93fbc24..20d5feeea8b1 100644 --- a/lib/datadog_api_client/v2/models/rum_response_page.rb +++ b/lib/datadog_api_client/v2/models/rum_response_page.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class RUMResponsePage include BaseGenericModel - # 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. attr_accessor :after attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/rum_response_status.rb b/lib/datadog_api_client/v2/models/rum_response_status.rb index be090327c570..80ba5b3b5ec3 100644 --- a/lib/datadog_api_client/v2/models/rum_response_status.rb +++ b/lib/datadog_api_client/v2/models/rum_response_status.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The status of the response. + # The status of the response. `timeout` means the query did not complete in time and the results are partial. class RUMResponseStatus include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/rum_search_events_request.rb b/lib/datadog_api_client/v2/models/rum_search_events_request.rb index 6afd1adf8ff2..3c88a4c32540 100644 --- a/lib/datadog_api_client/v2/models/rum_search_events_request.rb +++ b/lib/datadog_api_client/v2/models/rum_search_events_request.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # 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. class RUMSearchEventsRequest include BaseGenericModel