Skip to content
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

[ML] Enhances support for counter fields in data visualizer / field statistics #153893

Merged
merged 12 commits into from
Apr 4, 2023

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Mar 28, 2023

Summary

Follow up of #152898 and addresses #153050. This PR adds better support for time series metric counter field. It also temporarily adds a list of supported elasticsearch aggregations for each field type (until elastic/elasticsearch#93884 or equivalent is merged in).

Screen Shot 2023-03-28 at 12 51 12

Currently, it will supportcount, min, and max aggs.

It will also not show cardinality instead of showing it as 0 when not available.

It also supports new field types like gauge and counter in the field type filters.

Screen Shot 2023-03-29 at 13 34 10

Screen Shot 2023-03-29 at 13 34 20

Screen Shot 2023-03-29 at 13 34 25

Going to Lens will also use maximum operation instead of average, depending on what the field type supports.

Screen.Recording.2023-03-29.at.13.34.36.mov

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@qn895 qn895 added :ml Feature:File and Index Data Viz ML file and index data visualizer labels Mar 28, 2023
@qn895 qn895 requested a review from a team as a code owner March 28, 2023 17:55
@qn895 qn895 self-assigned this Mar 28, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@qn895 qn895 added the release_note:skip Skip the PR/issue when compiling release notes label Mar 28, 2023
@qn895 qn895 force-pushed the ml-dv-support-counter branch from 0c06b17 to 34a7f7f Compare March 28, 2023 18:17
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes here look good, but left a couple of suggestions for follow up work.

@peteharverson peteharverson added release_note:enhancement and removed release_note:skip Skip the PR/issue when compiling release notes labels Mar 31, 2023
@peteharverson peteharverson changed the title [ML] Add better support for counter fields by adding supportedAggs [ML] Add better support for counter fields in data visualizer / field statistics Mar 31, 2023
@peteharverson peteharverson changed the title [ML] Add better support for counter fields in data visualizer / field statistics [ML] Enhance support for counter fields in data visualizer / field statistics Mar 31, 2023
Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested latest changes and LGTM.

I flipped the release note label to enhancement and edited the PR title.

@qn895 qn895 requested a review from alvarezmelissa87 April 4, 2023 15:36
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dataVisualizer 319 320 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dataVisualizer 366.3KB 365.6KB -730.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataVisualizer 25.5KB 21.9KB -3.6KB
Unknown metric groups

API count

id before after diff
@kbn/ml-agg-utils 90 92 +2

ESLint disabled line counts

id before after diff
securitySolution 432 435 +3

Total ESLint disabled count

id before after diff
securitySolution 512 515 +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @qn895

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM ⚡

@qn895 qn895 added the v8.8.0 label Apr 4, 2023
@qn895 qn895 merged commit ab1ac1b into elastic:main Apr 4, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 4, 2023
@peteharverson peteharverson changed the title [ML] Enhance support for counter fields in data visualizer / field statistics [ML] Enhances support for counter fields in data visualizer / field statistics Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:File and Index Data Viz ML file and index data visualizer :ml release_note:enhancement v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants