Skip to content

Commit

Permalink
[7.x] [APM] Handle APM UI config keys (#51668) (#51792)
Browse files Browse the repository at this point in the history
`xpack.apm.ui.*` keys were not properly handled due to object path parsing.
  • Loading branch information
dgieselaar authored Nov 27, 2019
1 parent 659dd92 commit 3ff46b2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions x-pack/plugins/apm/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
}),
}),
};

Expand All @@ -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,
};
}
Expand Down

0 comments on commit 3ff46b2

Please sign in to comment.