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] Fix UI inconsistencies in APM Failed transaction correlations #109187

Merged
merged 24 commits into from
Aug 23, 2021

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Aug 18, 2021

Summary

This PR addresses the issues from #109061 / #109093 / #106381

Screen Shot 2021-08-18 at 18 39 47

Screen Shot 2021-08-18 at 18 39 50

  • Show the same empty state in the correlations table

Screen Shot 2021-08-18 at 20 57 44

  • Add "Correlations" title above the table
  • Add EuiSpacer between the sections before and after progress
  • Update the copy within the beta badge
    title=Failed transaction correlations description=Failed transaction correlations is not GA...
  • Remove s size from the beta badge
  • Move the help popover to the top of the panel (similar to the Latency correlations tab)
  • Move the Cancel/Refresh option to the right of the progress bar (similar to the Latency correlations tab)
  • When the correlation job is running the correlations tab should show a loading state similar to the latency correlations table
  • Indicate in the table headers Score is sorted by default
  • Add sortability to both Latency and failed transactions correlations table
  • Refactor to prevent duplicate code/components like Log, progress bar
  • Fix alignments of the tab content header (previously navigating from one Trace samples tab to Latency correlation tabs will cause a minor jump in the header, or the titles within the same tab were not the same size )
  • Remove the event.outcome as a field candidate (because event.outcome: failure would always be significant in this case)
  • Shrink the column width for impact (previously it was at 116px)
  • Added badge for High, medium, low [APM] Correlations: Show impact levels (high, medium, low) as colored badges indicating their severity #109093

Screen Shot 2021-08-19 at 11 53 11

  • Fix license prompt text

Screen Shot 2021-08-19 at 16 16 06

- [x] Functional tests for the new tab - [x] Make the p value & error rate columns visible only when esInspect mode is enabled

Checklist

Delete any items that are not applicable to this PR.

@qn895 qn895 requested review from walterra and formgeist August 19, 2021 02:47
@qn895 qn895 self-assigned this Aug 19, 2021
@qn895 qn895 added :ml apm:correlations release_note:skip Skip the PR/issue when compiling release notes v7.15.0 v8.0.0 labels Aug 19, 2021
@qn895 qn895 changed the title [ML] Fix UI in APM Failed transaction correlations [ML] Fix UI inconsistencies in APM Failed transaction correlations Aug 19, 2021
@qn895 qn895 added the v7.16.0 label Aug 19, 2021
@qn895 qn895 force-pushed the ml-fix-apm-transactions-ux branch from a145372 to 420e183 Compare August 19, 2021 03:15
Copy link
Contributor

@formgeist formgeist left a comment

Choose a reason for hiding this comment

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

Overall everything looks great! 👏 Just a few copy additions/changes suggested.

title={i18n.translate(
'xpack.apm.correlations.failedTransactions.helpPopover.title',
{
defaultMessage: 'Failed transactions correlations',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
defaultMessage: 'Failed transactions correlations',
defaultMessage: 'Failed transaction correlations',

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated here 6f9ffa1

>
<p>
<FormattedMessage
id="xpack.apm.correlations.failurePopoverBasicExplanation"
id="xpack.apm.correlations.failedTransactions.helpPopover.basicExplanation"
defaultMessage="Correlations help you discover which attributes are contributing to failed transactions."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
defaultMessage="Correlations help you discover which attributes are contributing to failed transactions."
defaultMessage="Correlations help you discover which attributes are contributing to failed transactions. Transactions are considered a failure when it returns a status code >= 5xx."

Just added the description of failed transactions because I figured it might be helpful in this context.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated here 6f9ffa1

@walterra
Copy link
Contributor

I noticed when trying to sort the Impact-column low/medium/high gets sorted alphabetically. Is there a way we can sort it by the underlying impact threshold?

For example, here I'd expect it to sort by descending impact (high/medium/low) instead of descending alphabetically:

image

@@ -132,7 +132,7 @@ export function TransactionDistribution({

return (
<div data-test-subj="apmTransactionDistributionTabContent">
<EuiFlexGroup>
<EuiFlexGroup style={{ minHeight: 56 }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why this is necessary? Could we use an EUI px var instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a comment for it here. The small size selection text is causing the width of that title box to be smaller than the other two (which have the help button), so when you navigate between the tabs there's a bit of a "flickering" or shifting of the title/header spacer.

@@ -0,0 +1,38 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Suggest to name this file correlations_log.tsx for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed here 6f9ffa1

@qn895
Copy link
Member Author

qn895 commented Aug 19, 2021

I noticed when trying to sort the Impact-column low/medium/high gets sorted alphabetically. Is there a way we can sort it by the underlying impact threshold?

Thanks for caching that. Updated here 84a0514

Latest changes also include:

Screen Shot 2021-08-19 at 11 53 11

- Fix issue with filtering not handling space or other special characters correctly in both Latency & failed transaction correlations

@qn895 qn895 force-pushed the ml-fix-apm-transactions-ux branch from 860880d to 8300462 Compare August 19, 2021 19:39
};
};

registry.when('quynh on trial license without data', { config: 'trial', archives: [] }, () => {
Copy link
Member

Choose a reason for hiding this comment

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

Just testing stuff out with your own name I assume :D

Suggested change
registry.when('quynh on trial license without data', { config: 'trial', archives: [] }, () => {
registry.when('on trial license without data', { config: 'trial', archives: [] }, () => {

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in 909e203 😅

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

Latest changes LGTM

@walterra walterra added the auto-backport Deprecated - use backport:version if exact versions are needed label Aug 23, 2021
@walterra walterra enabled auto-merge (squash) August 23, 2021 09:23
Comment on lines +77 to +82
const response = await supertest
.post(`/internal/bsearch`)
.set('kbn-xsrf', 'foo')
.send(reqBody);

followUpResponse = parseBfetchResponse(response)[0];
Copy link
Member

@sorenlouv sorenlouv Aug 23, 2021

Choose a reason for hiding this comment

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

It looks like you always want to parse the responses made to the /bsearch endpoint. In that case, what about creating a bfetchClient which takes the request body and returns the (parsed) response?

Suggested change
const response = await supertest
.post(`/internal/bsearch`)
.set('kbn-xsrf', 'foo')
.send(reqBody);
followUpResponse = parseBfetchResponse(response)[0];
const {status, response} = await bfetchClient(supertest, reqBody);

You could also make bFetchClient a service similar to supertestAsApmWriteUser and then you can call it without specifying supertest:

Suggested change
const response = await supertest
.post(`/internal/bsearch`)
.set('kbn-xsrf', 'foo')
.send(reqBody);
followUpResponse = parseBfetchResponse(response)[0];
const bfetchClient = context.getService('bfetchClient');
const {status, response} = await bfetchClient(reqBody);

Copy link
Contributor

Choose a reason for hiding this comment

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

Moved this to an item on the 7.16 meta issue: #109220

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1611 1615 +4

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.4MB 4.4MB +2.7KB

History

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

cc @qn895

@walterra walterra merged commit 63ef9d1 into elastic:master Aug 23, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 23, 2021
…lastic#109187)

- Show the same empty state in the correlations table
- Add "Correlations" title above the table
- Add EuiSpacer between the sections before and after progress
- Update the copy within the beta badge title=Failed transaction correlations description=Failed transaction correlations is not GA...
- Remove s size from the beta badge
- Move the help popover to the top of the panel (similar to the Latency correlations tab)
- Move the Cancel/Refresh option to the right of the progress bar (similar to the Latency correlations tab)
- When the correlation job is running the correlations tab should show a loading state similar to the latency correlations table
- Indicate in the table headers Score is sorted by default
- Add sortability to both Latency and failed transactions correlations table
- Refactor to prevent duplicate code/components like Log, progress bar
- Fix alignments of the tab content header (previously navigating from one Trace samples tab to Latency correlation tabs will cause a minor jump in the header, or the titles within the same tab were not the same size )
- Remove the event.outcome as a field candidate (because event.outcome: failure would always be significant in this case)
- Shrink the column width for impact (previously it was at 116px)
- Added badge for High, medium, low [APM] Correlations: Show impact levels (high, medium, low) as colored badges indicating their severity
- Fix license prompt text
- Functional tests for the new tab
- Make the p value & error rate columns visible only when esInspect mode is enabled
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 23, 2021
…lastic#109187)

- Show the same empty state in the correlations table
- Add "Correlations" title above the table
- Add EuiSpacer between the sections before and after progress
- Update the copy within the beta badge title=Failed transaction correlations description=Failed transaction correlations is not GA...
- Remove s size from the beta badge
- Move the help popover to the top of the panel (similar to the Latency correlations tab)
- Move the Cancel/Refresh option to the right of the progress bar (similar to the Latency correlations tab)
- When the correlation job is running the correlations tab should show a loading state similar to the latency correlations table
- Indicate in the table headers Score is sorted by default
- Add sortability to both Latency and failed transactions correlations table
- Refactor to prevent duplicate code/components like Log, progress bar
- Fix alignments of the tab content header (previously navigating from one Trace samples tab to Latency correlation tabs will cause a minor jump in the header, or the titles within the same tab were not the same size )
- Remove the event.outcome as a field candidate (because event.outcome: failure would always be significant in this case)
- Shrink the column width for impact (previously it was at 116px)
- Added badge for High, medium, low [APM] Correlations: Show impact levels (high, medium, low) as colored badges indicating their severity
- Fix license prompt text
- Functional tests for the new tab
- Make the p value & error rate columns visible only when esInspect mode is enabled
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.15
7.x

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Aug 23, 2021
…109187) (#109625)

- Show the same empty state in the correlations table
- Add "Correlations" title above the table
- Add EuiSpacer between the sections before and after progress
- Update the copy within the beta badge title=Failed transaction correlations description=Failed transaction correlations is not GA...
- Remove s size from the beta badge
- Move the help popover to the top of the panel (similar to the Latency correlations tab)
- Move the Cancel/Refresh option to the right of the progress bar (similar to the Latency correlations tab)
- When the correlation job is running the correlations tab should show a loading state similar to the latency correlations table
- Indicate in the table headers Score is sorted by default
- Add sortability to both Latency and failed transactions correlations table
- Refactor to prevent duplicate code/components like Log, progress bar
- Fix alignments of the tab content header (previously navigating from one Trace samples tab to Latency correlation tabs will cause a minor jump in the header, or the titles within the same tab were not the same size )
- Remove the event.outcome as a field candidate (because event.outcome: failure would always be significant in this case)
- Shrink the column width for impact (previously it was at 116px)
- Added badge for High, medium, low [APM] Correlations: Show impact levels (high, medium, low) as colored badges indicating their severity
- Fix license prompt text
- Functional tests for the new tab
- Make the p value & error rate columns visible only when esInspect mode is enabled

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Aug 23, 2021
…109187) (#109626)

- Show the same empty state in the correlations table
- Add "Correlations" title above the table
- Add EuiSpacer between the sections before and after progress
- Update the copy within the beta badge title=Failed transaction correlations description=Failed transaction correlations is not GA...
- Remove s size from the beta badge
- Move the help popover to the top of the panel (similar to the Latency correlations tab)
- Move the Cancel/Refresh option to the right of the progress bar (similar to the Latency correlations tab)
- When the correlation job is running the correlations tab should show a loading state similar to the latency correlations table
- Indicate in the table headers Score is sorted by default
- Add sortability to both Latency and failed transactions correlations table
- Refactor to prevent duplicate code/components like Log, progress bar
- Fix alignments of the tab content header (previously navigating from one Trace samples tab to Latency correlation tabs will cause a minor jump in the header, or the titles within the same tab were not the same size )
- Remove the event.outcome as a field candidate (because event.outcome: failure would always be significant in this case)
- Shrink the column width for impact (previously it was at 116px)
- Added badge for High, medium, low [APM] Correlations: Show impact levels (high, medium, low) as colored badges indicating their severity
- Fix license prompt text
- Functional tests for the new tab
- Make the p value & error rate columns visible only when esInspect mode is enabled

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
@walterra walterra mentioned this pull request Aug 24, 2021
14 tasks
@qn895 qn895 deleted the ml-fix-apm-transactions-ux branch September 21, 2021 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:correlations apm:ml Integration between APM and ML auto-backport Deprecated - use backport:version if exact versions are needed :ml release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.15.0 v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Correlations: Show impact levels (high, medium, low) as colored badges indicating their severity
6 participants