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 custom index name settings, functional tests for APM Latency Correlation. #105200

Merged
merged 16 commits into from
Jul 19, 2021

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Jul 12, 2021

Summary

Follow up to #99905.

Adds first functional tests for APM Latency Correlations code.

  • Fix: The log log chart's Y axis would only start at 1 by default which hides results for small datasets like the ones used in these tests. Starting the axis at 0 isn't supported to log based ones so we're setting it to just a small value above 0.
  • Fix: Instead of the hard coded apm-* index we passed on from the client, we now correctly consider APM's custom settings.

Discuss/Questions:

  • I copied the overall test setup from the spaces tests where the full UI is available. Not sure if there would be a simpler way maybe using a superuser? Do you think it's ok like that?
  • Debug Log Helper: If you enable observability:enableInspectEsQueries in advanced settings, this will output the async service's log we pass on to the client in the flyout.
  • Is 'apm_oss.transactionIndices' the correct index to query, do we need to consider others?
  • I added code in plugin.ts to pass on includeFrozen, we're not making use of it yet though, is this something we want to fix for 7.14 too?

@walterra walterra added bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support :ml v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.14.0 apm:correlations v7.15.0 labels Jul 12, 2021
@walterra walterra self-assigned this Jul 12, 2021
@walterra walterra mentioned this pull request Jul 13, 2021
15 tasks
@walterra walterra force-pushed the ml-apm-correlations-functional-tests branch from 733a971 to a39dcf8 Compare July 14, 2021 08:37
@walterra walterra changed the title [ML] Functional tests for APM latency correlation. [ML] Fix custom index name settings, functional tests for APM latency correlation. Jul 14, 2021
@walterra walterra changed the title [ML] Fix custom index name settings, functional tests for APM latency correlation. [ML] Fix custom index name settings, functional tests for APM Latency Correlation. Jul 14, 2021
@walterra walterra marked this pull request as ready for review July 14, 2021 11:02
@walterra walterra requested a review from a team as a code owner July 14, 2021 11:02
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@walterra walterra requested review from qn895 and pheyos July 14, 2021 11:02
@walterra
Copy link
Contributor Author

The dataset ml_8.0.0 used for API integration tests (#104644 ) unfortunately didn't work on branches 7.x/7.14. I switched the dataset to 8.0.0 and adjusted the assertions in those backports. dada021 is a cherry-pick of that change to bring it forward to master again as part of this PR.

Copy link
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

Functional tests LGTM, just one small nit.

params: SearchServiceParams
getApmIndices: () => Promise<ApmIndicesConfig>,
searchServiceParams: SearchServiceParams,
includeFrozen: boolean
Copy link
Member

Choose a reason for hiding this comment

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

Is includeFrozen being used here?

Copy link
Member

Choose a reason for hiding this comment

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

Just re-read the post description and my question is redundant here :) Sorry the noise

) : null}
</div>
{log.length > 0 && displayLog && (
<EuiAccordion id="accordion1" buttonContent="Log">
Copy link
Member

Choose a reason for hiding this comment

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

Does Log here needs internationalization?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed translation in 7592578.

@qn895
Copy link
Member

qn895 commented Jul 15, 2021

Tested the debug mode and I really like it 🎉 . Definitely much more transparent. My only suggestion for a future follow up is to potentially log out the actual cause/error message as well instead of just Failed to fetch ...

On a super duper nit note, noticed the background color of the EuiPanel and the EuiCode are not the same, although I'm not sure if that's something worth adjusting.

@walterra
Copy link
Contributor Author

Added a fix to display a warning when we get errors in a cross-cluster environment in ecfd6e4.

image

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 log helper is nice! Just needs an edit on the CCS callout title, but otherwise LGTM

'xpack.apm.correlations.latencyCorrelations.ccsWarningCalloutBody',
{
defaultMessage:
'Data for the correlation analysis could not be fully retrieved. This feature is only supported for versions 7.14 and above.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor suggestion to use "later" instead of "above".

Suggested change
'Data for the correlation analysis could not be fully retrieved. This feature is only supported for versions 7.14 and above.',
'Data for the correlation analysis could not be fully retrieved. This feature is supported only for 7.14 and later versions.',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 42a7cbd.

Copy link
Contributor

@smith smith left a comment

Choose a reason for hiding this comment

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

I had a couple suggestions but this looks good.

We should plan to move these FTR E2E tests to our Cypress setup.

@@ -72,7 +75,11 @@ export function MlLatencyCorrelations({ onClose }: Props) {
},
} = useUrlParams();

const location = useLocation();
const displayLog = location.search.includes('debug=true');
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of adding this, we should use the existing observability:enableInspectEsQueries UI setting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion, fixed in 1a63809.

@@ -94,10 +96,19 @@ const clientSearchMock = (
};
};

const getApmIndicesMock = async () =>
({
// eslint-disable-next-line
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 put the name of the rule to be disabled? Something about casing. It's cool if it's disabled but better if you put the name of the rule there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 7d04ca3.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

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 +2.4KB

History

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

cc @walterra

@walterra walterra merged commit daa81c9 into elastic:master Jul 19, 2021
@walterra walterra deleted the ml-apm-correlations-functional-tests branch July 19, 2021 10:49
walterra added a commit to walterra/kibana that referenced this pull request Jul 19, 2021
… Correlation. (elastic#105200)

Adds first functional tests for APM Latency Correlations code.
- Fix: The log log chart's Y axis would only start at 1 by default which hides results for small datasets like the ones used in these tests. Starting the axis at 0 isn't supported to log based ones so we're setting it to just a small value above 0.
- Fix: Instead of the hard coded apm-* index we passed on from the client, we now correctly consider APM's custom settings.
walterra added a commit to walterra/kibana that referenced this pull request Jul 19, 2021
… Correlation. (elastic#105200)

Adds first functional tests for APM Latency Correlations code.
- Fix: The log log chart's Y axis would only start at 1 by default which hides results for small datasets like the ones used in these tests. Starting the axis at 0 isn't supported to log based ones so we're setting it to just a small value above 0.
- Fix: Instead of the hard coded apm-* index we passed on from the client, we now correctly consider APM's custom settings.
walterra added a commit that referenced this pull request Jul 19, 2021
… Correlation. (#105200) (#106077)

Adds first functional tests for APM Latency Correlations code.
- Fix: The log log chart's Y axis would only start at 1 by default which hides results for small datasets like the ones used in these tests. Starting the axis at 0 isn't supported to log based ones so we're setting it to just a small value above 0.
- Fix: Instead of the hard coded apm-* index we passed on from the client, we now correctly consider APM's custom settings.
walterra added a commit that referenced this pull request Jul 20, 2021
… Correlation. (#105200) (#106078)

Adds first functional tests for APM Latency Correlations code.
- Fix: The log log chart's Y axis would only start at 1 by default which hides results for small datasets like the ones used in these tests. Starting the axis at 0 isn't supported to log based ones so we're setting it to just a small value above 0.
- Fix: Instead of the hard coded apm-* index we passed on from the client, we now correctly consider APM's custom settings.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:correlations bug Fixes for quality problems that affect the customer experience :ml release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support v7.14.0 v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Latency correlations: Hard coded apm-* prevents application of setting overrides
8 participants