From 7d494cb3544cd0ea3f92e9ac71ecb6b6ce8d6ca2 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 28 Oct 2026 17:07:15 +0000 Subject: [PATCH] Regenerate client from commit 14abaca of spec repo --- .generator/schemas/v2/openapi.yaml | 364 ++++++++++++++---- .../com/datadog/api/client/v2/api/RumApi.java | 345 ++++++++++++++--- .../client/v2/model/RUMAggregateRequest.java | 2 +- .../api/client/v2/model/RUMAggregateSort.java | 9 +- .../client/v2/model/RUMAggregateSortType.java | 5 +- .../v2/model/RUMAggregationFunction.java | 7 +- .../v2/model/RUMApplicationAttributes.java | 9 +- .../client/v2/model/RUMApplicationCreate.java | 5 +- .../model/RUMApplicationCreateAttributes.java | 205 +++++++++- .../model/RUMApplicationListAttributes.java | 9 +- .../client/v2/model/RUMApplicationUpdate.java | 5 +- .../model/RUMApplicationUpdateAttributes.java | 267 ++++++++++++- .../api/client/v2/model/RUMCompute.java | 21 +- .../api/client/v2/model/RUMComputeType.java | 5 +- .../client/v2/model/RUMEventAttributes.java | 12 +- .../v2/model/RUMEventProcessingScale.java | 3 +- .../v2/model/RUMEventProcessingState.java | 5 +- .../api/client/v2/model/RUMGroupBy.java | 5 +- .../RUMProductAnalyticsRetentionScale.java | 5 +- .../RUMProductAnalyticsRetentionState.java | 7 +- .../api/client/v2/model/RUMQueryFilter.java | 20 +- .../client/v2/model/RUMQueryPageOptions.java | 6 +- .../api/client/v2/model/RUMResponseLinks.java | 7 +- .../client/v2/model/RUMResponseMetadata.java | 3 +- .../api/client/v2/model/RUMResponsePage.java | 3 +- .../client/v2/model/RUMResponseStatus.java | 5 +- .../v2/model/RUMSearchEventsRequest.java | 5 +- .../com/datadog/api/client/v2/api/rum.feature | 41 +- 28 files changed, 1206 insertions(+), 179 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 993e6653a16..bce0545fdb0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -102352,7 +102352,9 @@ components: type: number type: object RUMAggregateRequest: - description: The object sent with the request to retrieve aggregation buckets of RUM events from your organization. + description: |- + The object sent with the request to retrieve aggregation buckets of RUM events from your organization. + `filter.indexes` is not supported and ignored. properties: compute: description: The list of metrics or timeseries to compute for the retrieved buckets. @@ -102379,7 +102381,7 @@ components: $ref: "#/components/schemas/RUMAggregationFunction" metric: description: The metric to sort by (only used for `type=measure`). - example: "@duration" + example: "@view.loading_time" type: string order: $ref: "#/components/schemas/RUMSortOrder" @@ -102388,7 +102390,7 @@ components: type: object RUMAggregateSortType: default: "alphabetical" - description: The type of sorting algorithm. + description: The type of sorting algorithm. `alphabetical` sorts buckets by the facet value, `measure` sorts them by a computed aggregation. enum: ["alphabetical", "measure"] type: string x-enum-varnames: ["ALPHABETICAL", "MEASURE"] @@ -102402,7 +102404,8 @@ components: type: array type: object RUMAggregationFunction: - description: An aggregation function. + description: |- + An aggregation function. `count` counts events and needs no metric. `cardinality` counts the distinct values of the metric. `sum`, `min`, `max`, `avg`, `median` and the percentiles (`pc75` to `pc99`) apply to a numeric metric such as `@view.loading_time`. enum: ["count", "cardinality", "pc75", "pc90", "pc95", "pc98", "pc99", "sum", "min", "max", "avg", "median"] example: "pc90" type: string @@ -102539,7 +102542,7 @@ components: type: string type: array type: - description: "Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`." + description: "Type of the RUM application. Possible values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`, `react`, `nextjs`, `angular`, `vuejs`, `nuxt`, `tanstack`, `maui`, `salesforce-lwc`, `shopify`, `cpp`, `rum-cpp`, `unreal`." example: browser type: string updated_at: @@ -102574,8 +102577,19 @@ components: - type type: object RUMApplicationCreateAttributes: - description: RUM application creation attributes. + description: |- + RUM application creation attributes. + When `rum_event_processing_state` is omitted, it defaults to `ALL`. When `product_analytics_retention_state` is omitted, Product Analytics is not enabled. Setting it to `MAX` requires the `product_analytics_apps_write` permission. properties: + apm_rum_flat_sampling_replay_enabled: + description: Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. Defaults to `true`. + example: true + type: boolean + apm_rum_flat_sampling_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. Defaults to `1`. + example: 1 + format: double + type: number create_default_retention_filters: default: true description: |- @@ -102584,16 +102598,35 @@ components: This setting doesn't affect permanent retention filters (sessions with forced replays, Synthetics sessions and RUM-APM flat sampling). example: false type: boolean + error_tracking_exclusion_filter_enabled: + description: Indicates if Error Tracking exclusion filters are enabled for the application. Defaults to `false`. + example: false + type: boolean name: - description: Name of the RUM application. + description: Name of the RUM application. Between 1 and 255 characters. example: my_new_rum_application + maxLength: 255 type: string + product_analytics_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for Product Analytics sessions. Defaults to `100`. + example: 100 + format: int32 + maximum: 2147483647 + type: integer product_analytics_retention_state: $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" rum_event_processing_state: $ref: "#/components/schemas/RUMEventProcessingState" + tags: + description: List of tags to associate with the RUM application, in `key:value` format. + example: + - "team:rum" + items: + description: Tag associated with the RUM application. + type: string + type: array type: - description: "Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`." + description: "Type of the RUM application. Defaults to `browser`. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`, `react`, `nextjs`, `angular`, `vuejs`, `nuxt`, `tanstack`, `maui`, `salesforce-lwc`, `shopify`, `cpp`, `rum-cpp`, `unreal`." example: browser type: string required: @@ -102733,7 +102766,7 @@ components: type: string type: array type: - description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`. + description: Type of the RUM application. Possible values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`, `react`, `nextjs`, `angular`, `vuejs`, `nuxt`, `tanstack`, `maui`, `salesforce-lwc`, `shopify`, `cpp`, `rum-cpp`, `unreal`. example: browser type: string updated_at: @@ -102795,18 +102828,55 @@ components: - type type: object RUMApplicationUpdateAttributes: - description: RUM application update attributes. + description: |- + RUM application update attributes. Only the attributes you provide are changed, omitted attributes keep their current value. + Changing `product_analytics_retention_state` or `product_analytics_replay_sample_rate` requires the `product_analytics_apps_write` permission. properties: + apm_rum_flat_sampling_replay_enabled: + description: Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. + example: true + type: boolean + apm_rum_flat_sampling_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is enabled. + example: 1 + format: double + type: number + error_tracking_exclusion_filter_enabled: + description: Indicates if Error Tracking exclusion filters are enabled for the application. + example: false + type: boolean + instrumentation_type: + description: Instrumentation type of the RUM application. + example: manual + type: string name: - description: Name of the RUM application. + description: New name of the RUM application. example: updated_name_for_my_existing_rum_application type: string + product_analytics_replay_sample_rate: + description: Sample rate (0-100) of Session Replay for Product Analytics sessions. + example: 100 + format: int32 + maximum: 2147483647 + type: integer product_analytics_retention_state: $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" + remote_config_id: + description: ID of the RUM SDK remote configuration to associate with the application. + example: abc12345-1234-5678-abcd-ef1234567890 + type: string rum_event_processing_state: $ref: "#/components/schemas/RUMEventProcessingState" + tags: + description: New list of tags of the RUM application, in `key:value` format. Replaces the existing tags. + example: + - "team:rum" + items: + description: Tag associated with the RUM application. + type: string + type: array type: - description: "Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`." + description: "New type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, `kotlin-multiplatform`, `react`, `nextjs`, `angular`, `vuejs`, `nuxt`, `tanstack`, `maui`, `salesforce-lwc`, `shopify`, `cpp`, `rum-cpp`, `unreal`." example: browser type: string type: object @@ -102858,19 +102928,19 @@ components: type: object type: object RUMCompute: - description: A compute rule to compute metrics or timeseries. + description: A compute rule to compute metrics or timeseries. In the response, the result of each rule is keyed `c0`, `c1`... following the order of the `compute` list. properties: aggregation: $ref: "#/components/schemas/RUMAggregationFunction" interval: description: |- - The time buckets' size (only used for type=timeseries) - Defaults to a resolution of 150 points. + The time buckets' size, for example `5m`, `1h` or `1d` (only used for `type=timeseries`). + Defaults to a resolution of 150 points over the queried time range. example: "5m" type: string metric: - description: The metric to use. - example: "@duration" + description: The attribute to aggregate, for example `@view.loading_time`. Not needed for `count`, required for the other aggregations. + example: "@view.loading_time" type: string type: $ref: "#/components/schemas/RUMComputeType" @@ -102879,7 +102949,7 @@ components: type: object RUMComputeType: default: "total" - description: The type of compute. + description: The type of compute. `total` returns one value per bucket, `timeseries` returns a list of time points per bucket. enum: ["timeseries", "total"] type: string x-enum-varnames: ["TIMESERIES", "TOTAL"] @@ -102900,8 +102970,10 @@ components: properties: attributes: additionalProperties: {} - description: JSON object of attributes from RUM events. - example: {"customAttribute": 123, "duration": 2345} + description: |- + JSON object of attributes from RUM events. Attributes are nested by path: the facet `@view.name` used in queries is returned as `attributes.view.name`. + Common attributes include `type` (the event type: `session`, `view`, `action`, `resource`, `error`, `long_task` or `vital`), `application.id`, `session.id`, `view.id`, `view.name` and `usr.id`. Durations such as `view.time_spent`, `view.loading_time` and `resource.duration` are in nanoseconds. + example: {"application": {"id": "abcd1234-0000-0000-abcd-1234abcd5678"}, "type": "view", "view": {"loading_time": 1200000000, "name": "/checkout"}} type: object service: description: |- @@ -102911,14 +102983,14 @@ components: example: "web-app" type: string tags: - description: Array of tags associated with your event. + description: Array of tags associated with your event, in `key:value` format. example: ["team:A"] items: description: Tag associated with your event. type: string type: array timestamp: - description: Timestamp of your event. + description: Timestamp of your event, in ISO 8601 format. example: "2019-01-02T09:42:36.320Z" format: date-time type: string @@ -102935,7 +103007,7 @@ components: $ref: "#/components/schemas/RUMEventProcessingState" type: object RUMEventProcessingState: - description: Configures which RUM events are processed and stored for the application. + description: Configures which RUM events are processed and stored for the application. Defaults to `ALL` when creating an application. enum: - ALL - ERROR_FOCUSED_MODE @@ -102976,8 +103048,8 @@ components: description: A group-by rule. properties: facet: - description: The name of the facet to use (required). - example: "@view.time_spent" + description: The attribute to group by, for example `@view.name` or `@session.type` (required). + example: "@view.name" type: string histogram: $ref: "#/components/schemas/RUMGroupByHistogram" @@ -103025,7 +103097,7 @@ components: - max type: object RUMGroupByMissing: - description: The value to use for logs that don't have the facet used to group by. + description: The value to use for events that don't have the facet used to group by. oneOf: - $ref: "#/components/schemas/RUMGroupByMissingString" - $ref: "#/components/schemas/RUMGroupByMissingNumber" @@ -103638,7 +103710,9 @@ components: $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" type: object RUMProductAnalyticsRetentionState: - description: Controls the retention policy for Product Analytics data derived from RUM events. + description: |- + Controls the retention policy for Product Analytics data derived from RUM events. + Requests also accept `PREVIEW` (the initial state of a new application, reported as `NONE` in responses). Setting `MAX` requires the `product_analytics_apps_write` permission. enum: - MAX - NONE @@ -103663,17 +103737,20 @@ components: properties: from: default: "now-15m" - description: The minimum time for the requested events; supports date (in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). + description: |- + The minimum time for the requested events, inclusive. Accepts date math relative to now (for example `now-15m`, `now-1h`, `now-7d`), an absolute date in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator (seconds and fractional seconds are optional), or a timestamp in milliseconds since the Unix epoch. example: "now-15m" type: string query: default: "*" - description: The search query following the RUM search syntax. + description: |- + The search query following the [RUM search syntax](https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/). Filter on attributes with `@attribute:value`, for example `@type:view @application.id: @view.name:"/checkout"`, and combine terms with `AND`, `OR` and `-` (negation). Event types are `session`, `view`, `action`, `resource`, `error`, `long_task` and `vital`. example: "@type:session AND @session.type:user" type: string to: default: "now" - description: The maximum time for the requested events; supports date (in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with full date, hours, minutes, and the `Z` UTC indicator - seconds and fractional seconds are optional), math, and regular timestamps (in milliseconds). + description: |- + The maximum time for the requested events. Accepts the same formats as `from`. example: "now" type: string type: object @@ -103698,12 +103775,12 @@ components: properties: cursor: description: |- - List following results with a cursor provided in the previous query. + Cursor to get the next page of results, taken from `meta.page.after` of the previous response. Send it with the same `filter` and `sort` as the request that returned it. example: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" type: string limit: default: 10 - description: Maximum number of events in the response. + description: Maximum number of events in the response. Between 1 and 1000. example: 25 format: int32 maximum: 1000 @@ -103714,9 +103791,9 @@ components: properties: next: description: |- - Link for the next set of results. Note that the request can also be made using the - POST endpoint. - example: "https://app.datadoghq.com/api/v2/rum/event?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" + Link for the next set of results, only present when there are more results. It always points to the `GET /api/v2/rum/events` endpoint, and keeps `filter[query]`, `filter[from]`, `filter[to]`, `sort` and `page[limit]` of the request. Note that the request can also be made using the + POST endpoint with `page.cursor` set to `meta.page.after`. + example: "https://api.datadoghq.com/api/v2/rum/events?filter[query]=foo&page[cursor]=eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" type: string type: object RUMResponseMetadata: @@ -103748,18 +103825,19 @@ components: properties: after: description: |- - The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]`. + The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of `page[cursor]` (`page.cursor` for the POST endpoint). Absent on the last page. example: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" type: string type: object RUMResponseStatus: - description: The status of the response. + description: The status of the response. `timeout` means the query did not complete in time and the results are partial. enum: ["done", "timeout"] example: "done" type: string x-enum-varnames: ["DONE", "TIMEOUT"] RUMSearchEventsRequest: - description: The request for a RUM events list. + description: |- + The request for a RUM events list. All attributes are optional: without any, the request returns the first 10 events of the last 15 minutes. properties: filter: $ref: "#/components/schemas/RUMQueryFilter" @@ -103776,6 +103854,9 @@ components: - timestamp - -timestamp type: string + x-enum-descriptions: + - Oldest events first + - Newest events first x-enum-varnames: - TIMESTAMP_ASCENDING - TIMESTAMP_DESCENDING @@ -220437,7 +220518,11 @@ paths: /api/v2/rum/analytics/aggregate: post: description: |- - The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. + Aggregate RUM events into buckets of computed metrics and timeseries. Use this endpoint for counts, percentiles, top-N breakdowns and timeseries. To read individual events, use `SearchRUMEvents` or `ListRUMEvents`. + + `filter` selects the events with the [RUM search syntax][1] and a time range (`from` and `to` accept date math such as `now-15m`, ISO 8601 dates and timestamps in milliseconds). Each `compute` rule produces one value (`type: total`) or one list of time points (`type: timeseries`) per bucket, keyed `c0`, `c1`... in the response. Each `group_by` rule splits the events into buckets by a facet, returned in `by`. Use `histogram` on a numeric facet to bucket it by ranges. + + [1]: https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/ operationId: AggregateRUMEvents requestBody: content: @@ -220468,6 +220553,22 @@ paths: page: cursor: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== limit: 25 + top_views_by_count: + summary: Top 10 views by number of view events + value: + compute: + - aggregation: count + filter: + from: now-1d + query: "@type:view @application.id:abcd1234-0000-0000-abcd-1234abcd5678" + to: now + group_by: + - facet: "@view.name" + limit: 10 + sort: + aggregation: count + order: desc + type: measure schema: $ref: "#/components/schemas/RUMAggregateRequest" required: true @@ -220507,8 +220608,48 @@ paths: - rum_apps_read /api/v2/rum/applications: get: - description: List all the RUM applications in your organization. + description: |- + List the enabled RUM applications of your organization. Applications deleted with `DeleteRUMApplication` are not returned. + The response is not paginated and does not include the `client_token`, use `GetRUMApplication` to retrieve it. + Use the `application_id` of an item as the `id` path parameter of the other application operations, and as `@application.id` in RUM event queries. operationId: GetRUMApplications + parameters: + - description: Only return applications for which RUM event processing is enabled (`true`) or not (`false`). + in: query + name: filter[rum_enabled] + required: false + schema: + type: boolean + - description: Only return applications for which Product Analytics is enabled (`true`) or not (`false`). + in: query + name: filter[product_analytics_enabled] + required: false + schema: + type: boolean + - description: Only return applications that run in error focused mode (`true`) or not (`false`). + in: query + name: filter[error_focused_mode_enabled] + required: false + schema: + type: boolean + - description: Only return applications that have an SDK remote configuration (`true`) or not (`false`). + in: query + name: filter[remote_config_enabled] + required: false + schema: + type: boolean + - description: Only return applications with this RUM event processing state. + in: query + name: filter[rum_event_processing_state] + required: false + schema: + $ref: "#/components/schemas/RUMEventProcessingState" + - description: Only return applications with this Product Analytics retention state. + in: query + name: filter[product_analytics_retention_state] + required: false + schema: + $ref: "#/components/schemas/RUMProductAnalyticsRetentionState" responses: "200": content: @@ -220531,6 +220672,12 @@ paths: schema: $ref: "#/components/schemas/RUMApplicationsResponse" description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "404": $ref: "#/components/responses/NotFoundResponse" "429": @@ -220542,7 +220689,10 @@ paths: permissions: - rum_apps_read post: - description: Create a new RUM application in your organization. + description: |- + Create a new RUM application in your organization. + The application ID is generated by Datadog and returned in `data.attributes.application_id`. A client token is created with the application and returned in `data.attributes.client_token`, use both to initialize the RUM SDK. + The application is created with the default retention filters unless `create_default_retention_filters` is `false`. operationId: CreateRUMApplication requestBody: content: @@ -220584,7 +220734,23 @@ paths: $ref: "#/components/schemas/RUMApplicationResponse" description: Created "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict "429": $ref: "#/components/responses/TooManyRequestsResponse" summary: Create a new RUM application @@ -221256,18 +221422,36 @@ paths: x-codegen-request-body-name: body /api/v2/rum/applications/{id}: delete: - description: Delete an existing RUM application in your organization. + description: |- + Delete an existing RUM application in your organization. + The application is disabled and its client token is revoked, so the RUM SDK stops sending events for it. The application ID cannot be reused or re-enabled through the API. + Deleting an application with Product Analytics enabled requires the `product_analytics_apps_write` permission. operationId: DeleteRUMApplication parameters: - - description: RUM application ID. + - description: |- + ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. + example: abcd1234-0000-0000-abcd-1234abcd5678 in: path name: id required: true schema: + pattern: "^[a-zA-Z0-9:-]+$" type: string responses: "204": description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": content: application/json: @@ -221283,14 +221467,19 @@ paths: permissions: - rum_apps_write get: - description: Get the RUM application with given ID in your organization. + description: |- + Get the RUM application with given ID in your organization. + Unlike `GetRUMApplications`, the response includes the `client_token` used to initialize the RUM SDK. operationId: GetRUMApplication parameters: - - description: RUM application ID. + - description: |- + ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. + example: abcd1234-0000-0000-abcd-1234abcd5678 in: path name: id required: true schema: + pattern: "^[a-zA-Z0-9:-]+$" type: string responses: "200": @@ -221315,6 +221504,18 @@ paths: schema: $ref: "#/components/schemas/RUMApplicationResponse" description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": content: application/json: @@ -221330,14 +221531,19 @@ paths: permissions: - rum_apps_read patch: - description: Update the RUM application with given ID in your organization. + description: |- + Update the RUM application with given ID in your organization. + This is a partial update: only the attributes present in the request are changed. `data.id` must match the `id` path parameter. operationId: UpdateRUMApplication parameters: - - description: RUM application ID. + - description: |- + ID of the RUM application, returned as `application_id` by `GetRUMApplications` and `CreateRUMApplication`. + example: abcd1234-0000-0000-abcd-1234abcd5678 in: path name: id required: true schema: + pattern: "^[a-zA-Z0-9:-]+$" type: string requestBody: content: @@ -221380,7 +221586,17 @@ paths: $ref: "#/components/schemas/RUMApplicationResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": content: application/json: @@ -221391,8 +221607,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Unprocessable Entity. + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter. "429": $ref: "#/components/responses/TooManyRequestsResponse" summary: Update a RUM application @@ -222302,52 +222518,52 @@ paths: /api/v2/rum/events: get: description: |- - List endpoint returns events that match a RUM search query. - [Results are paginated][1]. + Returns the RUM events that match a RUM search query within a time range. Use this endpoint to see your latest RUM events with a simple query. For long filters, use `SearchRUMEvents`. To compute counts, percentiles or timeseries, use `AggregateRUMEvents`. + + The query follows the [RUM search syntax][2]. Without `filter[from]` and `filter[to]`, the last 15 minutes are searched. - Use this endpoint to see your latest RUM events. + [Results are paginated][1]: `page[limit]` is at most 1000 (default 10). When more results are available, the response contains `meta.page.after` and `links.next`. Request `links.next`, or send `meta.page.after` as `page[cursor]` with the same other parameters, and repeat until they are absent. [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + [2]: https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/ operationId: ListRUMEvents parameters: - - description: Search query following RUM syntax. - example: "@type:session @application_id:xxxx" + - description: Search query following the [RUM search syntax](https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/). Defaults to `*`. + example: "@type:session @application.id:abcd1234-0000-0000-abcd-1234abcd5678" in: query name: filter[query] required: false schema: type: string - - description: Minimum timestamp for requested events. - example: "2019-01-02T09:42:36.320Z" + - description: Minimum time for requested events, inclusive. Accepts date math (for example `now-15m`), an ISO 8601 date, or a timestamp in milliseconds. Defaults to `now-15m`. + example: "now-1h" in: query name: filter[from] required: false schema: - format: date-time type: string - - description: Maximum timestamp for requested events. - example: "2019-01-03T09:42:36.320Z" + - description: Maximum time for requested events. Accepts the same formats as `filter[from]`. Defaults to `now`. + example: "now" in: query name: filter[to] required: false schema: - format: date-time type: string - - description: Order of events in results. + - description: Order of events in results, by event timestamp. in: query name: sort required: false schema: $ref: "#/components/schemas/RUMSort" - description: |- - List following results with a cursor provided in the previous query. + Cursor to get the next page of results, taken from `meta.page.after` or `links.next` of the previous response. Use it with the same other parameters. example: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==" in: query name: page[cursor] required: false schema: type: string - - description: Maximum number of events in the response. + - description: Maximum number of events in the response. Between 1 and 1000. example: 25 in: query name: page[limit] @@ -222393,12 +222609,14 @@ paths: /api/v2/rum/events/search: post: description: |- - List endpoint returns RUM events that match a RUM search query. - [Results are paginated][1]. + Returns the RUM events that match a RUM search query within a time range, as a list of individual events. Use this endpoint when the filter is too long for a query string, or to set `options`. To compute counts, percentiles or timeseries instead of reading events, use `AggregateRUMEvents`. + + The query follows the [RUM search syntax][2]. `filter.from` and `filter.to` accept date math (`now-15m`), ISO 8601 dates and timestamps in milliseconds. - Use this endpoint to build complex RUM events filtering and search. + [Results are paginated][1]: `page.limit` is at most 1000 (default 10). When more results are available, the response contains `meta.page.after`. Send it as `page.cursor`, with the same `filter` and `sort`, to get the next page, and repeat until `meta.page.after` is absent. [1]: https://docs.datadoghq.com/logs/guide/collect-multiple-logs-with-pagination + [2]: https://docs.datadoghq.com/real_user_monitoring/explorer/search_syntax/ operationId: SearchRUMEvents requestBody: content: @@ -222416,6 +222634,16 @@ paths: cursor: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== limit: 25 sort: timestamp + latest_errors: + summary: Newest errors of an application in the last hour + value: + filter: + from: now-1h + query: "@type:error @application.id:abcd1234-0000-0000-abcd-1234abcd5678" + to: now + page: + limit: 50 + sort: -timestamp schema: $ref: "#/components/schemas/RUMSearchEventsRequest" required: true diff --git a/src/main/java/com/datadog/api/client/v2/api/RumApi.java b/src/main/java/com/datadog/api/client/v2/api/RumApi.java index 7851f28d100..9200546b330 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumApi.java @@ -13,7 +13,9 @@ import com.datadog.api.client.v2.model.RUMApplicationUpdateRequest; import com.datadog.api.client.v2.model.RUMApplicationsResponse; import com.datadog.api.client.v2.model.RUMEvent; +import com.datadog.api.client.v2.model.RUMEventProcessingState; import com.datadog.api.client.v2.model.RUMEventsResponse; +import com.datadog.api.client.v2.model.RUMProductAnalyticsRetentionState; import com.datadog.api.client.v2.model.RUMQueryPageOptions; import com.datadog.api.client.v2.model.RUMSearchEventsRequest; import com.datadog.api.client.v2.model.RUMSort; @@ -25,7 +27,6 @@ import com.datadog.api.client.v2.model.SourcemapsResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; -import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; @@ -97,7 +98,18 @@ public CompletableFuture aggregateRUMEventsAsync( } /** - * The API endpoint to aggregate RUM events into buckets of computed metrics and timeseries. + * Aggregate RUM events into buckets of computed metrics and timeseries. Use this endpoint for + * counts, percentiles, top-N breakdowns and timeseries. To read individual events, use + * SearchRUMEvents or ListRUMEvents. + * + *

filter selects the events with the RUM search + * syntax and a time range (from and to accept date math such as + * now-15m, ISO 8601 dates and timestamps in milliseconds). Each compute + * rule produces one value (type: total) or one list of time points ( + * type: timeseries) per bucket, keyed c0, c1... in the response. + * Each group_by rule splits the events into buckets by a facet, returned in by + * . Use histogram on a numeric facet to bucket it by ranges. * * @param body (required) * @return ApiResponse<RUMAnalyticsAggregateResponse> @@ -232,7 +244,11 @@ public CompletableFuture createRUMApplicationAsync( } /** - * Create a new RUM application in your organization. + * Create a new RUM application in your organization. The application ID is generated by Datadog + * and returned in data.attributes.application_id. A client token is created with the + * application and returned in data.attributes.client_token, use both to initialize + * the RUM SDK. The application is created with the default retention filters unless + * create_default_retention_filters is false. * * @param body (required) * @return ApiResponse<RUMApplicationResponse> @@ -243,6 +259,8 @@ public CompletableFuture createRUMApplicationAsync( * Status Code Description Response Headers * 201 Created - * 400 Bad Request - + * 403 Forbidden - + * 409 Conflict - * 429 Too many requests - * */ @@ -337,7 +355,8 @@ public ApiResponse createRUMApplicationWithHttpInfo( * *

See {@link #deleteRUMApplicationWithHttpInfo}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @throws ApiException if fails to make API call */ public void deleteRUMApplication(String id) throws ApiException { @@ -349,7 +368,8 @@ public void deleteRUMApplication(String id) throws ApiException { * *

See {@link #deleteRUMApplicationWithHttpInfoAsync}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @return CompletableFuture */ public CompletableFuture deleteRUMApplicationAsync(String id) { @@ -361,9 +381,13 @@ public CompletableFuture deleteRUMApplicationAsync(String id) { } /** - * Delete an existing RUM application in your organization. + * Delete an existing RUM application in your organization. The application is disabled and its + * client token is revoked, so the RUM SDK stops sending events for it. The application ID cannot + * be reused or re-enabled through the API. Deleting an application with Product Analytics enabled + * requires the product_analytics_apps_write permission. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -371,6 +395,8 @@ public CompletableFuture deleteRUMApplicationAsync(String id) { * Response details * Status Code Description Response Headers * 204 No Content - + * 400 Bad Request - + * 403 Forbidden - * 404 Not Found - * 429 Too many requests - * @@ -415,7 +441,8 @@ public ApiResponse deleteRUMApplicationWithHttpInfo(String id) throws ApiE * *

See {@link #deleteRUMApplicationWithHttpInfo}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> deleteRUMApplicationWithHttpInfoAsync(String id) { @@ -1049,7 +1076,8 @@ public CompletableFuture> deleteSourcemapsWithHt * *

See {@link #getRUMApplicationWithHttpInfo}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @return RUMApplicationResponse * @throws ApiException if fails to make API call */ @@ -1062,7 +1090,8 @@ public RUMApplicationResponse getRUMApplication(String id) throws ApiException { * *

See {@link #getRUMApplicationWithHttpInfoAsync}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @return CompletableFuture<RUMApplicationResponse> */ public CompletableFuture getRUMApplicationAsync(String id) { @@ -1074,9 +1103,11 @@ public CompletableFuture getRUMApplicationAsync(String i } /** - * Get the RUM application with given ID in your organization. + * Get the RUM application with given ID in your organization. Unlike GetRUMApplications + * , the response includes the client_token used to initialize the RUM SDK. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @return ApiResponse<RUMApplicationResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -1084,6 +1115,8 @@ public CompletableFuture getRUMApplicationAsync(String i * Response details * Status Code Description Response Headers * 200 OK - + * 400 Bad Request - + * 403 Forbidden - * 404 Not Found - * 429 Too many requests - * @@ -1129,7 +1162,8 @@ public ApiResponse getRUMApplicationWithHttpInfo(String * *

See {@link #getRUMApplicationWithHttpInfo}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @return CompletableFuture<ApiResponse<RUMApplicationResponse>> */ public CompletableFuture> getRUMApplicationWithHttpInfoAsync( @@ -1178,6 +1212,93 @@ public CompletableFuture> getRUMApplicationW new GenericType() {}); } + /** Manage optional parameters to getRUMApplications. */ + public static class GetRUMApplicationsOptionalParameters { + private Boolean filterRumEnabled; + private Boolean filterProductAnalyticsEnabled; + private Boolean filterErrorFocusedModeEnabled; + private Boolean filterRemoteConfigEnabled; + private RUMEventProcessingState filterRumEventProcessingState; + private RUMProductAnalyticsRetentionState filterProductAnalyticsRetentionState; + + /** + * Set filterRumEnabled. + * + * @param filterRumEnabled Only return applications for which RUM event processing is enabled ( + * true) or not (false). (optional) + * @return GetRUMApplicationsOptionalParameters + */ + public GetRUMApplicationsOptionalParameters filterRumEnabled(Boolean filterRumEnabled) { + this.filterRumEnabled = filterRumEnabled; + return this; + } + + /** + * Set filterProductAnalyticsEnabled. + * + * @param filterProductAnalyticsEnabled Only return applications for which Product Analytics is + * enabled (true) or not (false). (optional) + * @return GetRUMApplicationsOptionalParameters + */ + public GetRUMApplicationsOptionalParameters filterProductAnalyticsEnabled( + Boolean filterProductAnalyticsEnabled) { + this.filterProductAnalyticsEnabled = filterProductAnalyticsEnabled; + return this; + } + + /** + * Set filterErrorFocusedModeEnabled. + * + * @param filterErrorFocusedModeEnabled Only return applications that run in error focused mode + * (true) or not (false). (optional) + * @return GetRUMApplicationsOptionalParameters + */ + public GetRUMApplicationsOptionalParameters filterErrorFocusedModeEnabled( + Boolean filterErrorFocusedModeEnabled) { + this.filterErrorFocusedModeEnabled = filterErrorFocusedModeEnabled; + return this; + } + + /** + * Set filterRemoteConfigEnabled. + * + * @param filterRemoteConfigEnabled Only return applications that have an SDK remote + * configuration (true) or not (false). (optional) + * @return GetRUMApplicationsOptionalParameters + */ + public GetRUMApplicationsOptionalParameters filterRemoteConfigEnabled( + Boolean filterRemoteConfigEnabled) { + this.filterRemoteConfigEnabled = filterRemoteConfigEnabled; + return this; + } + + /** + * Set filterRumEventProcessingState. + * + * @param filterRumEventProcessingState Only return applications with this RUM event processing + * state. (optional) + * @return GetRUMApplicationsOptionalParameters + */ + public GetRUMApplicationsOptionalParameters filterRumEventProcessingState( + RUMEventProcessingState filterRumEventProcessingState) { + this.filterRumEventProcessingState = filterRumEventProcessingState; + return this; + } + + /** + * Set filterProductAnalyticsRetentionState. + * + * @param filterProductAnalyticsRetentionState Only return applications with this Product + * Analytics retention state. (optional) + * @return GetRUMApplicationsOptionalParameters + */ + public GetRUMApplicationsOptionalParameters filterProductAnalyticsRetentionState( + RUMProductAnalyticsRetentionState filterProductAnalyticsRetentionState) { + this.filterProductAnalyticsRetentionState = filterProductAnalyticsRetentionState; + return this; + } + } + /** * List all the RUM applications. * @@ -1187,7 +1308,7 @@ public CompletableFuture> getRUMApplicationW * @throws ApiException if fails to make API call */ public RUMApplicationsResponse getRUMApplications() throws ApiException { - return getRUMApplicationsWithHttpInfo().getData(); + return getRUMApplicationsWithHttpInfo(new GetRUMApplicationsOptionalParameters()).getData(); } /** @@ -1198,7 +1319,7 @@ public RUMApplicationsResponse getRUMApplications() throws ApiException { * @return CompletableFuture<RUMApplicationsResponse> */ public CompletableFuture getRUMApplicationsAsync() { - return getRUMApplicationsWithHttpInfoAsync() + return getRUMApplicationsWithHttpInfoAsync(new GetRUMApplicationsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -1206,8 +1327,44 @@ public CompletableFuture getRUMApplicationsAsync() { } /** - * List all the RUM applications in your organization. + * List all the RUM applications. + * + *

See {@link #getRUMApplicationsWithHttpInfo}. * + * @param parameters Optional parameters for the request. + * @return RUMApplicationsResponse + * @throws ApiException if fails to make API call + */ + public RUMApplicationsResponse getRUMApplications(GetRUMApplicationsOptionalParameters parameters) + throws ApiException { + return getRUMApplicationsWithHttpInfo(parameters).getData(); + } + + /** + * List all the RUM applications. + * + *

See {@link #getRUMApplicationsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<RUMApplicationsResponse> + */ + public CompletableFuture getRUMApplicationsAsync( + GetRUMApplicationsOptionalParameters parameters) { + return getRUMApplicationsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * 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 parameters Optional parameters for the request. * @return ApiResponse<RUMApplicationsResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -1215,22 +1372,50 @@ public CompletableFuture getRUMApplicationsAsync() { * Response details * Status Code Description Response Headers * 200 OK - + * 400 Bad Request - * 404 Not Found - * 429 Too many requests - * */ - public ApiResponse getRUMApplicationsWithHttpInfo() throws ApiException { + public ApiResponse getRUMApplicationsWithHttpInfo( + GetRUMApplicationsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; + Boolean filterRumEnabled = parameters.filterRumEnabled; + Boolean filterProductAnalyticsEnabled = parameters.filterProductAnalyticsEnabled; + Boolean filterErrorFocusedModeEnabled = parameters.filterErrorFocusedModeEnabled; + Boolean filterRemoteConfigEnabled = parameters.filterRemoteConfigEnabled; + RUMEventProcessingState filterRumEventProcessingState = + parameters.filterRumEventProcessingState; + RUMProductAnalyticsRetentionState filterProductAnalyticsRetentionState = + parameters.filterProductAnalyticsRetentionState; // create path and map variables String localVarPath = "/api/v2/rum/applications"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[rum_enabled]", filterRumEnabled)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[product_analytics_enabled]", filterProductAnalyticsEnabled)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[error_focused_mode_enabled]", filterErrorFocusedModeEnabled)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[remote_config_enabled]", filterRemoteConfigEnabled)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[rum_event_processing_state]", filterRumEventProcessingState)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[product_analytics_retention_state]", filterProductAnalyticsRetentionState)); + Invocation.Builder builder = apiClient.createBuilder( "v2.RumApi.getRUMApplications", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -1251,23 +1436,50 @@ public ApiResponse getRUMApplicationsWithHttpInfo() thr * *

See {@link #getRUMApplicationsWithHttpInfo}. * + * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<RUMApplicationsResponse>> */ public CompletableFuture> - getRUMApplicationsWithHttpInfoAsync() { + getRUMApplicationsWithHttpInfoAsync(GetRUMApplicationsOptionalParameters parameters) { Object localVarPostBody = null; + Boolean filterRumEnabled = parameters.filterRumEnabled; + Boolean filterProductAnalyticsEnabled = parameters.filterProductAnalyticsEnabled; + Boolean filterErrorFocusedModeEnabled = parameters.filterErrorFocusedModeEnabled; + Boolean filterRemoteConfigEnabled = parameters.filterRemoteConfigEnabled; + RUMEventProcessingState filterRumEventProcessingState = + parameters.filterRumEventProcessingState; + RUMProductAnalyticsRetentionState filterProductAnalyticsRetentionState = + parameters.filterProductAnalyticsRetentionState; // create path and map variables String localVarPath = "/api/v2/rum/applications"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[rum_enabled]", filterRumEnabled)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[product_analytics_enabled]", filterProductAnalyticsEnabled)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[error_focused_mode_enabled]", filterErrorFocusedModeEnabled)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[remote_config_enabled]", filterRemoteConfigEnabled)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[rum_event_processing_state]", filterRumEventProcessingState)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[product_analytics_retention_state]", filterProductAnalyticsRetentionState)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( "v2.RumApi.getRUMApplications", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -1713,8 +1925,8 @@ public CompletableFuture> getSourcemapsWithHt /** Manage optional parameters to listRUMEvents. */ public static class ListRUMEventsOptionalParameters { private String filterQuery; - private OffsetDateTime filterFrom; - private OffsetDateTime filterTo; + private String filterFrom; + private String filterTo; private RUMSort sort; private String pageCursor; private Integer pageLimit; @@ -1722,7 +1934,9 @@ public static class ListRUMEventsOptionalParameters { /** * Set filterQuery. * - * @param filterQuery Search query following RUM syntax. (optional) + * @param filterQuery Search query following the RUM search + * syntax. Defaults to *. (optional) * @return ListRUMEventsOptionalParameters */ public ListRUMEventsOptionalParameters filterQuery(String filterQuery) { @@ -1733,10 +1947,12 @@ public ListRUMEventsOptionalParameters filterQuery(String filterQuery) { /** * Set filterFrom. * - * @param filterFrom Minimum timestamp for requested events. (optional) + * @param filterFrom 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. (optional) * @return ListRUMEventsOptionalParameters */ - public ListRUMEventsOptionalParameters filterFrom(OffsetDateTime filterFrom) { + public ListRUMEventsOptionalParameters filterFrom(String filterFrom) { this.filterFrom = filterFrom; return this; } @@ -1744,10 +1960,11 @@ public ListRUMEventsOptionalParameters filterFrom(OffsetDateTime filterFrom) { /** * Set filterTo. * - * @param filterTo Maximum timestamp for requested events. (optional) + * @param filterTo Maximum time for requested events. Accepts the same formats as + * filter[from]. Defaults to now. (optional) * @return ListRUMEventsOptionalParameters */ - public ListRUMEventsOptionalParameters filterTo(OffsetDateTime filterTo) { + public ListRUMEventsOptionalParameters filterTo(String filterTo) { this.filterTo = filterTo; return this; } @@ -1755,7 +1972,7 @@ public ListRUMEventsOptionalParameters filterTo(OffsetDateTime filterTo) { /** * Set sort. * - * @param sort Order of events in results. (optional) + * @param sort Order of events in results, by event timestamp. (optional) * @return ListRUMEventsOptionalParameters */ public ListRUMEventsOptionalParameters sort(RUMSort sort) { @@ -1766,8 +1983,9 @@ public ListRUMEventsOptionalParameters sort(RUMSort sort) { /** * Set pageCursor. * - * @param pageCursor List following results with a cursor provided in the previous query. - * (optional) + * @param pageCursor 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. (optional) * @return ListRUMEventsOptionalParameters */ public ListRUMEventsOptionalParameters pageCursor(String pageCursor) { @@ -1778,7 +1996,8 @@ public ListRUMEventsOptionalParameters pageCursor(String pageCursor) { /** * Set pageLimit. * - * @param pageLimit Maximum number of events in the response. (optional, default to 10) + * @param pageLimit Maximum number of events in the response. Between 1 and 1000. (optional, + * default to 10) * @return ListRUMEventsOptionalParameters */ public ListRUMEventsOptionalParameters pageLimit(Integer pageLimit) { @@ -1900,11 +2119,21 @@ public PaginationIterable listRUMEventsWithPagination( } /** - * List endpoint returns events that match a RUM search query. Results are - * paginated. + * Returns the RUM events that match a RUM search query within a time range. Use this endpoint to + * see your latest RUM events with a simple query. For long filters, use SearchRUMEvents + * . To compute counts, percentiles or timeseries, use AggregateRUMEvents. + * + *

The query follows the RUM search + * syntax. Without filter[from] and filter[to], the last 15 minutes + * are searched. * - *

Use this endpoint to see your latest RUM events. + *

Results are + * paginated: page[limit] is at most 1000 (default 10). When more results are + * available, the response contains meta.page.after and links.next. + * Request links.next, or send meta.page.after as page[cursor] + * with the same other parameters, and repeat until they are absent. * * @param parameters Optional parameters for the request. * @return ApiResponse<RUMEventsResponse> @@ -1923,8 +2152,8 @@ public ApiResponse listRUMEventsWithHttpInfo( ListRUMEventsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; - OffsetDateTime filterFrom = parameters.filterFrom; - OffsetDateTime filterTo = parameters.filterTo; + String filterFrom = parameters.filterFrom; + String filterTo = parameters.filterTo; RUMSort sort = parameters.sort; String pageCursor = parameters.pageCursor; Integer pageLimit = parameters.pageLimit; @@ -1973,8 +2202,8 @@ public CompletableFuture> listRUMEventsWithHttpIn ListRUMEventsOptionalParameters parameters) { Object localVarPostBody = null; String filterQuery = parameters.filterQuery; - OffsetDateTime filterFrom = parameters.filterFrom; - OffsetDateTime filterTo = parameters.filterTo; + String filterFrom = parameters.filterFrom; + String filterTo = parameters.filterTo; RUMSort sort = parameters.sort; String pageCursor = parameters.pageCursor; Integer pageLimit = parameters.pageLimit; @@ -3350,11 +3579,22 @@ public PaginationIterable searchRUMEventsWithPagination(RUMSearchEvent } /** - * List endpoint returns RUM events that match a RUM search query. Results are - * paginated. + * Returns the RUM events that match a RUM search query within a time range, as a list of + * individual events. Use this endpoint when the filter is too long for a query string, or to set + * options. To compute counts, percentiles or timeseries instead of reading events, + * use AggregateRUMEvents. + * + *

The query follows the RUM search + * syntax. filter.from and filter.to accept date math (now-15m + * ), ISO 8601 dates and timestamps in milliseconds. * - *

Use this endpoint to build complex RUM events filtering and search. + *

Results are + * paginated: page.limit is at most 1000 (default 10). When more results are + * available, the response contains meta.page.after. Send it as page.cursor + * , with the same filter and sort, to get the next page, and + * repeat until meta.page.after is absent. * * @param body (required) * @return ApiResponse<RUMEventsResponse> @@ -3460,7 +3700,8 @@ public CompletableFuture> searchRUMEventsWithHttp * *

See {@link #updateRUMApplicationWithHttpInfo}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @param body (required) * @return RUMApplicationResponse * @throws ApiException if fails to make API call @@ -3475,7 +3716,8 @@ public RUMApplicationResponse updateRUMApplication(String id, RUMApplicationUpda * *

See {@link #updateRUMApplicationWithHttpInfoAsync}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @param body (required) * @return CompletableFuture<RUMApplicationResponse> */ @@ -3489,9 +3731,12 @@ public CompletableFuture updateRUMApplicationAsync( } /** - * Update the RUM application with given ID in your organization. + * Update the RUM application with given ID in your organization. This is a partial update: only + * the attributes present in the request are changed. data.id must match the id + * path parameter. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @param body (required) * @return ApiResponse<RUMApplicationResponse> * @throws ApiException if fails to make API call @@ -3501,8 +3746,9 @@ public CompletableFuture updateRUMApplicationAsync( * Status Code Description Response Headers * 200 OK - * 400 Bad Request - + * 403 Forbidden - * 404 Not Found - - * 422 Unprocessable Entity. - + * 422 Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter. - * 429 Too many requests - * */ @@ -3553,7 +3799,8 @@ public ApiResponse updateRUMApplicationWithHttpInfo( * *

See {@link #updateRUMApplicationWithHttpInfo}. * - * @param id RUM application ID. (required) + * @param id ID of the RUM application, returned as application_id by + * GetRUMApplications and CreateRUMApplication. (required) * @param body (required) * @return CompletableFuture<ApiResponse<RUMApplicationResponse>> */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateRequest.java index cd4beabf7a8..31d376d86e5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateRequest.java @@ -20,7 +20,7 @@ /** * The object sent with the request to retrieve aggregation buckets of RUM events from your - * organization. + * organization. filter.indexes is not supported and ignored. */ @JsonPropertyOrder({ RUMAggregateRequest.JSON_PROPERTY_COMPUTE, diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSort.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSort.java index e4f970c1660..33a5eaa9878 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSort.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSort.java @@ -46,7 +46,11 @@ public RUMAggregateSort aggregation(RUMAggregationFunction aggregation) { } /** - * 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 + * . * * @return aggregation */ @@ -117,7 +121,8 @@ public RUMAggregateSort type(RUMAggregateSortType type) { } /** - * The type of sorting algorithm. + * The type of sorting algorithm. alphabetical sorts buckets by the facet value, + * measure sorts them by a computed aggregation. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSortType.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSortType.java index 8e9b2b01ecb..ad092688364 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSortType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregateSortType.java @@ -18,7 +18,10 @@ import java.util.HashSet; import java.util.Set; -/** The type of sorting algorithm. */ +/** + * The type of sorting algorithm. alphabetical sorts buckets by the facet value, + * measure sorts them by a computed aggregation. + */ @JsonSerialize(using = RUMAggregateSortType.RUMAggregateSortTypeSerializer.class) public class RUMAggregateSortType extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMAggregationFunction.java b/src/main/java/com/datadog/api/client/v2/model/RUMAggregationFunction.java index 42adf916f71..c15db651a8b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMAggregationFunction.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMAggregationFunction.java @@ -18,7 +18,12 @@ import java.util.HashSet; import java.util.Set; -/** 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. + */ @JsonSerialize(using = RUMAggregationFunction.RUMAggregationFunctionSerializer.class) public class RUMAggregationFunction extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java index 3a349495304..d33a200d886 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java @@ -649,9 +649,12 @@ public RUMApplicationAttributes type(String type) { } /** - * 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, rum-cpp, unreal. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreate.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreate.java index 154db856c0d..49710662dac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreate.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreate.java @@ -52,7 +52,10 @@ public RUMApplicationCreate attributes(RUMApplicationCreateAttributes attributes } /** - * RUM application creation attributes. + * RUM application creation attributes. When rum_event_processing_state is omitted, + * it defaults to ALL. When product_analytics_retention_state is + * omitted, Product Analytics is not enabled. Setting it to MAX requires the + * product_analytics_apps_write permission. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java index 1361765c7b9..f4870fcfd68 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java @@ -13,29 +13,57 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; -/** RUM application creation attributes. */ +/** + * RUM application creation attributes. When rum_event_processing_state is omitted, it + * defaults to ALL. When product_analytics_retention_state is omitted, + * Product Analytics is not enabled. Setting it to MAX requires the + * product_analytics_apps_write permission. + */ @JsonPropertyOrder({ + RUMApplicationCreateAttributes.JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_ENABLED, + RUMApplicationCreateAttributes.JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_SAMPLE_RATE, RUMApplicationCreateAttributes.JSON_PROPERTY_CREATE_DEFAULT_RETENTION_FILTERS, + RUMApplicationCreateAttributes.JSON_PROPERTY_ERROR_TRACKING_EXCLUSION_FILTER_ENABLED, RUMApplicationCreateAttributes.JSON_PROPERTY_NAME, + RUMApplicationCreateAttributes.JSON_PROPERTY_PRODUCT_ANALYTICS_REPLAY_SAMPLE_RATE, RUMApplicationCreateAttributes.JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE, RUMApplicationCreateAttributes.JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE, + RUMApplicationCreateAttributes.JSON_PROPERTY_TAGS, RUMApplicationCreateAttributes.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationCreateAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_ENABLED = + "apm_rum_flat_sampling_replay_enabled"; + private Boolean apmRumFlatSamplingReplayEnabled; + + public static final String JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_SAMPLE_RATE = + "apm_rum_flat_sampling_replay_sample_rate"; + private Double apmRumFlatSamplingReplaySampleRate; + public static final String JSON_PROPERTY_CREATE_DEFAULT_RETENTION_FILTERS = "create_default_retention_filters"; private Boolean createDefaultRetentionFilters = true; + public static final String JSON_PROPERTY_ERROR_TRACKING_EXCLUSION_FILTER_ENABLED = + "error_tracking_exclusion_filter_enabled"; + private Boolean errorTrackingExclusionFilterEnabled; + public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PRODUCT_ANALYTICS_REPLAY_SAMPLE_RATE = + "product_analytics_replay_sample_rate"; + private Integer productAnalyticsReplaySampleRate; + public static final String JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE = "product_analytics_retention_state"; private RUMProductAnalyticsRetentionState productAnalyticsRetentionState; @@ -44,6 +72,9 @@ public class RUMApplicationCreateAttributes { "rum_event_processing_state"; private RUMEventProcessingState rumEventProcessingState; + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -55,6 +86,52 @@ public RUMApplicationCreateAttributes( this.name = name; } + public RUMApplicationCreateAttributes apmRumFlatSamplingReplayEnabled( + Boolean apmRumFlatSamplingReplayEnabled) { + this.apmRumFlatSamplingReplayEnabled = apmRumFlatSamplingReplayEnabled; + return this; + } + + /** + * Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. + * Defaults to true. + * + * @return apmRumFlatSamplingReplayEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getApmRumFlatSamplingReplayEnabled() { + return apmRumFlatSamplingReplayEnabled; + } + + public void setApmRumFlatSamplingReplayEnabled(Boolean apmRumFlatSamplingReplayEnabled) { + this.apmRumFlatSamplingReplayEnabled = apmRumFlatSamplingReplayEnabled; + } + + public RUMApplicationCreateAttributes apmRumFlatSamplingReplaySampleRate( + Double apmRumFlatSamplingReplaySampleRate) { + this.apmRumFlatSamplingReplaySampleRate = apmRumFlatSamplingReplaySampleRate; + return this; + } + + /** + * Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is + * enabled. Defaults to 1. + * + * @return apmRumFlatSamplingReplaySampleRate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_SAMPLE_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmRumFlatSamplingReplaySampleRate() { + return apmRumFlatSamplingReplaySampleRate; + } + + public void setApmRumFlatSamplingReplaySampleRate(Double apmRumFlatSamplingReplaySampleRate) { + this.apmRumFlatSamplingReplaySampleRate = apmRumFlatSamplingReplaySampleRate; + } + public RUMApplicationCreateAttributes createDefaultRetentionFilters( Boolean createDefaultRetentionFilters) { this.createDefaultRetentionFilters = createDefaultRetentionFilters; @@ -84,13 +161,36 @@ public void setCreateDefaultRetentionFilters(Boolean createDefaultRetentionFilte this.createDefaultRetentionFilters = createDefaultRetentionFilters; } + public RUMApplicationCreateAttributes errorTrackingExclusionFilterEnabled( + Boolean errorTrackingExclusionFilterEnabled) { + this.errorTrackingExclusionFilterEnabled = errorTrackingExclusionFilterEnabled; + return this; + } + + /** + * Indicates if Error Tracking exclusion filters are enabled for the application. Defaults to + * false. + * + * @return errorTrackingExclusionFilterEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_TRACKING_EXCLUSION_FILTER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorTrackingExclusionFilterEnabled() { + return errorTrackingExclusionFilterEnabled; + } + + public void setErrorTrackingExclusionFilterEnabled(Boolean errorTrackingExclusionFilterEnabled) { + this.errorTrackingExclusionFilterEnabled = errorTrackingExclusionFilterEnabled; + } + public RUMApplicationCreateAttributes name(String name) { this.name = name; return this; } /** - * Name of the RUM application. + * Name of the RUM application. Between 1 and 255 characters. * * @return name */ @@ -104,6 +204,29 @@ public void setName(String name) { this.name = name; } + public RUMApplicationCreateAttributes productAnalyticsReplaySampleRate( + Integer productAnalyticsReplaySampleRate) { + this.productAnalyticsReplaySampleRate = productAnalyticsReplaySampleRate; + return this; + } + + /** + * Sample rate (0-100) of Session Replay for Product Analytics sessions. Defaults to 100 + * . maximum: 2147483647 + * + * @return productAnalyticsReplaySampleRate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_ANALYTICS_REPLAY_SAMPLE_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getProductAnalyticsReplaySampleRate() { + return productAnalyticsReplaySampleRate; + } + + public void setProductAnalyticsReplaySampleRate(Integer productAnalyticsReplaySampleRate) { + this.productAnalyticsReplaySampleRate = productAnalyticsReplaySampleRate; + } + public RUMApplicationCreateAttributes productAnalyticsRetentionState( RUMProductAnalyticsRetentionState productAnalyticsRetentionState) { this.productAnalyticsRetentionState = productAnalyticsRetentionState; @@ -112,7 +235,10 @@ public RUMApplicationCreateAttributes productAnalyticsRetentionState( } /** - * Controls the retention policy for Product Analytics data derived from RUM events. + * Controls the retention policy for Product Analytics data derived from RUM events. Requests also + * accept PREVIEW (the initial state of a new application, reported as NONE + * in responses). Setting MAX requires the product_analytics_apps_write + * permission. * * @return productAnalyticsRetentionState */ @@ -139,7 +265,8 @@ public RUMApplicationCreateAttributes rumEventProcessingState( } /** - * 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. * * @return rumEventProcessingState */ @@ -157,15 +284,48 @@ public void setRumEventProcessingState(RUMEventProcessingState rumEventProcessin this.rumEventProcessingState = rumEventProcessingState; } + public RUMApplicationCreateAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public RUMApplicationCreateAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags to associate with the RUM application, in key:value format. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + public RUMApplicationCreateAttributes type(String type) { this.type = type; return this; } /** - * Type of the RUM application. Supported values are browser, ios, - * android, react-native, flutter, roku, - * electron, unity, kotlin-multiplatform. + * Type of the RUM application. Defaults to browser. Supported values are + * browser, ios, android, react-native, + * flutter, roku, electron, unity, + * kotlin-multiplatform, react, nextjs, angular, + * vuejs, nuxt, tanstack, maui, + * salesforce-lwc, shopify, cpp, rum-cpp, + * unreal. * * @return type */ @@ -238,14 +398,27 @@ public boolean equals(Object o) { RUMApplicationCreateAttributes rumApplicationCreateAttributes = (RUMApplicationCreateAttributes) o; return Objects.equals( + this.apmRumFlatSamplingReplayEnabled, + rumApplicationCreateAttributes.apmRumFlatSamplingReplayEnabled) + && Objects.equals( + this.apmRumFlatSamplingReplaySampleRate, + rumApplicationCreateAttributes.apmRumFlatSamplingReplaySampleRate) + && Objects.equals( this.createDefaultRetentionFilters, rumApplicationCreateAttributes.createDefaultRetentionFilters) + && Objects.equals( + this.errorTrackingExclusionFilterEnabled, + rumApplicationCreateAttributes.errorTrackingExclusionFilterEnabled) && Objects.equals(this.name, rumApplicationCreateAttributes.name) + && Objects.equals( + this.productAnalyticsReplaySampleRate, + rumApplicationCreateAttributes.productAnalyticsReplaySampleRate) && Objects.equals( this.productAnalyticsRetentionState, rumApplicationCreateAttributes.productAnalyticsRetentionState) && Objects.equals( this.rumEventProcessingState, rumApplicationCreateAttributes.rumEventProcessingState) + && Objects.equals(this.tags, rumApplicationCreateAttributes.tags) && Objects.equals(this.type, rumApplicationCreateAttributes.type) && Objects.equals( this.additionalProperties, rumApplicationCreateAttributes.additionalProperties); @@ -254,10 +427,15 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + apmRumFlatSamplingReplayEnabled, + apmRumFlatSamplingReplaySampleRate, createDefaultRetentionFilters, + errorTrackingExclusionFilterEnabled, name, + productAnalyticsReplaySampleRate, productAnalyticsRetentionState, rumEventProcessingState, + tags, type, additionalProperties); } @@ -266,16 +444,29 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RUMApplicationCreateAttributes {\n"); + sb.append(" apmRumFlatSamplingReplayEnabled: ") + .append(toIndentedString(apmRumFlatSamplingReplayEnabled)) + .append("\n"); + sb.append(" apmRumFlatSamplingReplaySampleRate: ") + .append(toIndentedString(apmRumFlatSamplingReplaySampleRate)) + .append("\n"); sb.append(" createDefaultRetentionFilters: ") .append(toIndentedString(createDefaultRetentionFilters)) .append("\n"); + sb.append(" errorTrackingExclusionFilterEnabled: ") + .append(toIndentedString(errorTrackingExclusionFilterEnabled)) + .append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" productAnalyticsReplaySampleRate: ") + .append(toIndentedString(productAnalyticsReplaySampleRate)) + .append("\n"); sb.append(" productAnalyticsRetentionState: ") .append(toIndentedString(productAnalyticsRetentionState)) .append("\n"); sb.append(" rumEventProcessingState: ") .append(toIndentedString(rumEventProcessingState)) .append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java index 72c11980e3c..f7a968acdab 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java @@ -623,9 +623,12 @@ public RUMApplicationListAttributes type(String type) { } /** - * 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, rum-cpp, unreal. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdate.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdate.java index a922a416f4a..835f0565cb3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdate.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdate.java @@ -54,7 +54,10 @@ public RUMApplicationUpdate attributes(RUMApplicationUpdateAttributes attributes } /** - * 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. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java index 97705c6c2fb..5a9d2b0d293 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java @@ -12,42 +12,169 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; -/** 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. + */ @JsonPropertyOrder({ + RUMApplicationUpdateAttributes.JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_ENABLED, + RUMApplicationUpdateAttributes.JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_SAMPLE_RATE, + RUMApplicationUpdateAttributes.JSON_PROPERTY_ERROR_TRACKING_EXCLUSION_FILTER_ENABLED, + RUMApplicationUpdateAttributes.JSON_PROPERTY_INSTRUMENTATION_TYPE, RUMApplicationUpdateAttributes.JSON_PROPERTY_NAME, + RUMApplicationUpdateAttributes.JSON_PROPERTY_PRODUCT_ANALYTICS_REPLAY_SAMPLE_RATE, RUMApplicationUpdateAttributes.JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE, + RUMApplicationUpdateAttributes.JSON_PROPERTY_REMOTE_CONFIG_ID, RUMApplicationUpdateAttributes.JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE, + RUMApplicationUpdateAttributes.JSON_PROPERTY_TAGS, RUMApplicationUpdateAttributes.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RUMApplicationUpdateAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_ENABLED = + "apm_rum_flat_sampling_replay_enabled"; + private Boolean apmRumFlatSamplingReplayEnabled; + + public static final String JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_SAMPLE_RATE = + "apm_rum_flat_sampling_replay_sample_rate"; + private Double apmRumFlatSamplingReplaySampleRate; + + public static final String JSON_PROPERTY_ERROR_TRACKING_EXCLUSION_FILTER_ENABLED = + "error_tracking_exclusion_filter_enabled"; + private Boolean errorTrackingExclusionFilterEnabled; + + public static final String JSON_PROPERTY_INSTRUMENTATION_TYPE = "instrumentation_type"; + private String instrumentationType; + public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PRODUCT_ANALYTICS_REPLAY_SAMPLE_RATE = + "product_analytics_replay_sample_rate"; + private Integer productAnalyticsReplaySampleRate; + public static final String JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE = "product_analytics_retention_state"; private RUMProductAnalyticsRetentionState productAnalyticsRetentionState; + public static final String JSON_PROPERTY_REMOTE_CONFIG_ID = "remote_config_id"; + private String remoteConfigId; + public static final String JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE = "rum_event_processing_state"; private RUMEventProcessingState rumEventProcessingState; + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + public static final String JSON_PROPERTY_TYPE = "type"; private String type; + public RUMApplicationUpdateAttributes apmRumFlatSamplingReplayEnabled( + Boolean apmRumFlatSamplingReplayEnabled) { + this.apmRumFlatSamplingReplayEnabled = apmRumFlatSamplingReplayEnabled; + return this; + } + + /** + * Indicates if flat sampling of Session Replay for APM-correlated RUM sessions is enabled. + * + * @return apmRumFlatSamplingReplayEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getApmRumFlatSamplingReplayEnabled() { + return apmRumFlatSamplingReplayEnabled; + } + + public void setApmRumFlatSamplingReplayEnabled(Boolean apmRumFlatSamplingReplayEnabled) { + this.apmRumFlatSamplingReplayEnabled = apmRumFlatSamplingReplayEnabled; + } + + public RUMApplicationUpdateAttributes apmRumFlatSamplingReplaySampleRate( + Double apmRumFlatSamplingReplaySampleRate) { + this.apmRumFlatSamplingReplaySampleRate = apmRumFlatSamplingReplaySampleRate; + return this; + } + + /** + * Sample rate (0-100) of Session Replay for APM-correlated RUM sessions when flat sampling is + * enabled. + * + * @return apmRumFlatSamplingReplaySampleRate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APM_RUM_FLAT_SAMPLING_REPLAY_SAMPLE_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getApmRumFlatSamplingReplaySampleRate() { + return apmRumFlatSamplingReplaySampleRate; + } + + public void setApmRumFlatSamplingReplaySampleRate(Double apmRumFlatSamplingReplaySampleRate) { + this.apmRumFlatSamplingReplaySampleRate = apmRumFlatSamplingReplaySampleRate; + } + + public RUMApplicationUpdateAttributes errorTrackingExclusionFilterEnabled( + Boolean errorTrackingExclusionFilterEnabled) { + this.errorTrackingExclusionFilterEnabled = errorTrackingExclusionFilterEnabled; + return this; + } + + /** + * Indicates if Error Tracking exclusion filters are enabled for the application. + * + * @return errorTrackingExclusionFilterEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_TRACKING_EXCLUSION_FILTER_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getErrorTrackingExclusionFilterEnabled() { + return errorTrackingExclusionFilterEnabled; + } + + public void setErrorTrackingExclusionFilterEnabled(Boolean errorTrackingExclusionFilterEnabled) { + this.errorTrackingExclusionFilterEnabled = errorTrackingExclusionFilterEnabled; + } + + public RUMApplicationUpdateAttributes instrumentationType(String instrumentationType) { + this.instrumentationType = instrumentationType; + return this; + } + + /** + * Instrumentation type of the RUM application. + * + * @return instrumentationType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTRUMENTATION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstrumentationType() { + return instrumentationType; + } + + public void setInstrumentationType(String instrumentationType) { + this.instrumentationType = instrumentationType; + } + public RUMApplicationUpdateAttributes name(String name) { this.name = name; return this; } /** - * Name of the RUM application. + * New name of the RUM application. * * @return name */ @@ -62,6 +189,28 @@ public void setName(String name) { this.name = name; } + public RUMApplicationUpdateAttributes productAnalyticsReplaySampleRate( + Integer productAnalyticsReplaySampleRate) { + this.productAnalyticsReplaySampleRate = productAnalyticsReplaySampleRate; + return this; + } + + /** + * Sample rate (0-100) of Session Replay for Product Analytics sessions. maximum: 2147483647 + * + * @return productAnalyticsReplaySampleRate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_ANALYTICS_REPLAY_SAMPLE_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getProductAnalyticsReplaySampleRate() { + return productAnalyticsReplaySampleRate; + } + + public void setProductAnalyticsReplaySampleRate(Integer productAnalyticsReplaySampleRate) { + this.productAnalyticsReplaySampleRate = productAnalyticsReplaySampleRate; + } + public RUMApplicationUpdateAttributes productAnalyticsRetentionState( RUMProductAnalyticsRetentionState productAnalyticsRetentionState) { this.productAnalyticsRetentionState = productAnalyticsRetentionState; @@ -70,7 +219,10 @@ public RUMApplicationUpdateAttributes productAnalyticsRetentionState( } /** - * Controls the retention policy for Product Analytics data derived from RUM events. + * Controls the retention policy for Product Analytics data derived from RUM events. Requests also + * accept PREVIEW (the initial state of a new application, reported as NONE + * in responses). Setting MAX requires the product_analytics_apps_write + * permission. * * @return productAnalyticsRetentionState */ @@ -89,6 +241,27 @@ public void setProductAnalyticsRetentionState( this.productAnalyticsRetentionState = productAnalyticsRetentionState; } + public RUMApplicationUpdateAttributes remoteConfigId(String remoteConfigId) { + this.remoteConfigId = remoteConfigId; + return this; + } + + /** + * ID of the RUM SDK remote configuration to associate with the application. + * + * @return remoteConfigId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REMOTE_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRemoteConfigId() { + return remoteConfigId; + } + + public void setRemoteConfigId(String remoteConfigId) { + this.remoteConfigId = remoteConfigId; + } + public RUMApplicationUpdateAttributes rumEventProcessingState( RUMEventProcessingState rumEventProcessingState) { this.rumEventProcessingState = rumEventProcessingState; @@ -97,7 +270,8 @@ public RUMApplicationUpdateAttributes rumEventProcessingState( } /** - * 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. * * @return rumEventProcessingState */ @@ -115,15 +289,48 @@ public void setRumEventProcessingState(RUMEventProcessingState rumEventProcessin this.rumEventProcessingState = rumEventProcessingState; } + public RUMApplicationUpdateAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public RUMApplicationUpdateAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * New list of tags of the RUM application, in key:value format. Replaces the + * existing tags. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + public RUMApplicationUpdateAttributes type(String type) { this.type = type; return this; } /** - * Type of the RUM application. Supported values are browser, ios, + * New type of the RUM application. Supported values are browser, ios, * android, react-native, flutter, roku, - * electron, unity, kotlin-multiplatform. + * electron, unity, kotlin-multiplatform, react + * , nextjs, angular, vuejs, nuxt, + * tanstack, maui, salesforce-lwc, shopify, + * cpp, rum-cpp, unreal. * * @return type */ @@ -195,12 +402,28 @@ public boolean equals(Object o) { } RUMApplicationUpdateAttributes rumApplicationUpdateAttributes = (RUMApplicationUpdateAttributes) o; - return Objects.equals(this.name, rumApplicationUpdateAttributes.name) + return Objects.equals( + this.apmRumFlatSamplingReplayEnabled, + rumApplicationUpdateAttributes.apmRumFlatSamplingReplayEnabled) + && Objects.equals( + this.apmRumFlatSamplingReplaySampleRate, + rumApplicationUpdateAttributes.apmRumFlatSamplingReplaySampleRate) + && Objects.equals( + this.errorTrackingExclusionFilterEnabled, + rumApplicationUpdateAttributes.errorTrackingExclusionFilterEnabled) + && Objects.equals( + this.instrumentationType, rumApplicationUpdateAttributes.instrumentationType) + && Objects.equals(this.name, rumApplicationUpdateAttributes.name) + && Objects.equals( + this.productAnalyticsReplaySampleRate, + rumApplicationUpdateAttributes.productAnalyticsReplaySampleRate) && Objects.equals( this.productAnalyticsRetentionState, rumApplicationUpdateAttributes.productAnalyticsRetentionState) + && Objects.equals(this.remoteConfigId, rumApplicationUpdateAttributes.remoteConfigId) && Objects.equals( this.rumEventProcessingState, rumApplicationUpdateAttributes.rumEventProcessingState) + && Objects.equals(this.tags, rumApplicationUpdateAttributes.tags) && Objects.equals(this.type, rumApplicationUpdateAttributes.type) && Objects.equals( this.additionalProperties, rumApplicationUpdateAttributes.additionalProperties); @@ -209,20 +432,48 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - name, productAnalyticsRetentionState, rumEventProcessingState, type, additionalProperties); + apmRumFlatSamplingReplayEnabled, + apmRumFlatSamplingReplaySampleRate, + errorTrackingExclusionFilterEnabled, + instrumentationType, + name, + productAnalyticsReplaySampleRate, + productAnalyticsRetentionState, + remoteConfigId, + rumEventProcessingState, + tags, + type, + additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RUMApplicationUpdateAttributes {\n"); + sb.append(" apmRumFlatSamplingReplayEnabled: ") + .append(toIndentedString(apmRumFlatSamplingReplayEnabled)) + .append("\n"); + sb.append(" apmRumFlatSamplingReplaySampleRate: ") + .append(toIndentedString(apmRumFlatSamplingReplaySampleRate)) + .append("\n"); + sb.append(" errorTrackingExclusionFilterEnabled: ") + .append(toIndentedString(errorTrackingExclusionFilterEnabled)) + .append("\n"); + sb.append(" instrumentationType: ") + .append(toIndentedString(instrumentationType)) + .append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" productAnalyticsReplaySampleRate: ") + .append(toIndentedString(productAnalyticsReplaySampleRate)) + .append("\n"); sb.append(" productAnalyticsRetentionState: ") .append(toIndentedString(productAnalyticsRetentionState)) .append("\n"); + sb.append(" remoteConfigId: ").append(toIndentedString(remoteConfigId)).append("\n"); sb.append(" rumEventProcessingState: ") .append(toIndentedString(rumEventProcessingState)) .append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMCompute.java b/src/main/java/com/datadog/api/client/v2/model/RUMCompute.java index 7fe034c0b4d..cb349443f9b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMCompute.java @@ -17,7 +17,10 @@ import java.util.Map; import java.util.Objects; -/** A compute rule to compute metrics or timeseries. */ +/** + * A compute rule to compute metrics or timeseries. In the response, the result of each rule is + * keyed c0, c1... following the order of the compute list. + */ @JsonPropertyOrder({ RUMCompute.JSON_PROPERTY_AGGREGATION, RUMCompute.JSON_PROPERTY_INTERVAL, @@ -57,7 +60,11 @@ public RUMCompute aggregation(RUMAggregationFunction aggregation) { } /** - * 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 + * . * * @return aggregation */ @@ -80,7 +87,9 @@ public RUMCompute interval(String interval) { } /** - * 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. * * @return interval */ @@ -101,7 +110,8 @@ public RUMCompute metric(String metric) { } /** - * The metric to use. + * The attribute to aggregate, for example @view.loading_time. Not needed for + * count, required for the other aggregations. * * @return metric */ @@ -123,7 +133,8 @@ public RUMCompute type(RUMComputeType type) { } /** - * The type of compute. + * The type of compute. total returns one value per bucket, timeseries + * returns a list of time points per bucket. * * @return type */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMComputeType.java b/src/main/java/com/datadog/api/client/v2/model/RUMComputeType.java index fd21f2f743e..9714fc5f69f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMComputeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMComputeType.java @@ -18,7 +18,10 @@ import java.util.HashSet; import java.util.Set; -/** The type of compute. */ +/** + * The type of compute. total returns one value per bucket, timeseries + * returns a list of time points per bucket. + */ @JsonSerialize(using = RUMComputeType.RUMComputeTypeSerializer.class) public class RUMComputeType extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEventAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMEventAttributes.java index b3abdefbf75..e482d341456 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMEventAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEventAttributes.java @@ -56,7 +56,13 @@ public RUMEventAttributes putAttributesItem(String key, Object attributesItem) { } /** - * 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. * * @return attributes */ @@ -107,7 +113,7 @@ public RUMEventAttributes addTagsItem(String tagsItem) { } /** - * Array of tags associated with your event. + * Array of tags associated with your event, in key:value format. * * @return tags */ @@ -128,7 +134,7 @@ public RUMEventAttributes timestamp(OffsetDateTime timestamp) { } /** - * Timestamp of your event. + * Timestamp of your event, in ISO 8601 format. * * @return timestamp */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingScale.java b/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingScale.java index 9330d519aee..774fcaf6ec7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingScale.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingScale.java @@ -59,7 +59,8 @@ public RUMEventProcessingScale state(RUMEventProcessingState 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. * * @return state */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingState.java b/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingState.java index d67d057c643..05aa2a6905e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingState.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingState.java @@ -18,7 +18,10 @@ import java.util.HashSet; import java.util.Set; -/** 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. + */ @JsonSerialize(using = RUMEventProcessingState.RUMEventProcessingStateSerializer.class) public class RUMEventProcessingState extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/RUMGroupBy.java index 662a3d3e4a7..9f46fcf4924 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMGroupBy.java @@ -61,7 +61,8 @@ public RUMGroupBy facet(String facet) { } /** - * The name of the facet to use (required). + * The attribute to group by, for example @view.name or @session.type + * (required). * * @return facet */ @@ -129,7 +130,7 @@ public RUMGroupBy missing(RUMGroupByMissing missing) { } /** - * 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. * * @return missing */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionScale.java b/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionScale.java index 1668516b9df..d47680ddf60 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionScale.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionScale.java @@ -59,7 +59,10 @@ public RUMProductAnalyticsRetentionScale state(RUMProductAnalyticsRetentionState } /** - * Controls the retention policy for Product Analytics data derived from RUM events. + * Controls the retention policy for Product Analytics data derived from RUM events. Requests also + * accept PREVIEW (the initial state of a new application, reported as NONE + * in responses). Setting MAX requires the product_analytics_apps_write + * permission. * * @return state */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionState.java b/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionState.java index 20f5361c7ca..011312b4a1f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionState.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionState.java @@ -18,7 +18,12 @@ import java.util.HashSet; import java.util.Set; -/** Controls the retention policy for Product Analytics data derived from RUM events. */ +/** + * Controls the retention policy for Product Analytics data derived from RUM events. Requests also + * accept PREVIEW (the initial state of a new application, reported as NONE + * in responses). Setting MAX requires the product_analytics_apps_write + * permission. + */ @JsonSerialize( using = RUMProductAnalyticsRetentionState.RUMProductAnalyticsRetentionStateSerializer.class) public class RUMProductAnalyticsRetentionState extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMQueryFilter.java b/src/main/java/com/datadog/api/client/v2/model/RUMQueryFilter.java index b992f9daecc..0b2430012ed 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMQueryFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMQueryFilter.java @@ -41,10 +41,11 @@ public RUMQueryFilter from(String from) { } /** - * The minimum time for the requested events; supports date (in now-15m, now-1h, now-7d), an absolute date in ISO 8601 format with full date, hours, minutes, - * and the Z UTC indicator - seconds and fractional seconds are optional), math, and - * regular timestamps (in milliseconds). + * and the Z UTC indicator (seconds and fractional seconds are optional), or a + * timestamp in milliseconds since the Unix epoch. * * @return from */ @@ -65,7 +66,13 @@ public RUMQueryFilter query(String query) { } /** - * The search query following the RUM search syntax. + * The search query following the RUM search + * syntax. Filter on attributes with @attribute:value, for example + * @type:view @application.id:<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. * * @return query */ @@ -86,10 +93,7 @@ public RUMQueryFilter to(String to) { } /** - * The maximum time for the requested events; supports date (in ISO 8601 format with full date, hours, minutes, - * and the Z UTC indicator - seconds and fractional seconds are optional), math, and - * regular timestamps (in milliseconds). + * The maximum time for the requested events. Accepts the same formats as from. * * @return to */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMQueryPageOptions.java b/src/main/java/com/datadog/api/client/v2/model/RUMQueryPageOptions.java index 10c480cc29f..d910611fc20 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMQueryPageOptions.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMQueryPageOptions.java @@ -37,7 +37,9 @@ public RUMQueryPageOptions cursor(String cursor) { } /** - * 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. * * @return cursor */ @@ -58,7 +60,7 @@ public RUMQueryPageOptions limit(Integer limit) { } /** - * Maximum number of events in the response. maximum: 1000 + * Maximum number of events in the response. Between 1 and 1000. maximum: 1000 * * @return limit */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMResponseLinks.java b/src/main/java/com/datadog/api/client/v2/model/RUMResponseLinks.java index 80cc3ac48b9..56161c5c07b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMResponseLinks.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMResponseLinks.java @@ -31,8 +31,11 @@ public RUMResponseLinks next(String next) { } /** - * 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. Note that the request can also be made using the POST endpoint with + * page.cursor set to meta.page.after. * * @return next */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMResponseMetadata.java b/src/main/java/com/datadog/api/client/v2/model/RUMResponseMetadata.java index 680a52b0e38..b50525789b8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMResponseMetadata.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMResponseMetadata.java @@ -119,7 +119,8 @@ public RUMResponseMetadata status(RUMResponseStatus status) { } /** - * The status of the response. + * The status of the response. timeout means the query did not complete in time and + * the results are partial. * * @return status */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMResponsePage.java b/src/main/java/com/datadog/api/client/v2/model/RUMResponsePage.java index 88bb718c2a5..6aea2a5f225 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMResponsePage.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMResponsePage.java @@ -32,7 +32,8 @@ public RUMResponsePage after(String after) { /** * The cursor to use to get the next results, if any. To make the next request, use the same - * parameters with the addition of page[cursor]. + * parameters with the addition of page[cursor] (page.cursor for the + * POST endpoint). Absent on the last page. * * @return after */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMResponseStatus.java b/src/main/java/com/datadog/api/client/v2/model/RUMResponseStatus.java index d5a462fb1b0..602c60e73e2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMResponseStatus.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMResponseStatus.java @@ -18,7 +18,10 @@ import java.util.HashSet; import java.util.Set; -/** The status of the response. */ +/** + * The status of the response. timeout means the query did not complete in time and the + * results are partial. + */ @JsonSerialize(using = RUMResponseStatus.RUMResponseStatusSerializer.class) public class RUMResponseStatus extends ModelEnum { diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMSearchEventsRequest.java b/src/main/java/com/datadog/api/client/v2/model/RUMSearchEventsRequest.java index 44005428dc2..7aa0275d685 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMSearchEventsRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMSearchEventsRequest.java @@ -16,7 +16,10 @@ import java.util.Map; import java.util.Objects; -/** 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. + */ @JsonPropertyOrder({ RUMSearchEventsRequest.JSON_PROPERTY_FILTER, RUMSearchEventsRequest.JSON_PROPERTY_OPTIONS, diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum.feature b/src/test/resources/com/datadog/api/client/v2/api/rum.feature index 3fa9ce6776b..b6abadf38d1 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum.feature @@ -13,7 +13,7 @@ Feature: RUM @generated @skip @team:ddoghq/rum-backend Scenario: Aggregate RUM events returns "Bad Request" response Given new "AggregateRUMEvents" request - And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@duration", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.time_spent", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}} + And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@view.loading_time", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.name", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}} When the request is sent Then the response status is 400 Bad Request @@ -33,6 +33,13 @@ Feature: RUM When the request is sent Then the response status is 400 Bad Request + @generated @skip @team:ddoghq/rum-backend + Scenario: Create a new RUM application returns "Conflict" response + Given new "CreateRUMApplication" request + And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "create_default_retention_filters": false, "error_tracking_exclusion_filter_enabled": false, "name": "my_new_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "type": "rum_application_create"}} + When the request is sent + Then the response status is 409 Conflict + @skip-validation @team:ddoghq/rum-backend Scenario: Create a new RUM application returns "Created" response Given new "CreateRUMApplication" request @@ -70,6 +77,13 @@ Feature: RUM And the response "data.attributes.name" is equal to "test-rum-no-default-rf-{{ unique_hash }}" And the response "data.attributes.type" is equal to "browser" + @generated @skip @team:ddoghq/rum-backend + Scenario: Delete a RUM application returns "Bad Request" response + Given new "DeleteRUMApplication" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + @skip-validation @team:ddoghq/rum-backend Scenario: Delete a RUM application returns "No Content" response Given there is a valid "rum_application" in the system @@ -85,6 +99,13 @@ Feature: RUM When the request is sent Then the response status is 404 Not Found + @generated @skip @team:ddoghq/rum-backend + Scenario: Get a RUM application returns "Bad Request" response + Given new "GetRUMApplication" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + @team:ddoghq/rum-backend Scenario: Get a RUM application returns "Not Found" response Given new "GetRUMApplication" request @@ -124,6 +145,12 @@ Feature: RUM Then the response status is 200 OK And the response has 3 items + @generated @skip @team:ddoghq/rum-backend + Scenario: List all the RUM applications returns "Bad Request" response + Given new "GetRUMApplications" request + When the request is sent + Then the response status is 400 Bad Request + @generated @skip @team:ddoghq/rum-backend Scenario: List all the RUM applications returns "Not Found" response Given new "GetRUMApplications" request @@ -166,7 +193,7 @@ Feature: RUM Scenario: Update a RUM application returns "Bad Request" response Given new "UpdateRUMApplication" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "instrumentation_type": "manual", "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} When the request is sent Then the response status is 400 Bad Request @@ -174,7 +201,7 @@ Feature: RUM Scenario: Update a RUM application returns "Not Found" response Given new "UpdateRUMApplication" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "instrumentation_type": "manual", "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} When the request is sent Then the response status is 404 Not Found @@ -195,6 +222,14 @@ Feature: RUM And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" + @generated @skip @team:ddoghq/rum-backend + Scenario: Update a RUM application returns "Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter." response + Given new "UpdateRUMApplication" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"apm_rum_flat_sampling_replay_enabled": true, "apm_rum_flat_sampling_replay_sample_rate": 1, "error_tracking_exclusion_filter_enabled": false, "instrumentation_type": "manual", "name": "updated_name_for_my_existing_rum_application", "product_analytics_replay_sample_rate": 100, "product_analytics_retention_state": "MAX", "remote_config_id": "abc12345-1234-5678-abcd-ef1234567890", "rum_event_processing_state": "ALL", "tags": ["team:rum"], "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + When the request is sent + Then the response status is 422 Unprocessable Entity. The `data.id` of the request body does not match the `id` path parameter. + @skip-validation @team:ddoghq/rum-backend Scenario: Update a RUM application returns "Unprocessable Entity." response Given there is a valid "rum_application" in the system