-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[APM] Add kibana config for limiting the number of services in a service group #131929
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
kpatticha
merged 21 commits into
elastic:main
from
younesmln:younesmln-kibana-config-for-max-number-of-services-per-service-group
Jul 19, 2022
Merged
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
c81411c
[APM] Add kibana config for the limit of number of services in a serv…
younesmln 2590947
change kibana config label & description
younesmln 94c78d9
Allow only positive numbers for service group limit
younesmln e1ced6d
Add apm prefix to the kibana config
younesmln ec29850
fix a missing renaming
younesmln 10a4068
revert back to using a constant when getting the list of service groups
younesmln 3ccaa6f
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
younesmln aeb90b0
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
kibanamachine 5d62b7c
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
younesmln 2f050fb
Parallelize uiSettings with setupRequest
younesmln ebb2406
(Fix) Parallelizing getting the value from uiSettings with setupRequest
younesmln 4b0ff70
delete uiSettingsClient usage from lookupServices
younesmln f72c1a1
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
younesmln 301a429
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
younesmln a5e4cfc
Use kibana advanced config for limiting the number of services
younesmln 3f449b0
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
kibanamachine 125eba2
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
kibanamachine 58bbf97
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
kibanamachine ae242e3
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
kibanamachine bc9b686
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
MiriamAparicio a31d98b
Merge branch 'main' into younesmln-kibana-config-for-max-number-of-se…
kibanamachine 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
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 |
|---|---|---|
|
|
@@ -28,8 +28,14 @@ const serviceGroupsRoute = createApmServerRoute({ | |
| resources | ||
| ): Promise<{ serviceGroups: SavedServiceGroup[] }> => { | ||
| const { context } = resources; | ||
| const savedObjectsClient = (await context.core).savedObjects.client; | ||
| const serviceGroups = await getServiceGroups({ savedObjectsClient }); | ||
| const { | ||
| savedObjects: { client: savedObjectsClient }, | ||
| uiSettings: { client: uiSettingsClient }, | ||
| } = await context.core; | ||
| const serviceGroups = await getServiceGroups({ | ||
| savedObjectsClient, | ||
| uiSettingsClient, | ||
| }); | ||
| return { serviceGroups }; | ||
| }, | ||
| }); | ||
|
|
@@ -46,7 +52,9 @@ const serviceGroupRoute = createApmServerRoute({ | |
| }, | ||
| handler: async (resources): Promise<{ serviceGroup: SavedServiceGroup }> => { | ||
| const { context, params } = resources; | ||
| const savedObjectsClient = (await context.core).savedObjects.client; | ||
| const { | ||
| savedObjects: { client: savedObjectsClient }, | ||
| } = await context.core; | ||
| const serviceGroup = await getServiceGroup({ | ||
| savedObjectsClient, | ||
| serviceGroupId: params.query.serviceGroup, | ||
|
|
@@ -75,10 +83,15 @@ const serviceGroupSaveRoute = createApmServerRoute({ | |
| handler: async (resources): Promise<void> => { | ||
| const { context, params } = resources; | ||
| const { start, end, serviceGroupId } = params.query; | ||
| const savedObjectsClient = (await context.core).savedObjects.client; | ||
| const { | ||
| savedObjects: { client: savedObjectsClient }, | ||
| uiSettings: { client: uiSettingsClient }, | ||
| } = await context.core; | ||
|
|
||
| const setup = await setupRequest(resources); | ||
|
||
| const items = await lookupServices({ | ||
| setup, | ||
| uiSettingsClient, | ||
| kuery: params.body.kuery, | ||
| start, | ||
| end, | ||
|
|
@@ -126,11 +139,15 @@ const serviceGroupServicesRoute = createApmServerRoute({ | |
| handler: async ( | ||
| resources | ||
| ): Promise<{ items: Awaited<ReturnType<typeof lookupServices>> }> => { | ||
| const { params } = resources; | ||
| const { params, context } = resources; | ||
| const { kuery = '', start, end } = params.query; | ||
| const { | ||
| uiSettings: { client: uiSettingsClient }, | ||
| } = await context.core; | ||
| const setup = await setupRequest(resources); | ||
| const items = await lookupServices({ | ||
| setup, | ||
| uiSettingsClient, | ||
| kuery, | ||
| start, | ||
| end, | ||
|
|
||
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
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.