-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RUM Dashboard] Initial Version (#68778)
Co-authored-by: Casper Hübertz <[email protected]>
- Loading branch information
Showing
58 changed files
with
1,552 additions
and
47 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
x-pack/plugins/apm/common/__snapshots__/elasticsearch_fieldnames.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
x-pack/plugins/apm/e2e/cypress/integration/rum_dashboard.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
x-pack/plugins/apm/e2e/cypress/support/step_definitions/rum_dashboard.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5561,10 +5561,10 @@ typedarray@^0.0.6: | |
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" | ||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= | ||
|
||
[email protected].2: | ||
version "3.9.2" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9" | ||
integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw== | ||
[email protected].5: | ||
version "3.9.5" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36" | ||
integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ== | ||
|
||
umd@^3.0.0: | ||
version "3.0.3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.