-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[RUM Dashboard] Initial Version #68778
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
Changes from all commits
f9c20a1
1f75371
f1c9bcf
9f615df
2214001
eaf461c
95b510b
b818fbd
ac24241
3cd29fb
bae67c2
5a6c41a
a3c83cc
60ac2eb
a587d82
6496237
fd6d22a
89a93ed
c1a9ef2
e062152
d77652c
1d0afcc
f1259a7
fb0782b
638920d
b0b11e5
9dc10c5
b2b444a
6a9749e
ebf9761
e72de7b
a0176da
3c769a7
9e0b508
c7d1521
1d94b3f
483d8fd
9ffcabb
ee3616e
20c779e
1b8ef95
a0a7a44
7056e40
fc33078
9529d76
0733c7c
d3149ea
14e8851
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| import { | ||
| Setup, | ||
| SetupTimeRange, | ||
| SetupUIFilters, | ||
| // eslint-disable-next-line @kbn/eslint/no-restricted-paths | ||
| } from '../../server/lib/helpers/setup_request'; | ||
| import { PROCESSOR_EVENT, TRANSACTION_TYPE } from '../elasticsearch_fieldnames'; | ||
| import { rangeFilter } from '../utils/range_filter'; | ||
|
|
||
| export function getRumOverviewProjection({ | ||
| setup, | ||
| }: { | ||
| setup: Setup & SetupTimeRange & SetupUIFilters; | ||
| }) { | ||
| const { start, end, uiFiltersES, indices } = setup; | ||
|
|
||
| const bool = { | ||
| filter: [ | ||
| { range: rangeFilter(start, end) }, | ||
| { term: { [PROCESSOR_EVENT]: 'transaction' } }, | ||
| { term: { [TRANSACTION_TYPE]: 'page-load' } }, | ||
| { | ||
| // Adding this filter to cater for some inconsistent rum data | ||
| exists: { | ||
| field: 'transaction.marks.navigationTiming.fetchStart', | ||
| }, | ||
| }, | ||
| ...uiFiltersES, | ||
| ], | ||
| }; | ||
|
|
||
| return { | ||
| index: indices['apm_oss.transactionIndices'], | ||
| body: { | ||
| query: { | ||
| bool, | ||
| }, | ||
| }, | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Feature: RUM Dashboard | ||
|
|
||
| Scenario: Client metrics | ||
| Given a user browses the APM UI application for RUM Data | ||
| When the user inspects the real user monitoring tab | ||
| Then should redirect to rum dashboard | ||
| And should have correct client metrics |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,17 @@ | ||
| module.exports = { | ||
| APM: { | ||
| 'Transaction duration charts': { | ||
| '1': '350 ms', | ||
| '2': '175 ms', | ||
| '3': '0 ms', | ||
| }, | ||
| "__version": "4.5.0", | ||
| "APM": { | ||
| "Transaction duration charts": { | ||
| "1": "55 ms", | ||
| "2": "28 ms", | ||
| "3": "0 ms" | ||
| } | ||
| }, | ||
| __version: '4.5.0', | ||
| }; | ||
| "RUM Dashboard": { | ||
| "Client metrics": { | ||
| "1": "62", | ||
| "2": "0.07 sec", | ||
| "3": "0.01 sec" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License; | ||
| * you may not use this file except in compliance with the Elastic License. | ||
| */ | ||
|
|
||
| import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps'; | ||
| import { loginAndWaitForPage } from '../../integration/helpers'; | ||
|
|
||
| /** The default time in ms to wait for a Cypress command to complete */ | ||
| export const DEFAULT_TIMEOUT = 60 * 1000; | ||
|
|
||
| Given(`a user browses the APM UI application for RUM Data`, () => { | ||
| // open service overview page | ||
| const RANGE_FROM = 'now-24h'; | ||
| const RANGE_TO = 'now'; | ||
| loginAndWaitForPage(`/app/apm#/services`, { from: RANGE_FROM, to: RANGE_TO }); | ||
| }); | ||
|
|
||
| When(`the user inspects the real user monitoring tab`, () => { | ||
| // click rum tab | ||
| cy.get(':contains(Real User Monitoring)', { timeout: DEFAULT_TIMEOUT }) | ||
| .last() | ||
| .click({ force: true }); | ||
| }); | ||
|
|
||
| Then(`should redirect to rum dashboard`, () => { | ||
| cy.url().should('contain', `/app/apm#/rum-overview`); | ||
| }); | ||
|
|
||
| Then(`should have correct client metrics`, () => { | ||
| const clientMetrics = '[data-cy=client-metrics] .euiStat__title'; | ||
|
|
||
| // wait for all loading to finish | ||
| cy.get('kbnLoadingIndicator').should('not.be.visible'); | ||
| cy.get('.euiStat__title-isLoading').should('not.be.visible'); | ||
|
|
||
| cy.get(clientMetrics).eq(2).invoke('text').snapshot(); | ||
|
|
||
| cy.get(clientMetrics).eq(1).invoke('text').snapshot(); | ||
|
|
||
| cy.get(clientMetrics).eq(0).invoke('text').snapshot(); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,9 @@ import { SetupInstructionsLink } from '../../shared/Links/SetupInstructionsLink' | |
| import { ServiceMap } from '../ServiceMap'; | ||
| import { ServiceOverview } from '../ServiceOverview'; | ||
| import { TraceOverview } from '../TraceOverview'; | ||
| import { RumOverview } from '../RumDashboard'; | ||
| import { RumOverviewLink } from '../../shared/Links/apm/RumOverviewLink'; | ||
| import { EndUserExperienceLabel } from '../RumDashboard/translations'; | ||
|
|
||
| function getHomeTabs({ | ||
| serviceMapEnabled = true, | ||
|
|
@@ -70,14 +73,27 @@ function getHomeTabs({ | |
| }); | ||
| } | ||
|
|
||
| homeTabs.push({ | ||
| link: ( | ||
| <RumOverviewLink> | ||
| {i18n.translate('xpack.apm.home.rumTabLabel', { | ||
| defaultMessage: 'Real User Monitoring', | ||
| })} | ||
| </RumOverviewLink> | ||
| ), | ||
| render: () => <RumOverview />, | ||
| name: 'rum-overview', | ||
| }); | ||
|
|
||
| return homeTabs; | ||
| } | ||
|
|
||
| const SETTINGS_LINK_LABEL = i18n.translate('xpack.apm.settingsLinkLabel', { | ||
| defaultMessage: 'Settings', | ||
| }); | ||
|
|
||
| interface Props { | ||
| tab: 'traces' | 'services' | 'service-map'; | ||
| tab: 'traces' | 'services' | 'service-map' | 'rum-overview'; | ||
| } | ||
|
|
||
| export function Home({ tab }: Props) { | ||
|
|
@@ -93,7 +109,11 @@ export function Home({ tab }: Props) { | |
| <EuiFlexGroup alignItems="center"> | ||
| <EuiFlexItem grow={false}> | ||
| <EuiTitle size="l"> | ||
| <h1>APM</h1> | ||
| <h1> | ||
| {selectedTab.name === 'rum-overview' | ||
| ? EndUserExperienceLabel | ||
| : 'APM'} | ||
| </h1> | ||
|
Comment on lines
+112
to
+116
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shahzad31 @drewpost As mentioned in my design improvements PR, I think this is not the way to go about it. The Real User Monitoring view is still within APM (see breadcrumb), and we keep that title for all those views (Services, Traces, and Service maps). I find replacing the main title confusing. |
||
| </EuiTitle> | ||
| </EuiFlexItem> | ||
| <EuiFlexItem grow={false}> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.