-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose agg usage in Feature Usage API #53746
Comments
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
We have two ways of implementing this feature: incrementing the usage counter on the parser invocation and by incrementing the counter on ValuesSourceRegistry access. In case of parser, we can count high level invocations. Basically for each search that contains one aggregation of a certain type we will count it as one use. Unfortunately, on this level we will not have information about value type the aggregation is executed one. So for example if a percentiles was executed we will not know if it was executed on histogram data type or not. In case of ValuesSourceRegistry access counters, we will now the type, but we will count each shard access as a separate invocation. So, if we execute a single search with a single aggregation on 2 indices with 5 shards each, we will count his as 10 invocation. We can do some tricks like counting it only on shard 0. In this case it will be counted as 2 invocations. |
I'm tentatively leaning towards the second option. I think it'd be more useful to know the complete list of aggs being used, as well as which field types they are being used against... even if it means they are "over-counted" by doing it per-shard. My feeling is that the absolute numbers don't matter as much as relative numbers? E.g. as an administrator I think I'd care that an expensive |
I agree between these two the second option seems better. |
Thanks! I am going with the second option then. |
At the end of the day @not-napoleon found a good place to make a single call per parsing while having values source type in hand. |
Counts usage of the aggs and exposes them on the _nodes/usage/. Closes elastic#53746
* Expose agg usage in Feature Usage API Counts usage of the aggs and exposes them on the _nodes/usage/. Closes #53746 * Refactor to include non value sources aggregations * Fix reported values source type for parent and children aggs * Refactor SearchModule constructor * Fix subtype in TTest and IPRanges * Fix more subtypes in aggs that don't register themselves * Fix doc tests * Fix docs * Fix ScriptedMetricAggregatorTests * Fix compilation issues after merge * Fix merge fallout * This gets stale quickly... * Address review comments * Fix tests that were missing proper agg registration in the search module * Fix ScriptedMetricAggregatorTests * Address review comments Co-authored-by: Elastic Machine <[email protected]>
Counts usage of the aggs and exposes them on the _nodes/usage/. Closes elastic#53746
After the ValuesSource refactor lands, all aggregation usage will flow through the new registry. This gives us an opportunity to easily count usage of the aggs and expose on the Nodes feature usage API.
The API is helpful for single-purpose endpoints, but endpoints like Search have a huge number of disparate actions which are all lumped together. Searches, aggregations, highlighting, suggestions, scrolling, composite, etc etc all show up under the Search endpoint.
There are many times an administrator would like to see more granular data about what's flowing through their Search endpoint, without enabling slow logs and picking through the firehose. Since queries and aggregations are among the more expensive operations, we should provide more granular feedback on these activities. With a relatively small change to the VS registry we can record how often agg builders are parsed and give an administrator a high-level overview of usage.
It would also make opt-in telemetry simpler and less invasive to collect for XPack features.
The text was updated successfully, but these errors were encountered: