From 2d696eb7ba854f5513773a5ef282e01270254a25 Mon Sep 17 00:00:00 2001 From: Dario Gieselaar Date: Wed, 27 Nov 2019 08:58:49 +0100 Subject: [PATCH] [APM] Handle APM UI config keys (#51668) `xpack.apm.ui.*` keys were not properly handled due to object path parsing. --- x-pack/plugins/apm/server/index.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/apm/server/index.ts b/x-pack/plugins/apm/server/index.ts index b66850ff569cb..082216a78ce5e 100644 --- a/x-pack/plugins/apm/server/index.ts +++ b/x-pack/plugins/apm/server/index.ts @@ -13,8 +13,11 @@ export const config = { schema: schema.object({ serviceMapEnabled: schema.boolean({ defaultValue: false }), autocreateApmIndexPattern: schema.boolean({ defaultValue: true }), - 'ui.transactionGroupBucketSize': schema.number({ defaultValue: 100 }), - 'ui.maxTraceItems': schema.number({ defaultValue: 1000 }), + ui: schema.object({ + enabled: schema.boolean({ defaultValue: true }), + transactionGroupBucketSize: schema.number({ defaultValue: 100 }), + maxTraceItems: schema.number({ defaultValue: 1000 }), + }), }), }; @@ -30,8 +33,9 @@ export function mergeConfigs(apmOssConfig: APMOSSConfig, apmConfig: APMXPackConf 'apm_oss.onboardingIndices': apmOssConfig.onboardingIndices, 'apm_oss.indexPattern': apmOssConfig.indexPattern, 'xpack.apm.serviceMapEnabled': apmConfig.serviceMapEnabled, - 'xpack.apm.ui.maxTraceItems': apmConfig['ui.maxTraceItems'], - 'xpack.apm.ui.transactionGroupBucketSize': apmConfig['ui.transactionGroupBucketSize'], + 'xpack.apm.ui.enabled': apmConfig.ui.enabled, + 'xpack.apm.ui.maxTraceItems': apmConfig.ui.maxTraceItems, + 'xpack.apm.ui.transactionGroupBucketSize': apmConfig.ui.transactionGroupBucketSize, 'xpack.apm.autocreateApmIndexPattern': apmConfig.autocreateApmIndexPattern, }; }