Add support for extended search usage telemetry#135306
Add support for extended search usage telemetry#135306kderusso merged 32 commits intoelastic:mainfrom
Conversation
|
Hi @kderusso, I've created a changelog YAML for you. |
x-pack/plugin/inference/build.gradle
Outdated
| restResources { | ||
| restApi { | ||
| include '_common', 'bulk', 'indices', 'inference', 'index', 'get', 'update', 'reindex', 'search', 'field_caps', 'capabilities' | ||
| include '_common', 'bulk', 'cluster', 'indices', 'inference', 'index', 'get', 'update', 'reindex', 'search', 'field_caps', 'capabilities' |
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
|
Pinging @elastic/search-relevance (Team:Search - Relevance) |
Mikep86
left a comment
There was a problem hiding this comment.
High level review for now. All my feedback at this time revolves around the data structure we use in ExtendedSearchUsageStats. I think we want to plan for the future here and allow for variable levels of extended stats.
server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ExtendedSearchUsageStats.java
Outdated
Show resolved
Hide resolved
Mikep86
left a comment
There was a problem hiding this comment.
Partial review, I'll go through the rest tomorrow. Thank you for integrating the ExtendedSearchUsageMetric interface ❤️
...er/src/main/java/org/elasticsearch/action/admin/cluster/stats/ExtendedSearchUsageMetric.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/elasticsearch/action/admin/cluster/stats/ExtendedSearchUsageLongCounter.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/elasticsearch/action/admin/cluster/stats/ExtendedSearchUsageLongCounter.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ExtendedSearchUsageStats.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ExtendedSearchUsageStats.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ExtendedSearchUsageStats.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/ActionModule.java
Outdated
Show resolved
Hide resolved
Mikep86
left a comment
There was a problem hiding this comment.
LGTM! I left a few nit/cleanup comments, but nothing blocking.
We would need to make some changes in SearchUsage and SearchUsageHolder to use anything besides ExtendedSearchUsageLongCounter, but that's fine for now. The important thing is that the named writeable approach gives us a good way to manage serialization of future extended search usage metrics.
Adds an extended section to search usage statistics, so that we can report on the usage of specific features underneath each category. The first category we will support is
retrieversand specifically content supported by thetext_similarity_rerankerbut this leaves the option open to easily add not only other retrievers but also other high level categories, or other search data.Example output of
GET _cluster/stats?human&filter_path=indices.search*: