-
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
[TSVB] Add support for histogram type #68837
[TSVB] Add support for histogram type #68837
Conversation
Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui) |
…svb-support-for-histograms
…svb-support-for-histograms
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@@ -0,0 +1,84 @@ | |||
/* |
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.
nit: we already started migration js -> ts
. If possible please refactor tests in ts
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.
@alexwizp are all of the imported files already migrated to TS? Maybe we can hold off here for now if not?
Code looks good, tested on the following test snippet
Visualizations in TSVB and Area visualization looks similar |
@@ -36,7 +36,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; | |||
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public'; | |||
import { Percentiles, newPercentile } from './percentile_ui'; | |||
|
|||
const RESTRICT_FIELDS = [KBN_FIELD_TYPES.NUMBER]; | |||
const RESTRICT_FIELDS = [KBN_FIELD_TYPES.NUMBER, KBN_FIELD_TYPES.HISTOGRAM]; |
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 think KBN_FIELD_TYPES.HISTOGRAM
should be also added for src/plugins/vis_type_timeseries/public/application/components/aggs/filter_ratio.js
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.
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.
You should change Metric Aggregation
ftom Count
to Average
for example
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.
Oops... I forgot about that feature. Adding it now.
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.
@jasonrhodes should be fixed before merge
…svb-support-for-histograms
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@alexwizp we're looking to get this in for 7.9 -- are you the right person to ping for a review? |
hey @jasonrhodes, I'll put this in the team channel and also ping @timroes and @stratoula |
@elasticmachine merge upstream |
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 approved it but then I saw that there is a bug. @alexwizp has also mentioned this. We should also add restriction to filter ratio. Moreover let's move the test constants to a test_utils folder 🍪
Now, I see that when we choose the filter ratio aggregation, whatever agg we select on the metric aggregation dropdown, the field dropdown has the histogram type fields. For example: I think that |
@stratoula Yes, the only supported aggregations are: https://www.elastic.co/guide/en/elasticsearch/reference/master/histogram.html#histogram-uses. We should not allow the user to create an aggregation that will then fail in ES. |
Thanx @timroes :) @simianhacker can you also take care of this? We are getting really close 🎉 |
…svb-support-for-histograms
@stratoula Everything should be done. I also took care of #70984 since it's pretty much the same solution as what we need to limit the aggregations for the histogram fields. I contemplated changing the property name for |
@simianhacker great! Thanx for solving the bug of the filter_ratio aggs. Add the What do you think? |
@elasticmachine merge upstream |
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.
Perfect!! 🎉 LGTM, thanks a lot @simianhacker!
@elasticmachine merge upstream |
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! Tested locally
@elasticmachine merge upstream |
* [TSVB] Add support for histogram type * Merge branch 'master' of github.com:elastic/kibana into issue-52426-tsvb-support-for-histograms * Adding support to filter ratio; updating test * Limist aggs for filter_ratio and histogram fields; add test for AggSelect; Fixes elastic#70984 * Ensure only compatible fields are displayed for filter ratio metric aggs Co-authored-by: Elastic Machine <[email protected]>
* [TSVB] Add support for histogram type * Merge branch 'master' of github.com:elastic/kibana into issue-52426-tsvb-support-for-histograms * Adding support to filter ratio; updating test * Limist aggs for filter_ratio and histogram fields; add test for AggSelect; Fixes #70984 * Ensure only compatible fields are displayed for filter ratio metric aggs Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
💔 Build Failed
Failed CI Steps
Test FailuresKibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/management/_create_index_pattern_wizard·js.management "Create Index Pattern" wizard data streams can be an index patternStandard Out
Stack Trace
Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/management/_create_index_pattern_wizard·js.management "Create Index Pattern" wizard data streams can be an index patternStandard Out
Stack Trace
Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/dashboard/dashboard_filter_bar·js.dashboard app using current data dashboard filter bar filter editor field list shows index pattern of vis when one is addedStandard Out
Stack Trace
Build metrics
History
To update your PR or re-run it, just comment with: |
Summary
This PR adds support for histogram types to the following TSVB aggregations:
Testing Data
See #52426 for details
Fixes #70984
Checklist