From a395952b88e8b57a03d7f41b8f82abbca6c2a344 Mon Sep 17 00:00:00 2001 From: Kerry Gallagher Date: Wed, 28 Oct 2020 14:08:10 +0000 Subject: [PATCH] [User experience] Fix JS error rate (#81512) (#81888) * Query adjustments for getClientMetrics * Remove error rate from JS errors section --- .../support/step_definitions/csm/js_errors.ts | 7 +- .../ImpactfulMetrics/JSErrors.tsx | 20 ------ .../__snapshots__/queries.test.ts.snap | 64 ++++++++----------- .../lib/rum_client/get_client_metrics.ts | 48 +++++++------- .../lib/rum_client/get_page_view_trends.ts | 1 + .../projections/rum_page_load_transactions.ts | 21 +++--- .../translations/translations/ja-JP.json | 1 - .../translations/translations/zh-CN.json | 1 - 8 files changed, 68 insertions(+), 95 deletions(-) diff --git a/x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm/js_errors.ts b/x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm/js_errors.ts index 0dbefb73e68c44..9e10e2fd599149 100644 --- a/x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm/js_errors.ts +++ b/x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm/js_errors.ts @@ -12,12 +12,7 @@ Then(`it displays list of relevant js errors`, () => { cy.get('.euiBasicTable-loading').should('not.be.visible'); cy.get('.euiStat__title-isLoading').should('not.be.visible'); - getDataTestSubj('uxJsErrorsTotal').should('have.text', 'Total errors110'); - - getDataTestSubj('uxJsErrorRate').should( - 'have.text', - 'Error rate100 %Error rate 100 %' - ); + getDataTestSubj('uxJsErrorsTotal').should('have.text', 'Total errors112'); getDataTestSubj('uxJsErrorTable').within(() => { cy.get('tr.euiTableRow', DEFAULT_TIMEOUT) diff --git a/x-pack/plugins/apm/public/components/app/RumDashboard/ImpactfulMetrics/JSErrors.tsx b/x-pack/plugins/apm/public/components/app/RumDashboard/ImpactfulMetrics/JSErrors.tsx index 7a7c0518175551..58f00604b8fda1 100644 --- a/x-pack/plugins/apm/public/components/app/RumDashboard/ImpactfulMetrics/JSErrors.tsx +++ b/x-pack/plugins/apm/public/components/app/RumDashboard/ImpactfulMetrics/JSErrors.tsx @@ -15,7 +15,6 @@ import { EuiToolTip, } from '@elastic/eui'; import numeral from '@elastic/numeral'; -import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; import { useUrlParams } from '../../../../hooks/useUrlParams'; import { useFetcher } from '../../../../hooks/useFetcher'; @@ -102,11 +101,6 @@ export function JSErrors() { }); }; - const errorRate = - totalPageViews > 0 - ? ((data?.totalErrorPages ?? 0) / totalPageViews) * 100 - : 0; - const totalErrors = data?.totalErrors ?? 0; return ( @@ -133,20 +127,6 @@ export function JSErrors() { isLoading={status !== 'success'} /> - - - {' '}