-
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.
Browse files
Browse the repository at this point in the history
Co-authored-by: Casper Hübertz <casper@formgeist.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Casper Hübertz <casper@formgeist.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
f8ccb03
commit 188def4
Showing
59 changed files
with
1,553 additions
and
48 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
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.