diff --git a/x-pack/plugins/apm/common/service_groups.ts b/x-pack/plugins/apm/common/service_groups.ts index d56acc846dc1b..1fa6e03f43719 100644 --- a/x-pack/plugins/apm/common/service_groups.ts +++ b/x-pack/plugins/apm/common/service_groups.ts @@ -7,7 +7,7 @@ export const APM_SERVICE_GROUP_SAVED_OBJECT_TYPE = 'apm-service-group'; export const SERVICE_GROUP_COLOR_DEFAULT = '#D1DAE7'; -export const MAX_NUMBER_OF_SERVICES_IN_GROUP = 500; +export const MAX_NUMBER_OF_SERVICE_GROUPS = 500; export interface ServiceGroup { groupName: string; diff --git a/x-pack/plugins/apm/server/routes/service_groups/get_service_groups.ts b/x-pack/plugins/apm/server/routes/service_groups/get_service_groups.ts index 2c4668ac9e916..c19a171cf6acb 100644 --- a/x-pack/plugins/apm/server/routes/service_groups/get_service_groups.ts +++ b/x-pack/plugins/apm/server/routes/service_groups/get_service_groups.ts @@ -10,7 +10,7 @@ import { ServiceGroup, SavedServiceGroup, APM_SERVICE_GROUP_SAVED_OBJECT_TYPE, - MAX_NUMBER_OF_SERVICES_IN_GROUP, + MAX_NUMBER_OF_SERVICE_GROUPS, } from '../../../common/service_groups'; export async function getServiceGroups({ @@ -21,7 +21,7 @@ export async function getServiceGroups({ const result = await savedObjectsClient.find({ type: APM_SERVICE_GROUP_SAVED_OBJECT_TYPE, page: 1, - perPage: MAX_NUMBER_OF_SERVICES_IN_GROUP, + perPage: MAX_NUMBER_OF_SERVICE_GROUPS, }); return result.saved_objects.map( ({ id, attributes, updated_at: upatedAt }) => ({ diff --git a/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts b/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts index d3fe63dde47eb..378b520e780ee 100644 --- a/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts +++ b/x-pack/plugins/apm/server/routes/service_groups/lookup_services.ts @@ -14,7 +14,7 @@ import { import { kqlQuery, rangeQuery } from '../../../../observability/server'; import { ProcessorEvent } from '../../../common/processor_event'; import { Setup } from '../../lib/helpers/setup_request'; -import { MAX_NUMBER_OF_SERVICES_IN_GROUP } from '../../../common/service_groups'; +import { MAX_NUMBER_OF_SERVICE_GROUPS } from '../../../common/service_groups'; export async function lookupServices({ setup, @@ -49,7 +49,7 @@ export async function lookupServices({ services: { terms: { field: SERVICE_NAME, - size: MAX_NUMBER_OF_SERVICES_IN_GROUP, + size: MAX_NUMBER_OF_SERVICE_GROUPS, }, aggs: { environments: { diff --git a/x-pack/plugins/apm/server/routes/services/__snapshots__/queries.test.ts.snap b/x-pack/plugins/apm/server/routes/services/__snapshots__/queries.test.ts.snap index 4014f2a4a2acc..00dcd2c3eb71b 100644 --- a/x-pack/plugins/apm/server/routes/services/__snapshots__/queries.test.ts.snap +++ b/x-pack/plugins/apm/server/routes/services/__snapshots__/queries.test.ts.snap @@ -124,7 +124,7 @@ Array [ }, "terms": Object { "field": "service.name", - "size": 50, + "size": 500, }, }, }, @@ -177,7 +177,7 @@ Array [ }, "terms": Object { "field": "service.name", - "size": 50, + "size": 500, }, }, }, @@ -241,4 +241,4 @@ Object { "size": 0, }, } -`; +`; \ No newline at end of file diff --git a/x-pack/plugins/apm/server/routes/services/get_services/get_services_items.ts b/x-pack/plugins/apm/server/routes/services/get_services/get_services_items.ts index 1235af756b76e..ee54fa4556fb9 100644 --- a/x-pack/plugins/apm/server/routes/services/get_services/get_services_items.ts +++ b/x-pack/plugins/apm/server/routes/services/get_services/get_services_items.ts @@ -16,7 +16,7 @@ import { ServiceGroup } from '../../../../common/service_groups'; export type ServicesItemsSetup = Setup; -const MAX_NUMBER_OF_SERVICES = 50; +const MAX_NUMBER_OF_SERVICES = 500; export async function getServicesItems({ environment,