-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[AggConfigs] Add TopMetrics agg #125936
[AggConfigs] Add TopMetrics agg #125936
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't update any viz editor related configs. Should we exclude top_metrics
from all the configs or somehow adjust them properly so vis editors properly supported this new metric?
@@ -43,6 +43,7 @@ export class FieldParamType extends BaseParamType { | |||
|
|||
this.filterFieldTypes = config.filterFieldTypes || '*'; | |||
this.onlyAggregatable = config.onlyAggregatable !== false; | |||
this.scriptable = config.scriptable !== false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange... we had this in types and a default scripted = true
, but it was never set from config.scriptable
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, there is just one thing that might be relevant, added a comment about it.
test/interpreter_functional/test_suites/run_pipeline/esaggs_topmetrics.ts
Show resolved
Hide resolved
Pinging @elastic/kibana-app-services (Team:AppServicesSv) |
@Dosant Can you please add screenshots so we can review the UI copy? |
@elasticmachine merge upstream |
@gchaps, this adds a new aggregation to a service layer that later will be used internally in Lens.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docslinks service looks good. A few comments on copy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise this LGTM.
FYI @ghudgins - this is adding "top metrics" as an option to agg based visualizations:
In general I like the feature it could be slightly confusing though because it's relatively similar to top hits. What do you think?
I think it's okay...the agg based visualizations always seem to map to the API directly so this to me doesn't really change the experience too negatively (despite raising a "when to use" question that probably exists already) |
@elasticmachine merge upstream |
expected head sha didn’t match current head ref. |
36ac87e
to
81bc3ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Adds top_metrics agg to AggConfigs
close #124535
Needed for Lens - #102956
Questions
Q: Keep it enabled in visualize or hide it?
Since
top_metrics
could also be useful in visualize, I decided to keep it ON. But we can also turn it off similar to how we did to other recently implemented aggs like multi terms, rare terms, etc. Here are some issues I noticed with it:pipeline aggregations may not refer to non-numeric metrics collected by top_metrics
A: Keeping it enabled in visualize
Release notes
Add top metrics aggregation to AggConfigs, Expressions and Visualize