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] APM Latency Correlations #99905

Merged
merged 98 commits into from
Jun 29, 2021
Merged

Conversation

walterra
Copy link
Contributor

@walterra walterra commented May 12, 2021

Summary

This PR replaces the previous latency tab with a new Latency correlations tab with the main goal to help profiling a set of transactions, and to understand which transaction field values are mainly responsible for slow transactions. A different type of statistical analysis is used for this workflow:
Screen Shot 2021-06-28 at 15 26 30

Screen.Recording.2021-06-28.at.16.27.50.mov
  • Switch the visualization/latency chart in the correlations tab to use log-log axis
  • Leverage the new pipeline aggregations that calculate the correlation values and Kolmogorov–Smirnov test to find fields with relevant/significant correlation
  • Overlay the overall latency distribution as well as the individual latency distribution
  • Add pagination to the Correlations table
  • Remove duplicates (where different fields may refer to the same thing and therefore yield the same significant/correlation)
  • Apply transaction name filters when drilling down from Transactions page (currently support time range, environment, transaction type)
  • List names of detected duplicates (where correlation values & KS test p values & distributions are the same)
  • Exclude irrelevant fields and include high priority fields in the list of field candidates

Related issues:

Checklist

Delete any items that are not applicable to this PR.

@walterra walterra self-assigned this May 12, 2021
@walterra walterra force-pushed the ml-apm-correlations branch from 81730ec to d0028dd Compare May 26, 2021 12:42
@walterra walterra force-pushed the ml-apm-correlations branch from aab841e to 220bca7 Compare June 1, 2021 10:39
@qn895 qn895 changed the title [ML] APM Latency Correlations (Part 1) [ML] APM Latency Correlations Jun 28, 2021
@qn895
Copy link
Member

qn895 commented Jun 28, 2021

@elasticmachine merge upstream

@qn895
Copy link
Member

qn895 commented Jun 29, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1557 1559 +2

Async chunks

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

id before after diff
apm 4.3MB 4.3MB +12.3KB

History

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

cc @walterra @qn895

@qn895 qn895 added the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 29, 2021
@qn895 qn895 merged commit 7405b93 into elastic:master Jun 29, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 29, 2021
* [ML] Async Search Service.

* [ML] Log Log Area Charts Grid. Scatterplot with streaming data.

* [ML] Remove scatterplot streaming demo.

* [ML] Improved histogram bins for log scale.

* [ML] Move client side code from Ml to APM plugin.

* [ML] Adds correlation table.

* [ML] Layout tweaks.

* [ML] Move server side code from ML to APM.

* [ML] Remove console.logs.

* [ML] Fix types.

* [ML] Chart area line type fix. Slowness %.

* [ML] Comment unused vars.

* Fix missing pluginsStart data in context

* Add KS test value and rename table columns

* Update percentiles to be correct

* Make columns optional

* Update fractionals/expectations to match with backend logic

* Update so progress is 100% when all is completed

* Make pre-processing steps smaller part of overall progress(to show charts earlier)

* Add no correlations found message

* Fix progress logic

* Fix incorrect threshold, types

* Add back APM filtering functionality to match with other table

* Improve histogram equality check with random sampling

* Show overall latency distribution right away

* Rename demo tab to latencyCorrelationsTab

* Update percentiles query to use hdr

* [ML] Fix issue where apm-* might have multiple indices with different mappings where keyword is not the only type

- Fix to check for keyword mapping more thoroughly
- Add try catch if one of the es search fail, don't quit the entire fetch

* Remove commented code

* Remove kstest column, round correlation to 2 sigfig dec

* Remove old latency tab, replace with ml latency correlations tab as first/default one

* Set axis to start at 0 because agg may results in weird

* Remove commented code for grouping duplicates

* Update msg to mean significant correlations

* Add i18n

* Change correlations flyout back to medium size

* Add name of service or transaction for clarity

* Share i18n

* Consolidate roundToDecimalPlace usage

* Remove redundant isDuplicate

* Create MAX_CORRELATIONS_TO_SHOW

* Update mlCorrelationcolumns

* Fix i18n quotations

* Update query to include filter

* Revert "Update query to include filter"

This reverts commit 9a37eec

* Rename MlCorrelations to MlLatencyCorrelations for clarity

* Add pagination

* Update include/exclude logic for field candidates and add ip field support

* Add transactionName filter suport

* Reorganize math utils

* Group duplicates together

* Fix typescript, better hasPrefixToInclude support check,

* Remove Finished toast

* Add title to y axis

* Reduce number of tick labels to show

* Highlight table row that is being used for graph

* Add from to follow MDN guideline

* Add APM style prefix

* Fix i18n

* [ML] Fix logic for tick format to only show power of 10

* Replace roundToDecimalPlace with asPreciseDecimal

* Switch to lodash range

* Clean up get_query_with_params

* Prioritize candidates using field_terms

* Update percentiles result type to be array instead of objects

* Use observability's rangeQuery instead

* Change arg format of query

* Revert candidate_terms logic

* Consolidate fractions, expectations, and ranges calc

* Add tooltip for Correlation

* Change terms size to 20

* Move env/service/transaction sticky header to top level, remove link

* Add support for http.response.status_code

* Replace histogram circular markers with bars

* Delete unused roundToDecimalPlace

* Add fractions calculation

* Make notes of fractions and fix bucket correlation

* Remove any, commented code, consolidate cancelFetch

* Use es6 max

* Align tooltip at the top

* Get rid of getCoreServices, param docs, rename type, remove rangeQuery

* Adjust range

* Show all values without grouping duplicates

* Fix pagination

* Make flyout larger

Co-authored-by: Quynh Nguyen <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 29, 2021
* [ML] Async Search Service.

* [ML] Log Log Area Charts Grid. Scatterplot with streaming data.

* [ML] Remove scatterplot streaming demo.

* [ML] Improved histogram bins for log scale.

* [ML] Move client side code from Ml to APM plugin.

* [ML] Adds correlation table.

* [ML] Layout tweaks.

* [ML] Move server side code from ML to APM.

* [ML] Remove console.logs.

* [ML] Fix types.

* [ML] Chart area line type fix. Slowness %.

* [ML] Comment unused vars.

* Fix missing pluginsStart data in context

* Add KS test value and rename table columns

* Update percentiles to be correct

* Make columns optional

* Update fractionals/expectations to match with backend logic

* Update so progress is 100% when all is completed

* Make pre-processing steps smaller part of overall progress(to show charts earlier)

* Add no correlations found message

* Fix progress logic

* Fix incorrect threshold, types

* Add back APM filtering functionality to match with other table

* Improve histogram equality check with random sampling

* Show overall latency distribution right away

* Rename demo tab to latencyCorrelationsTab

* Update percentiles query to use hdr

* [ML] Fix issue where apm-* might have multiple indices with different mappings where keyword is not the only type

- Fix to check for keyword mapping more thoroughly
- Add try catch if one of the es search fail, don't quit the entire fetch

* Remove commented code

* Remove kstest column, round correlation to 2 sigfig dec

* Remove old latency tab, replace with ml latency correlations tab as first/default one

* Set axis to start at 0 because agg may results in weird

* Remove commented code for grouping duplicates

* Update msg to mean significant correlations

* Add i18n

* Change correlations flyout back to medium size

* Add name of service or transaction for clarity

* Share i18n

* Consolidate roundToDecimalPlace usage

* Remove redundant isDuplicate

* Create MAX_CORRELATIONS_TO_SHOW

* Update mlCorrelationcolumns

* Fix i18n quotations

* Update query to include filter

* Revert "Update query to include filter"

This reverts commit 9a37eec

* Rename MlCorrelations to MlLatencyCorrelations for clarity

* Add pagination

* Update include/exclude logic for field candidates and add ip field support

* Add transactionName filter suport

* Reorganize math utils

* Group duplicates together

* Fix typescript, better hasPrefixToInclude support check,

* Remove Finished toast

* Add title to y axis

* Reduce number of tick labels to show

* Highlight table row that is being used for graph

* Add from to follow MDN guideline

* Add APM style prefix

* Fix i18n

* [ML] Fix logic for tick format to only show power of 10

* Replace roundToDecimalPlace with asPreciseDecimal

* Switch to lodash range

* Clean up get_query_with_params

* Prioritize candidates using field_terms

* Update percentiles result type to be array instead of objects

* Use observability's rangeQuery instead

* Change arg format of query

* Revert candidate_terms logic

* Consolidate fractions, expectations, and ranges calc

* Add tooltip for Correlation

* Change terms size to 20

* Move env/service/transaction sticky header to top level, remove link

* Add support for http.response.status_code

* Replace histogram circular markers with bars

* Delete unused roundToDecimalPlace

* Add fractions calculation

* Make notes of fractions and fix bucket correlation

* Remove any, commented code, consolidate cancelFetch

* Use es6 max

* Align tooltip at the top

* Get rid of getCoreServices, param docs, rename type, remove rangeQuery

* Adjust range

* Show all values without grouping duplicates

* Fix pagination

* Make flyout larger

Co-authored-by: Quynh Nguyen <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Walter Rafelsberger <[email protected]>
Co-authored-by: Quynh Nguyen <[email protected]>
@walterra walterra deleted the ml-apm-correlations branch July 5, 2021 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:correlations apm:test-plan-7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed :ml release_note:feature Makes this part of the condensed release notes Team:APM All issues that need APM UI Team support v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants