Deprecate Behavioral Analytics CRUD apis (#122960)

* Deprecate Behavioral Analytics CRUD APIs

* Add allowed warning for REST Compatibility tests

* Update docs/changelog/122960.yaml

* Update changelog

* Update docs to add deprecation flags and fix failing tests

* Update changelog

* Update changelog again

* Update docs formatting

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>

* Skip asciidoc test

---------

Co-authored-by: Efe Gürkan YALAMAN <efeyalaman@gmail.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Efe Gürkan YALAMAN <efeguerkan.yalaman@elastic.co>
This commit is contained in:
Kathleen DeRusso 2025-02-25 10:02:50 -05:00 committed by GitHub
parent e8438490ea
commit ae6474db63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 441 additions and 140 deletions

View file

@ -0,0 +1,10 @@
pr: 122960
summary: Deprecate Behavioral Analytics CRUD apis
area: Search
type: deprecation
issues: [ ]
deprecation:
title: Deprecate Behavioral Analytics CRUD apis
area: Search
details: Behavioral Analytics has been deprecated as of 9.0.0 and will be removed in a future release. The APIs will still work for now, but will emit warning headers that the API has been deprecated.
impact: Behavioral Analytics has been deprecated as of 9.0.0 and will be removed in a future release.

View file

@ -2,6 +2,7 @@
[[delete-analytics-collection]] [[delete-analytics-collection]]
=== Delete Analytics Collection === Delete Analytics Collection
deprecated:[9.0.0]
beta::[] beta::[]
++++ ++++
@ -14,15 +15,6 @@ beta::[]
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs]. For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
-- --
////
[source,console]
----
PUT _application/analytics/my_analytics_collection
----
// TESTSETUP
////
Removes a <<behavioral-analytics-overview,Behavioral Analytics>> Collection and its associated data stream. Removes a <<behavioral-analytics-overview,Behavioral Analytics>> Collection and its associated data stream.
[[delete-analytics-collection-request]] [[delete-analytics-collection-request]]
@ -59,3 +51,4 @@ The following example deletes the Analytics Collection named `my_analytics_colle
---- ----
DELETE _application/analytics/my_analytics_collection/ DELETE _application/analytics/my_analytics_collection/
---- ----
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]

View file

@ -1,6 +1,7 @@
[[behavioral-analytics-apis]] [[behavioral-analytics-apis]]
== Behavioral Analytics APIs == Behavioral Analytics APIs
deprecated:[9.0.0]
beta::[] beta::[]
++++ ++++

View file

@ -2,6 +2,7 @@
[[list-analytics-collection]] [[list-analytics-collection]]
=== List Analytics Collections === List Analytics Collections
deprecated:[9.0.0]
beta::[] beta::[]
++++ ++++
@ -14,22 +15,6 @@ beta::[]
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs]. For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
-- --
////
[source,console]
----
PUT _application/analytics/my_analytics_collection
PUT _application/analytics/my_analytics_collection2
----
// TESTSETUP
[source,console]
----
DELETE _application/analytics/my_analytics_collection
DELETE _application/analytics/my_analytics_collection2
----
// TEARDOWN
////
Returns information about <<behavioral-analytics-overview,Behavioral Analytics>> Collections. Returns information about <<behavioral-analytics-overview,Behavioral Analytics>> Collections.
[[list-analytics-collection-request]] [[list-analytics-collection-request]]
@ -46,8 +31,9 @@ Requires the `manage_behavioral_analytics` cluster privilege.
==== {api-path-parms-title} ==== {api-path-parms-title}
`<criteria>`:: `<criteria>`::
(optional, string) (optional, string) Criteria is used to find a matching analytics collection.
Criteria is used to find a matching analytics collection. This could be the name of the collection or a pattern to match multiple. If not specified, will return all analytics collections. This could be the name of the collection or a pattern to match multiple.
If not specified, will return all analytics collections.
[[list-analytics-collection-response-codes]] [[list-analytics-collection-response-codes]]
==== {api-response-codes-title} ==== {api-response-codes-title}
@ -66,6 +52,7 @@ The following example lists all configured Analytics Collections:
---- ----
GET _application/analytics/ GET _application/analytics/
---- ----
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
A sample response: A sample response:
@ -91,6 +78,7 @@ The following example returns the Analytics Collection that matches `my_analytic
---- ----
GET _application/analytics/my_analytics_collection GET _application/analytics/my_analytics_collection
---- ----
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
A sample response: A sample response:
@ -111,6 +99,7 @@ The following example returns all Analytics Collections prefixed with `my`:
---- ----
GET _application/analytics/my* GET _application/analytics/my*
---- ----
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
A sample response: A sample response:

View file

@ -2,6 +2,7 @@
[[post-analytics-collection-event]] [[post-analytics-collection-event]]
=== Post Event to an Analytics Collection === Post Event to an Analytics Collection
deprecated:[9.0.0]
beta::[] beta::[]
++++ ++++
@ -14,20 +15,6 @@ beta::[]
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs]. For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
-- --
////
[source,console]
----
PUT _application/analytics/my_analytics_collection
----
// TESTSETUP
[source,console]
----
DELETE _application/analytics/my_analytics_collection
----
// TEARDOWN
////
Post an event to a <<behavioral-analytics-overview,Behavioral Analytics>> Collection. Post an event to a <<behavioral-analytics-overview,Behavioral Analytics>> Collection.
[[post-analytics-collection-event-request]] [[post-analytics-collection-event-request]]
@ -105,3 +92,4 @@ POST _application/analytics/my_analytics_collection/event/search_click
} }
} }
---- ----
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]

View file

@ -2,6 +2,7 @@
[[put-analytics-collection]] [[put-analytics-collection]]
=== Put Analytics Collection === Put Analytics Collection
deprecated:[9.0.0]
beta::[] beta::[]
++++ ++++
@ -14,14 +15,6 @@ beta::[]
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs]. For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
-- --
////
[source,console]
----
DELETE _application/analytics/my_analytics_collection
----
// TEARDOWN
////
Creates a <<behavioral-analytics-overview,Behavioral Analytics>> Collection. Creates a <<behavioral-analytics-overview,Behavioral Analytics>> Collection.
[[put-analytics-collection-request]] [[put-analytics-collection-request]]
@ -55,3 +48,4 @@ The following example creates a new Analytics Collection called `my_analytics_co
---- ----
PUT _application/analytics/my_analytics_collection PUT _application/analytics/my_analytics_collection
---- ----
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]

View file

@ -1,9 +1,12 @@
[[behavioral-analytics-api]] [[behavioral-analytics-api]]
=== Behavioral Analytics API overview === Behavioral Analytics API overview
++++ ++++
<titleabbrev>API overview</titleabbrev> <titleabbrev>API overview</titleabbrev>
++++ ++++
deprecated:[9.0.0]
This page outlines all the APIs available for behavioral analytics and links to their documentation. This page outlines all the APIs available for behavioral analytics and links to their documentation.
[discrete] [discrete]

View file

@ -4,6 +4,8 @@
<titleabbrev>Set up CORs</titleabbrev> <titleabbrev>Set up CORs</titleabbrev>
++++ ++++
deprecated:[9.0.0]
Behavioral Analytics sends events directly to the {es} API. Behavioral Analytics sends events directly to the {es} API.
This means that the browser makes requests to the {es} API directly. This means that the browser makes requests to the {es} API directly.
{es} supports https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS[Cross-Origin Resource Sharing (CORS)^], but this feature is disabled by default. {es} supports https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS[Cross-Origin Resource Sharing (CORS)^], but this feature is disabled by default.

View file

@ -4,6 +4,8 @@
<titleabbrev>Events reference</titleabbrev> <titleabbrev>Events reference</titleabbrev>
++++ ++++
deprecated:[9.0.0]
Behavioral Analytics logs events using the {ecs-ref}/ecs-reference.html[Elastic Common Schema^], including a custom field set for analytics events. Behavioral Analytics logs events using the {ecs-ref}/ecs-reference.html[Elastic Common Schema^], including a custom field set for analytics events.
Refer to <<behavioral-analytics-event-reference-examples,examples>> of the full data objects that are logged. Refer to <<behavioral-analytics-event-reference-examples,examples>> of the full data objects that are logged.

View file

@ -4,6 +4,8 @@
<titleabbrev>View events</titleabbrev> <titleabbrev>View events</titleabbrev>
++++ ++++
deprecated:[9.0.0]
[TIP] [TIP]
==== ====
Refer to <<behavioral-analytics-event-reference>> for a complete list of the fields logged by events. Refer to <<behavioral-analytics-event-reference>> for a complete list of the fields logged by events.

View file

@ -1,6 +1,9 @@
[[behavioral-analytics-overview]] [[behavioral-analytics-overview]]
== Search analytics == Search analytics
deprecated:[9.0.0]
Behavioral Analytics is an analytics event collection platform. Behavioral Analytics is an analytics event collection platform.
Use these tools to analyze your users' searching and clicking behavior. Use these tools to analyze your users' searching and clicking behavior.
Leverage this information to improve the relevance of your search results and identify gaps in your content. Leverage this information to improve the relevance of your search results and identify gaps in your content.

View file

@ -4,6 +4,8 @@
<titleabbrev>Get started</titleabbrev> <titleabbrev>Get started</titleabbrev>
++++ ++++
deprecated:[9.0.0]
You can manage your analytics in the {kib} UI. You can manage your analytics in the {kib} UI.
Go to *Search > Behavioral Analytics* to get started. Go to *Search > Behavioral Analytics* to get started.

View file

@ -6,6 +6,10 @@
}, },
"stability": "experimental", "stability": "experimental",
"visibility": "public", "visibility": "public",
"deprecated": {
"version": "9.0.0",
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
},
"headers": { "headers": {
"accept": [ "accept": [
"application/json" "application/json"

View file

@ -6,6 +6,10 @@
}, },
"stability": "experimental", "stability": "experimental",
"visibility": "public", "visibility": "public",
"deprecated": {
"version": "9.0.0",
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
},
"headers": { "headers": {
"accept": [ "accept": [
"application/json" "application/json"

View file

@ -6,6 +6,10 @@
}, },
"stability": "experimental", "stability": "experimental",
"visibility": "public", "visibility": "public",
"deprecated": {
"version": "9.0.0",
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
},
"headers": { "headers": {
"accept": [ "accept": [
"application/json" "application/json"

View file

@ -5,6 +5,10 @@
"description": "Creates a behavioral analytics collection." "description": "Creates a behavioral analytics collection."
}, },
"stability": "experimental", "stability": "experimental",
"deprecated": {
"version": "9.0.0",
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
},
"visibility": "public", "visibility": "public",
"headers": { "headers": {
"accept": [ "accept": [

View file

@ -37,3 +37,11 @@ testClusters.configureEach {
artifacts { artifacts {
restXpackTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test")) restXpackTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test"))
} }
tasks.named("yamlRestCompatTestTransform").configure(
{ task ->
// Behavioral Analytics is deprecated with 9.0.0.
task.addAllowedWarning("Behavioral Analytics is deprecated and will be removed in a future release.")
}
)

View file

@ -27,6 +27,8 @@ teardown:
--- ---
"xpack usage includes Enterprise Search": "xpack usage includes Enterprise Search":
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
xpack.usage: { } xpack.usage: { }
@ -79,6 +81,8 @@ teardown:
query: "{{query_string}}" query: "{{query_string}}"
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: test-analytics-collection name: test-analytics-collection
@ -113,6 +117,8 @@ teardown:
} }
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: test-analytics-collection name: test-analytics-collection

View file

@ -1,25 +1,39 @@
setup: setup:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: my-test-analytics-collection2 name: my-test-analytics-collection2
--- ---
teardown: teardown:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: my-test-analytics-collection2 name: my-test-analytics-collection2
--- ---
"Get Analytics Collection for a particular collection": "Get Analytics Collection for a particular collection":
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.get_behavioral_analytics: search_application.get_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
@ -34,6 +48,8 @@ teardown:
--- ---
"Get Analytics Collection list": "Get Analytics Collection list":
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.get_behavioral_analytics: search_application.get_behavioral_analytics:
name: name:
@ -56,6 +72,8 @@ teardown:
"Get Analytics Collection - Resource does not exist": "Get Analytics Collection - Resource does not exist":
- do: - do:
catch: "missing" catch: "missing"
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.get_behavioral_analytics: search_application.get_behavioral_analytics:
name: test-nonexistent-analytics-collection name: test-nonexistent-analytics-collection

View file

@ -1,11 +1,19 @@
teardown: teardown:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: test-analytics-collection name: test-analytics-collection
--- ---
"Create Analytics Collection": "Create Analytics Collection":
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: test-analytics-collection name: test-analytics-collection
@ -14,7 +22,11 @@ teardown:
--- ---
"Create Analytics Collection - analytics collection already exists": "Create Analytics Collection - analytics collection already exists":
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: test-analytics-collection name: test-analytics-collection
@ -22,6 +34,8 @@ teardown:
- do: - do:
catch: bad_request catch: bad_request
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: test-analytics-collection name: test-analytics-collection

View file

@ -1,18 +1,30 @@
setup: setup:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
--- ---
teardown: teardown:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
ignore: 404 ignore: 404
--- ---
"Delete Analytics Collection": "Delete Analytics Collection":
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
@ -20,13 +32,19 @@ teardown:
- do: - do:
catch: "missing" catch: "missing"
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.get_behavioral_analytics: search_application.get_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
--- ---
"Delete Analytics Collection - Analytics Collection does not exist": "Delete Analytics Collection - Analytics Collection does not exist":
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
catch: "missing" catch: "missing"
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: test-nonexistent-analytics-collection name: test-nonexistent-analytics-collection

View file

@ -1,11 +1,19 @@
setup: setup:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
--- ---
teardown: teardown:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
@ -13,11 +21,13 @@ teardown:
# Page view event tests ######################################### # Page view event tests #########################################
--- ---
"Post page_view analytics event": "Post page_view analytics event":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -31,12 +41,14 @@ teardown:
--- ---
"Post page_view analytics event - Missing page.url": "Post page_view analytics event - Missing page.url":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "bad_request" catch: "bad_request"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -49,11 +61,13 @@ teardown:
--- ---
"Post page_view analytics event - With document": "Post page_view analytics event - With document":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -70,11 +84,13 @@ teardown:
--- ---
"Post page_view analytics event - With page title": "Post page_view analytics event - With page title":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -89,11 +105,13 @@ teardown:
--- ---
"Post page_view analytics event - With referrer": "Post page_view analytics event - With referrer":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -108,14 +126,16 @@ teardown:
--- ---
"Post page_view analytics event - debug and session information": "Post page_view analytics event - debug and session information":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: headers:
X-Forwarded-For: 192.23.12.12 X-Forwarded-For: 192.23.12.12
User-Agent: Mozilla/5.0 User-Agent: Mozilla/5.0
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -152,11 +172,13 @@ teardown:
# Search event tests ############################################ # Search event tests ############################################
--- ---
"Post search analytics event": "Post search analytics event":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search" event_type: "search"
@ -170,12 +192,14 @@ teardown:
--- ---
"Post search analytics event Missing search query": "Post search analytics event Missing search query":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "bad_request" catch: "bad_request"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search" event_type: "search"
@ -188,11 +212,13 @@ teardown:
--- ---
"Post search analytics event - With sort order": "Post search analytics event - With sort order":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search" event_type: "search"
@ -208,11 +234,13 @@ teardown:
--- ---
"Post search analytics event - With sort name and direction": "Post search analytics event - With sort name and direction":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search" event_type: "search"
@ -229,11 +257,13 @@ teardown:
--- ---
"Post search analytics event - With pagination": "Post search analytics event - With pagination":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search" event_type: "search"
@ -250,11 +280,13 @@ teardown:
--- ---
"Post search analytics event - With search application": "Post search analytics event - With search application":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search" event_type: "search"
@ -269,10 +301,12 @@ teardown:
--- ---
"Post search analytics event - With search results": "Post search analytics event - With search results":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
@ -302,11 +336,13 @@ teardown:
--- ---
"Post search analytics event - With filters": "Post search analytics event - With filters":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search" event_type: "search"
@ -324,14 +360,16 @@ teardown:
--- ---
"Post search analytics event - debug and session information": "Post search analytics event - debug and session information":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: headers:
X-Forwarded-For: 192.23.12.12 X-Forwarded-For: 192.23.12.12
User-Agent: Mozilla/5.0 User-Agent: Mozilla/5.0
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search" event_type: "search"
@ -393,11 +431,13 @@ teardown:
# Search click event tests ####################################### # Search click event tests #######################################
--- ---
"Post search_click analytics event": "Post search_click analytics event":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search_click" event_type: "search_click"
@ -415,14 +455,16 @@ teardown:
--- ---
"Post search_click analytics event - debug and session information": "Post search_click analytics event - debug and session information":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: headers:
X-Forwarded-For: 192.23.12.12 X-Forwarded-For: 192.23.12.12
User-Agent: Mozilla/5.0 User-Agent: Mozilla/5.0
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search_click" event_type: "search_click"
@ -455,11 +497,13 @@ teardown:
--- ---
"Post search_click analytics event - Page Only": "Post search_click analytics event - Page Only":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search_click" event_type: "search_click"
@ -475,11 +519,13 @@ teardown:
--- ---
"Post search_click analytics event - Document Only": "Post search_click analytics event - Document Only":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search_click" event_type: "search_click"
@ -496,12 +542,14 @@ teardown:
--- ---
"Post search_click analytics event Missing search query": "Post search_click analytics event Missing search query":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "bad_request" catch: "bad_request"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search_click" event_type: "search_click"
@ -516,12 +564,14 @@ teardown:
--- ---
"Post search_click analytics event Missing page url and document": "Post search_click analytics event Missing page url and document":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "bad_request" catch: "bad_request"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "search_click" event_type: "search_click"
@ -537,12 +587,14 @@ teardown:
# Generic errors tests ############################################### # Generic errors tests ###############################################
--- ---
"Post analytics event - Analytics collection does not exist": "Post analytics event - Analytics collection does not exist":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "missing" catch: "missing"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: test-nonexistent-analytics-collection collection_name: test-nonexistent-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -556,12 +608,14 @@ teardown:
--- ---
"Post analytics event - Event type does not exist": "Post analytics event - Event type does not exist":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "bad_request" catch: "bad_request"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "nonexistent-event-type" event_type: "nonexistent-event-type"
@ -577,12 +631,14 @@ teardown:
--- ---
"Post page_view analytics event - Missing session.id": "Post page_view analytics event - Missing session.id":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "bad_request" catch: "bad_request"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -595,12 +651,14 @@ teardown:
--- ---
"Post page_view analytics event - Missing user.id": "Post page_view analytics event - Missing user.id":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "bad_request" catch: "bad_request"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "page_view" event_type: "page_view"
@ -613,12 +671,14 @@ teardown:
--- ---
"Post analytics event - Unknown event field": "Post analytics event - Unknown event field":
- skip: - requires:
features: headers test_runner_features: [ allowed_warnings, headers ]
- do: - do:
catch: "bad_request" catch: "bad_request"
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.post_behavioral_analytics_event: search_application.post_behavioral_analytics_event:
collection_name: my-test-analytics-collection collection_name: my-test-analytics-collection
event_type: "nonexistent-event-type" event_type: "nonexistent-event-type"

View file

@ -1,4 +1,6 @@
setup: setup:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
indices.create: indices.create:
index: test-search-index1 index: test-search-index1
@ -27,6 +29,8 @@ setup:
number_of_replicas: 0 number_of_replicas: 0
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put: search_application.put:
name: test-search-application name: test-search-application
body: body:
@ -51,6 +55,8 @@ setup:
type: string type: string
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put: search_application.put:
name: test-search-application-1 name: test-search-application-1
body: body:
@ -110,10 +116,14 @@ setup:
refresh: true refresh: true
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.put_behavioral_analytics: search_application.put_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
--- ---
teardown: teardown:
- requires:
test_runner_features: [ allowed_warnings ]
- do: - do:
search_application.delete: search_application.delete:
name: test-search-application name: test-search-application
@ -145,13 +155,15 @@ teardown:
ignore: 404 ignore: 404
- do: - do:
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.delete_behavioral_analytics: search_application.delete_behavioral_analytics:
name: my-test-analytics-collection name: my-test-analytics-collection
--- ---
"Query Search Application with API key": "Query Search Application with API key":
- skip: - requires:
features: headers test_runner_features: [ headers, allowed_warnings ]
- do: - do:
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
@ -281,6 +293,8 @@ teardown:
catch: forbidden catch: forbidden
headers: headers:
Authorization: ApiKey ${api_key_encoded} Authorization: ApiKey ${api_key_encoded}
allowed_warnings:
- "Behavioral Analytics is deprecated and will be removed in a future release."
search_application.get_behavioral_analytics: search_application.get_behavioral_analytics:
name: name:
- match: { status: 403 } - match: { status: 403 }

View file

@ -233,6 +233,10 @@ public class EnterpriseSearch extends Plugin implements ActionPlugin, SystemInde
private final boolean enabled; private final boolean enabled;
// NOTE: Behavioral Analytics is deprecated in 9.0 but not 8.x.
public static final String BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE =
"Behavioral Analytics is deprecated and will be removed in a future release.";
public EnterpriseSearch(Settings settings) { public EnterpriseSearch(Settings settings) {
this.enabled = XPackSettings.ENTERPRISE_SEARCH_ENABLED.get(settings); this.enabled = XPackSettings.ENTERPRISE_SEARCH_ENABLED.get(settings);
} }

View file

@ -28,7 +28,9 @@ import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.E
/** /**
* The {@link AnalyticsCollection} model. * The {@link AnalyticsCollection} model.
* @deprecated in 9.0
*/ */
@Deprecated
public class AnalyticsCollection implements Writeable, ToXContentObject { public class AnalyticsCollection implements Writeable, ToXContentObject {
private static final ObjectParser<AnalyticsCollection, String> PARSER = ObjectParser.fromBuilder( private static final ObjectParser<AnalyticsCollection, String> PARSER = ObjectParser.fromBuilder(

View file

@ -28,7 +28,9 @@ import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.E
/** /**
* A service that allows the resolution of {@link AnalyticsCollection} by name. * A service that allows the resolution of {@link AnalyticsCollection} by name.
* @deprecated in 9.0
*/ */
@Deprecated
public class AnalyticsCollectionResolver { public class AnalyticsCollectionResolver {
private final IndexNameExpressionResolver indexNameExpressionResolver; private final IndexNameExpressionResolver indexNameExpressionResolver;

View file

@ -33,7 +33,9 @@ import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
* Until we have more specific need the {@link AnalyticsCollection} is just another representation * Until we have more specific need the {@link AnalyticsCollection} is just another representation
* of a {@link org.elasticsearch.cluster.metadata.DataStream}. * of a {@link org.elasticsearch.cluster.metadata.DataStream}.
* As a consequence, this service is mostly a facade for the data stream API. * As a consequence, this service is mostly a facade for the data stream API.
* @deprecated in 9.0
*/ */
@Deprecated
public class AnalyticsCollectionService { public class AnalyticsCollectionService {
private static final Logger logger = LogManager.getLogger(AnalyticsCollectionService.class); private static final Logger logger = LogManager.getLogger(AnalyticsCollectionService.class);

View file

@ -7,6 +7,10 @@
package org.elasticsearch.xpack.application.analytics; package org.elasticsearch.xpack.application.analytics;
/**
* @deprecated in 9.0
*/
@Deprecated
public class AnalyticsConstants { public class AnalyticsConstants {
private AnalyticsConstants() {} private AnalyticsConstants() {}

View file

@ -17,7 +17,9 @@ import java.util.Objects;
/** /**
* Event emitter will index Analytics events submitted through a @{PostAnalyticsEventAction.Request} request. * Event emitter will index Analytics events submitted through a @{PostAnalyticsEventAction.Request} request.
* @deprecated in 9.0
*/ */
@Deprecated
public class AnalyticsEventIngestService { public class AnalyticsEventIngestService {
private final AnalyticsCollectionResolver collectionResolver; private final AnalyticsCollectionResolver collectionResolver;

View file

@ -31,6 +31,10 @@ import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.R
import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.TEMPLATE_VERSION_VARIABLE; import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.TEMPLATE_VERSION_VARIABLE;
import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN; import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
/**
* @deprecated in 9.0
*/
@Deprecated
public class AnalyticsTemplateRegistry extends IndexTemplateRegistry { public class AnalyticsTemplateRegistry extends IndexTemplateRegistry {
// This number must be incremented when we make changes to built-in templates. // This number must be incremented when we make changes to built-in templates.

View file

@ -24,6 +24,10 @@ import java.util.Objects;
import static org.elasticsearch.action.ValidateActions.addValidationError; import static org.elasticsearch.action.ValidateActions.addValidationError;
/**
* @deprecated in 9.0
*/
@Deprecated
public class DeleteAnalyticsCollectionAction { public class DeleteAnalyticsCollectionAction {
public static final String NAME = "cluster:admin/xpack/application/analytics/delete"; public static final String NAME = "cluster:admin/xpack/application/analytics/delete";

View file

@ -25,6 +25,10 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
/**
* @deprecated in 9.0
*/
@Deprecated
public class GetAnalyticsCollectionAction { public class GetAnalyticsCollectionAction {
public static final String NAME = "cluster:admin/xpack/application/analytics/get"; public static final String NAME = "cluster:admin/xpack/application/analytics/get";

View file

@ -36,6 +36,10 @@ import java.util.Objects;
import static org.elasticsearch.action.ValidateActions.addValidationError; import static org.elasticsearch.action.ValidateActions.addValidationError;
import static org.elasticsearch.xcontent.ConstructingObjectParser.constructorArg; import static org.elasticsearch.xcontent.ConstructingObjectParser.constructorArg;
/**
* @deprecated in 9.0
*/
@Deprecated
public class PostAnalyticsEventAction { public class PostAnalyticsEventAction {
public static final String NAME = "cluster:admin/xpack/application/analytics/post_event"; public static final String NAME = "cluster:admin/xpack/application/analytics/post_event";

View file

@ -23,6 +23,10 @@ import java.util.Objects;
import static org.elasticsearch.action.ValidateActions.addValidationError; import static org.elasticsearch.action.ValidateActions.addValidationError;
/**
* @deprecated in 9.0
*/
@Deprecated
public class PutAnalyticsCollectionAction { public class PutAnalyticsCollectionAction {
public static final String NAME = "cluster:admin/xpack/application/analytics/put"; public static final String NAME = "cluster:admin/xpack/application/analytics/put";

View file

@ -23,6 +23,10 @@ import java.util.List;
import static org.elasticsearch.rest.RestRequest.Method.DELETE; import static org.elasticsearch.rest.RestRequest.Method.DELETE;
/**
* @deprecated in 9.0
*/
@Deprecated
@ServerlessScope(Scope.PUBLIC) @ServerlessScope(Scope.PUBLIC)
public class RestDeleteAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler { public class RestDeleteAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
public RestDeleteAnalyticsCollectionAction(XPackLicenseState licenseState) { public RestDeleteAnalyticsCollectionAction(XPackLicenseState licenseState) {

View file

@ -23,6 +23,10 @@ import java.util.List;
import static org.elasticsearch.rest.RestRequest.Method.GET; import static org.elasticsearch.rest.RestRequest.Method.GET;
/**
* @deprecated in 9.0
*/
@Deprecated
@ServerlessScope(Scope.PUBLIC) @ServerlessScope(Scope.PUBLIC)
public class RestGetAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler { public class RestGetAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
public RestGetAnalyticsCollectionAction(XPackLicenseState licenseState) { public RestGetAnalyticsCollectionAction(XPackLicenseState licenseState) {

View file

@ -29,6 +29,10 @@ import java.util.Map;
import static org.elasticsearch.rest.RestRequest.Method.POST; import static org.elasticsearch.rest.RestRequest.Method.POST;
/**
* @deprecated in 9.0
*/
@Deprecated
@ServerlessScope(Scope.PUBLIC) @ServerlessScope(Scope.PUBLIC)
public class RestPostAnalyticsEventAction extends EnterpriseSearchBaseRestHandler { public class RestPostAnalyticsEventAction extends EnterpriseSearchBaseRestHandler {
public RestPostAnalyticsEventAction(XPackLicenseState licenseState) { public RestPostAnalyticsEventAction(XPackLicenseState licenseState) {

View file

@ -24,6 +24,10 @@ import java.util.List;
import static org.elasticsearch.rest.RestRequest.Method.PUT; import static org.elasticsearch.rest.RestRequest.Method.PUT;
/**
* @deprecated in 9.0
*/
@Deprecated
@ServerlessScope(Scope.PUBLIC) @ServerlessScope(Scope.PUBLIC)
public class RestPutAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler { public class RestPutAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
public RestPutAnalyticsCollectionAction(XPackLicenseState licenseState) { public RestPutAnalyticsCollectionAction(XPackLicenseState licenseState) {

View file

@ -15,6 +15,8 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.block.ClusterBlockLevel; import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.logging.DeprecationCategory;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.util.concurrent.EsExecutors; import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.injection.guice.Inject; import org.elasticsearch.injection.guice.Inject;
import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.Task;
@ -22,6 +24,13 @@ import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService; import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_API_ENDPOINT;
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE;
/**
* @deprecated in 9.0
*/
@Deprecated
public class TransportDeleteAnalyticsCollectionAction extends AcknowledgedTransportMasterNodeAction< public class TransportDeleteAnalyticsCollectionAction extends AcknowledgedTransportMasterNodeAction<
DeleteAnalyticsCollectionAction.Request> { DeleteAnalyticsCollectionAction.Request> {
@ -59,6 +68,8 @@ public class TransportDeleteAnalyticsCollectionAction extends AcknowledgedTransp
ClusterState state, ClusterState state,
ActionListener<AcknowledgedResponse> listener ActionListener<AcknowledgedResponse> listener
) { ) {
DeprecationLogger.getLogger(TransportDeleteAnalyticsCollectionAction.class)
.warn(DeprecationCategory.API, BEHAVIORAL_ANALYTICS_API_ENDPOINT, BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE);
analyticsCollectionService.deleteAnalyticsCollection(state, request, listener.map(v -> AcknowledgedResponse.TRUE)); analyticsCollectionService.deleteAnalyticsCollection(state, request, listener.map(v -> AcknowledgedResponse.TRUE));
} }
} }

View file

@ -13,6 +13,8 @@ import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.logging.DeprecationCategory;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.util.concurrent.EsExecutors; import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.injection.guice.Inject; import org.elasticsearch.injection.guice.Inject;
import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.Task;
@ -20,6 +22,13 @@ import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService; import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_API_ENDPOINT;
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE;
/**
* @deprecated in 9.0
*/
@Deprecated
public class TransportGetAnalyticsCollectionAction extends TransportMasterNodeReadAction< public class TransportGetAnalyticsCollectionAction extends TransportMasterNodeReadAction<
GetAnalyticsCollectionAction.Request, GetAnalyticsCollectionAction.Request,
GetAnalyticsCollectionAction.Response> { GetAnalyticsCollectionAction.Response> {
@ -54,6 +63,8 @@ public class TransportGetAnalyticsCollectionAction extends TransportMasterNodeRe
ClusterState state, ClusterState state,
ActionListener<GetAnalyticsCollectionAction.Response> listener ActionListener<GetAnalyticsCollectionAction.Response> listener
) { ) {
DeprecationLogger.getLogger(TransportDeleteAnalyticsCollectionAction.class)
.warn(DeprecationCategory.API, BEHAVIORAL_ANALYTICS_API_ENDPOINT, BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE);
analyticsCollectionService.getAnalyticsCollection(state, request, listener); analyticsCollectionService.getAnalyticsCollection(state, request, listener);
} }

View file

@ -10,17 +10,25 @@ package org.elasticsearch.xpack.application.analytics.action;
import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.action.support.ActionFilters;
import org.elasticsearch.action.support.HandledTransportAction; import org.elasticsearch.action.support.HandledTransportAction;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.logging.DeprecationCategory;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.util.concurrent.EsExecutors; import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.injection.guice.Inject; import org.elasticsearch.injection.guice.Inject;
import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.Task;
import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.application.analytics.AnalyticsEventIngestService; import org.elasticsearch.xpack.application.analytics.AnalyticsEventIngestService;
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_API_ENDPOINT;
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE;
/** /**
* Transport implementation for the {@link PostAnalyticsEventAction}. * Transport implementation for the {@link PostAnalyticsEventAction}.
* It executes the {@link AnalyticsEventIngestService#addEvent} method if the XPack license is valid, else it calls * It executes the {@link AnalyticsEventIngestService#addEvent} method if the XPack license is valid, else it calls
* the listener's onFailure method with the appropriate exception. * the listener's onFailure method with the appropriate exception.
* @deprecated in 9.0
*/ */
@Deprecated
public class TransportPostAnalyticsEventAction extends HandledTransportAction< public class TransportPostAnalyticsEventAction extends HandledTransportAction<
PostAnalyticsEventAction.Request, PostAnalyticsEventAction.Request,
PostAnalyticsEventAction.Response> { PostAnalyticsEventAction.Response> {
@ -31,7 +39,8 @@ public class TransportPostAnalyticsEventAction extends HandledTransportAction<
public TransportPostAnalyticsEventAction( public TransportPostAnalyticsEventAction(
TransportService transportService, TransportService transportService,
ActionFilters actionFilters, ActionFilters actionFilters,
AnalyticsEventIngestService eventEmitterService AnalyticsEventIngestService eventEmitterService,
ClusterService clusterService
) { ) {
super( super(
PostAnalyticsEventAction.NAME, PostAnalyticsEventAction.NAME,
@ -49,6 +58,8 @@ public class TransportPostAnalyticsEventAction extends HandledTransportAction<
PostAnalyticsEventAction.Request request, PostAnalyticsEventAction.Request request,
ActionListener<PostAnalyticsEventAction.Response> listener ActionListener<PostAnalyticsEventAction.Response> listener
) { ) {
DeprecationLogger.getLogger(TransportDeleteAnalyticsCollectionAction.class)
.warn(DeprecationCategory.API, BEHAVIORAL_ANALYTICS_API_ENDPOINT, BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE);
this.eventEmitterService.addEvent(request, listener); this.eventEmitterService.addEvent(request, listener);
} }
} }

View file

@ -14,13 +14,23 @@ import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.block.ClusterBlockException;
import org.elasticsearch.cluster.block.ClusterBlockLevel; import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.logging.DeprecationCategory;
import org.elasticsearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.util.concurrent.EsExecutors; import org.elasticsearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.features.FeatureService;
import org.elasticsearch.injection.guice.Inject; import org.elasticsearch.injection.guice.Inject;
import org.elasticsearch.tasks.Task; import org.elasticsearch.tasks.Task;
import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService; import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_API_ENDPOINT;
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE;
/**
* @deprecated in 9.0
*/
@Deprecated
public class TransportPutAnalyticsCollectionAction extends TransportMasterNodeAction< public class TransportPutAnalyticsCollectionAction extends TransportMasterNodeAction<
PutAnalyticsCollectionAction.Request, PutAnalyticsCollectionAction.Request,
PutAnalyticsCollectionAction.Response> { PutAnalyticsCollectionAction.Response> {
@ -33,7 +43,8 @@ public class TransportPutAnalyticsCollectionAction extends TransportMasterNodeAc
ClusterService clusterService, ClusterService clusterService,
ThreadPool threadPool, ThreadPool threadPool,
ActionFilters actionFilters, ActionFilters actionFilters,
AnalyticsCollectionService analyticsCollectionService AnalyticsCollectionService analyticsCollectionService,
FeatureService featureService
) { ) {
super( super(
PutAnalyticsCollectionAction.NAME, PutAnalyticsCollectionAction.NAME,
@ -60,6 +71,8 @@ public class TransportPutAnalyticsCollectionAction extends TransportMasterNodeAc
ClusterState state, ClusterState state,
ActionListener<PutAnalyticsCollectionAction.Response> listener ActionListener<PutAnalyticsCollectionAction.Response> listener
) { ) {
DeprecationLogger.getLogger(TransportDeleteAnalyticsCollectionAction.class)
.warn(DeprecationCategory.API, BEHAVIORAL_ANALYTICS_API_ENDPOINT, BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE);
analyticsCollectionService.putAnalyticsCollection(state, request, listener); analyticsCollectionService.putAnalyticsCollection(state, request, listener);
} }

View file

@ -31,7 +31,9 @@ import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.E
/** /**
* This class represents Analytics events object meant to be emitted to the event queue. * This class represents Analytics events object meant to be emitted to the event queue.
* @deprecated in 9.0
*/ */
@Deprecated
public class AnalyticsEvent implements Writeable, ToXContentObject { public class AnalyticsEvent implements Writeable, ToXContentObject {
public static final ParseField TIMESTAMP_FIELD = new ParseField("@timestamp"); public static final ParseField TIMESTAMP_FIELD = new ParseField("@timestamp");

View file

@ -29,7 +29,9 @@ import static org.elasticsearch.xpack.application.analytics.event.AnalyticsEvent
/** /**
* A utility class for parsing {@link AnalyticsEvent} objects from payloads (such as HTTP POST request bodies) or input streams. * A utility class for parsing {@link AnalyticsEvent} objects from payloads (such as HTTP POST request bodies) or input streams.
* @deprecated in 9.0
*/ */
@Deprecated
public class AnalyticsEventFactory { public class AnalyticsEventFactory {
public static final AnalyticsEventFactory INSTANCE = new AnalyticsEventFactory(); public static final AnalyticsEventFactory INSTANCE = new AnalyticsEventFactory();

View file

@ -22,6 +22,10 @@ import static org.elasticsearch.xpack.application.analytics.event.parser.field.P
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
/**
* @deprecated in 9.0
*/
@Deprecated
public class PageViewAnalyticsEvent { public class PageViewAnalyticsEvent {
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder( private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(
"page_view_event", "page_view_event",

View file

@ -20,6 +20,10 @@ import static org.elasticsearch.xpack.application.analytics.event.parser.field.S
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
/**
* @deprecated in 9.0
*/
@Deprecated
public class SearchAnalyticsEvent { public class SearchAnalyticsEvent {
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder( private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(
"search_event", "search_event",

View file

@ -24,6 +24,10 @@ import static org.elasticsearch.xpack.application.analytics.event.parser.field.S
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
/**
* @deprecated in 9.0
*/
@Deprecated
public class SearchClickAnalyticsEvent { public class SearchClickAnalyticsEvent {
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder( private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(

View file

@ -18,6 +18,10 @@ import java.util.Map;
import static org.elasticsearch.common.Strings.requireNonBlank; import static org.elasticsearch.common.Strings.requireNonBlank;
/**
* @deprecated in 9.0
*/
@Deprecated
public class DocumentAnalyticsEventField { public class DocumentAnalyticsEventField {
public static final ParseField DOCUMENT_FIELD = new ParseField("document"); public static final ParseField DOCUMENT_FIELD = new ParseField("document");

View file

@ -16,6 +16,10 @@ import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
/**
* @deprecated in 9.0
*/
@Deprecated
public class PageAnalyticsEventField { public class PageAnalyticsEventField {
public static final ParseField PAGE_FIELD = new ParseField("page"); public static final ParseField PAGE_FIELD = new ParseField("page");

View file

@ -17,6 +17,10 @@ import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
/**
* @deprecated in 9.0
*/
@Deprecated
public class PaginationAnalyticsEventField { public class PaginationAnalyticsEventField {
public static final ParseField PAGINATION_FIELD = new ParseField("page"); public static final ParseField PAGINATION_FIELD = new ParseField("page");

View file

@ -20,6 +20,10 @@ import static org.elasticsearch.xpack.application.analytics.event.parser.field.P
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SearchFiltersAnalyticsEventField.SEARCH_FILTERS_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.SearchFiltersAnalyticsEventField.SEARCH_FILTERS_FIELD;
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SortOrderAnalyticsEventField.SORT_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.SortOrderAnalyticsEventField.SORT_FIELD;
/**
* @deprecated in 9.0
*/
@Deprecated
public class SearchAnalyticsEventField { public class SearchAnalyticsEventField {
public static final ParseField SEARCH_FIELD = new ParseField("search"); public static final ParseField SEARCH_FIELD = new ParseField("search");

View file

@ -18,6 +18,10 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/**
* @deprecated in 9.0
*/
@Deprecated
public class SearchFiltersAnalyticsEventField { public class SearchFiltersAnalyticsEventField {
public static final ParseField SEARCH_FILTERS_FIELD = new ParseField("filters"); public static final ParseField SEARCH_FILTERS_FIELD = new ParseField("filters");

View file

@ -19,6 +19,10 @@ import java.util.Map;
import static org.elasticsearch.xpack.application.analytics.event.parser.field.DocumentAnalyticsEventField.DOCUMENT_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.DocumentAnalyticsEventField.DOCUMENT_FIELD;
import static org.elasticsearch.xpack.application.analytics.event.parser.field.PageAnalyticsEventField.PAGE_FIELD; import static org.elasticsearch.xpack.application.analytics.event.parser.field.PageAnalyticsEventField.PAGE_FIELD;
/**
* @deprecated in 9.0
*/
@Deprecated
public class SearchResultAnalyticsEventField { public class SearchResultAnalyticsEventField {
public static final ParseField SEARCH_RESULTS_TOTAL_FIELD = new ParseField("total_results"); public static final ParseField SEARCH_RESULTS_TOTAL_FIELD = new ParseField("total_results");

View file

@ -20,6 +20,10 @@ import java.util.Map;
import static org.elasticsearch.common.Strings.requireNonBlank; import static org.elasticsearch.common.Strings.requireNonBlank;
/**
* @deprecated in 9.0
*/
@Deprecated
public class SessionAnalyticsEventField { public class SessionAnalyticsEventField {
public static final ParseField SESSION_FIELD = new ParseField("session"); public static final ParseField SESSION_FIELD = new ParseField("session");

View file

@ -18,6 +18,10 @@ import java.util.Map;
import static org.elasticsearch.common.Strings.requireNonBlank; import static org.elasticsearch.common.Strings.requireNonBlank;
/**
* @deprecated in 9.0
*/
@Deprecated
public class SortOrderAnalyticsEventField { public class SortOrderAnalyticsEventField {
public static final ParseField SORT_FIELD = new ParseField("sort"); public static final ParseField SORT_FIELD = new ParseField("sort");

View file

@ -19,6 +19,10 @@ import java.util.Map;
import static org.elasticsearch.common.Strings.requireNonBlank; import static org.elasticsearch.common.Strings.requireNonBlank;
/**
* @deprecated in 9.0
*/
@Deprecated
public class UserAnalyticsEventField { public class UserAnalyticsEventField {
public static final ParseField USER_FIELD = new ParseField("user"); public static final ParseField USER_FIELD = new ParseField("user");

View file

@ -34,6 +34,10 @@ import java.util.concurrent.atomic.AtomicBoolean;
import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN; import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
/**
* @deprecated in 9.0
*/
@Deprecated
public class AnalyticsEventEmitter extends AbstractLifecycleComponent { public class AnalyticsEventEmitter extends AbstractLifecycleComponent {
private static final Logger logger = LogManager.getLogger(AnalyticsEventEmitter.class); private static final Logger logger = LogManager.getLogger(AnalyticsEventEmitter.class);

View file

@ -20,7 +20,9 @@ import org.elasticsearch.injection.guice.Inject;
* - flush_delay: the maximum delay between two flushes (default: 10s.) * - flush_delay: the maximum delay between two flushes (default: 10s.)
* - max_events_per_bulk: the maximum number of events that can be added to the bulk before flushing the bulk (default: 1000) * - max_events_per_bulk: the maximum number of events that can be added to the bulk before flushing the bulk (default: 1000)
* - max_number_of_retries: the maximum number of retries when bulk execution fails (default: 3) * - max_number_of_retries: the maximum number of retries when bulk execution fails (default: 3)
* @deprecated in 9.0
*/ */
@Deprecated
public class AnalyticsEventIngestConfig { public class AnalyticsEventIngestConfig {
private static final String SETTING_ROOT_PATH = "xpack.applications.behavioral_analytics.ingest"; private static final String SETTING_ROOT_PATH = "xpack.applications.behavioral_analytics.ingest";

View file

@ -26,7 +26,9 @@ import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
/** /**
* Event ingest is done through a {@link BulkProcessor2}. This class is responsible for instantiating the bulk processor. * Event ingest is done through a {@link BulkProcessor2}. This class is responsible for instantiating the bulk processor.
* @deprecated in 9.0
*/ */
@Deprecated
public class BulkProcessorFactory { public class BulkProcessorFactory {
private static final Logger logger = LogManager.getLogger(AnalyticsEventEmitter.class); private static final Logger logger = LogManager.getLogger(AnalyticsEventEmitter.class);