-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Lens] Replace scripted metric with scripted terms aggregation #70459
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
I'd currently hold of on optimizations about that, since given #61663 (comment) it might mean that we in the future anyway need to change the way we collect that telemetry data and can only do it Kibana side in memory. |
@timroes I don't see why we would hold off on this optimization: it feels like exactly the kind of small tech debt item that we should do during a fix it week, and it seems to have no impact on the larger discussion that you're having. |
Removing this use of the scripted metric in Kibana would assist the Elasticsearch team in some of their cleanup efforts, they've identified that this is one of the few places in the stack that uses this aggregation. |
In the Lens telemetry we are using a slow-running scripted metric query: https:/elastic/kibana/blob/master/x-pack/plugins/lens/server/usage/visualization_counts.ts#L10
This query can be replaced by a terms aggregation with script, where the script is used to calculate just the term. I believe the entire script we want is:
The text was updated successfully, but these errors were encountered: