-
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
f9c20a1
added rum filters and tab
shahzad31 1f75371
update
shahzad31 f1c9bcf
move range filter into common
shahzad31 9f615df
Merge branch 'master' into rum-filters
shahzad31 2214001
fix issue in tab condition
shahzad31 eaf461c
Merge branch 'master' into rum-filters
shahzad31 95b510b
add clinet
shahzad31 b818fbd
update
shahzad31 ac24241
Merge branch 'master' into rum-filters
shahzad31 3cd29fb
added transactiont type filter
shahzad31 bae67c2
Merge branch 'rum-filters' into client-metrics
shahzad31 5a6c41a
update
shahzad31 a3c83cc
Merge branch 'master' into client-metrics
shahzad31 60ac2eb
update
shahzad31 a587d82
Merge branch 'master' into client-metrics
shahzad31 6496237
Merge branch 'master' into client-metrics
shahzad31 fd6d22a
update
shahzad31 89a93ed
update
shahzad31 c1a9ef2
added filter
shahzad31 e062152
Merge branch 'master' into client-metrics
shahzad31 d77652c
update
shahzad31 1d0afcc
update
shahzad31 f1259a7
fixed
shahzad31 fb0782b
Merge branch 'master' into client-metrics
shahzad31 638920d
added rum tests
shahzad31 b0b11e5
Merge branch 'master' into client-metrics
shahzad31 9dc10c5
update and added reset zoom button
shahzad31 b2b444a
snapshot
shahzad31 6a9749e
Merge branch 'master' into client-metrics
shahzad31 ebf9761
Merge branch 'master' into client-metrics
shahzad31 e72de7b
update
shahzad31 a0176da
improve responsiveness
shahzad31 3c769a7
update
shahzad31 9e0b508
rename impression treds
shahzad31 c7d1521
update tooltip
shahzad31 1d94b3f
update
shahzad31 483d8fd
Merge branch 'master' into client-metrics
shahzad31 9ffcabb
Merge branch 'master' into client-metrics
shahzad31 ee3616e
update test
shahzad31 20c779e
Suggested design improvements
formgeist 1b8ef95
Merge branch 'master' into client-metrics
shahzad31 a0a7a44
Merge branch 'master' into client-metrics
shahzad31 7056e40
fix e2e
shahzad31 fc33078
fix issue with rum timing
shahzad31 9529d76
update snapshot
shahzad31 0733c7c
Merge pull request #2 from formgeist/client-metrics-ui-fixes
shahzad31 d3149ea
update snapshot
shahzad31 14e8851
fix types
shahzad31 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,40 @@ | ||
| /* | ||
| * 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' } }, | ||
| ...uiFiltersES, | ||
| ], | ||
| }; | ||
|
|
||
| return { | ||
| index: indices['apm_oss.transactionIndices'], | ||
| body: { | ||
| query: { | ||
| bool, | ||
| }, | ||
| }, | ||
| }; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | ||
| When the user inspects the real user monitoring tab | ||
| Then should redirect to rum dashboard | ||
| And should have correct client metrics |
This file contains hidden or 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,20 @@ | ||
| module.exports = { | ||
| "__version": "4.5.0", | ||
| "RUM Dashboard": { | ||
| "Client metrics": { | ||
| "1": "77.52 seconds", | ||
| "2": "199", | ||
| "3": "4.14 seconds", | ||
| "4": "77.52 seconds", | ||
| "5": "199", | ||
| "6": "4.14 seconds" | ||
| } | ||
| }, | ||
| "APM": { | ||
| "Transaction duration charts": { | ||
| "1": "350 ms", | ||
| "2": "175 ms", | ||
| "1": "450 ms", | ||
| "2": "225 ms", | ||
| "3": "0 ms" | ||
| } | ||
| }, | ||
| "__version": "4.5.0" | ||
| } | ||
| } |
41 changes: 41 additions & 0 deletions
41
x-pack/plugins/apm/e2e/cypress/support/step_definitions/rum_dashboard.ts
This file contains hidden or 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,41 @@ | ||
| /* | ||
| * 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`, () => { | ||
| // open service overview page | ||
| loginAndWaitForPage(`/app/apm#/services`); | ||
| }); | ||
|
|
||
| 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
63 changes: 63 additions & 0 deletions
63
x-pack/plugins/apm/public/components/app/RumDashboard/ChartWrapper/index.tsx
This file contains hidden or 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,63 @@ | ||
| /* | ||
| * 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 React, { FC, HTMLAttributes } from 'react'; | ||
| import { | ||
| EuiErrorBoundary, | ||
| EuiFlexGroup, | ||
| EuiFlexItem, | ||
| EuiLoadingChart, | ||
| } from '@elastic/eui'; | ||
|
|
||
| interface Props { | ||
| /** | ||
| * Height for the chart | ||
| */ | ||
| height?: string; | ||
| /** | ||
| * if chart data source is still loading | ||
| */ | ||
| loading?: boolean; | ||
| /** | ||
| * aria-label for accessibility | ||
| */ | ||
| 'aria-label'?: string; | ||
| } | ||
|
|
||
| export const ChartWrapper: FC<Props> = ({ | ||
| loading = false, | ||
| height = '100%', | ||
| children, | ||
| ...rest | ||
| }) => { | ||
| const opacity = loading === true ? 0.3 : 1; | ||
|
|
||
| return ( | ||
| <EuiErrorBoundary> | ||
| <div | ||
| style={{ | ||
| height, | ||
| opacity, | ||
| transition: 'opacity 0.2s', | ||
| }} | ||
| {...(rest as HTMLAttributes<HTMLDivElement>)} | ||
| > | ||
| {children} | ||
| </div> | ||
| {loading === true && ( | ||
| <EuiFlexGroup | ||
| justifyContent="spaceAround" | ||
| alignItems="center" | ||
| style={{ height, marginTop: `-${height}`, marginBottom: 0 }} | ||
| > | ||
| <EuiFlexItem grow={false}> | ||
| <EuiLoadingChart size="xl" /> | ||
| </EuiFlexItem> | ||
| </EuiFlexGroup> | ||
| )} | ||
| </EuiErrorBoundary> | ||
| ); | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.