forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RUM Dashboard] New rum services api to replace usage of get services…
… API (elastic#70746)
- Loading branch information
Showing
16 changed files
with
821 additions
and
21 deletions.
There are no files selected for viewing
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
55 changes: 55 additions & 0 deletions
55
x-pack/plugins/apm/server/lib/rum_client/__snapshots__/queries.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
48 changes: 48 additions & 0 deletions
48
x-pack/plugins/apm/server/lib/rum_client/get_rum_services.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,48 @@ | ||
/* | ||
* 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 { getRumOverviewProjection } from '../../../common/projections/rum_overview'; | ||
import { mergeProjection } from '../../../common/projections/util/merge_projection'; | ||
import { | ||
Setup, | ||
SetupTimeRange, | ||
SetupUIFilters, | ||
} from '../helpers/setup_request'; | ||
|
||
export async function getRumServices({ | ||
setup, | ||
}: { | ||
setup: Setup & SetupTimeRange & SetupUIFilters; | ||
}) { | ||
const projection = getRumOverviewProjection({ | ||
setup, | ||
}); | ||
|
||
const params = mergeProjection(projection, { | ||
body: { | ||
size: 0, | ||
query: { | ||
bool: projection.body.query.bool, | ||
}, | ||
aggs: { | ||
services: { | ||
terms: { | ||
field: 'service.name', | ||
size: 1000, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
const { client } = setup; | ||
|
||
const response = await client.search(params); | ||
|
||
const result = response.aggregations?.services.buckets ?? []; | ||
|
||
return result.map(({ key }) => key as string); | ||
} |
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
Binary file added
BIN
+10.9 KB
x-pack/test/apm_api_integration/trial/fixtures/es_archiver/rum_8.0.0/data.json.gz
Binary file not shown.
Oops, something went wrong.