mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
from `xpack.apm.autocreateApmIndexPattern` to `xpack.apm.autoCreateApmDataView`. Note the capitalization change. It now is `autoCreate` instead of `autocreate`. Fixes #120095. Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
This commit is contained in:
parent
e62439dbfc
commit
0c6ac199d8
4 changed files with 20 additions and 12 deletions
|
@ -101,8 +101,8 @@ Changing these settings may disable features of the APM App.
|
|||
| `xpack.apm.indices.sourcemap` {ess-icon}
|
||||
| Matcher for all source map indices. Defaults to `apm-*`.
|
||||
|
||||
| `xpack.apm.autocreateApmIndexPattern` {ess-icon}
|
||||
| Set to `false` to disable the automatic creation of the APM index pattern when the APM app is opened. Defaults to `true`.
|
||||
| `xpack.apm.autoCreateApmDataView` {ess-icon}
|
||||
| Set to `false` to disable the automatic creation of the APM data view when the APM app is opened. Defaults to `true`.
|
||||
|===
|
||||
|
||||
// end::general-apm-settings[]
|
||||
// end::general-apm-settings[]
|
||||
|
|
|
@ -17,6 +17,7 @@ import { APMPlugin } from './plugin';
|
|||
// All options should be documented in the APM configuration settings: https://github.com/elastic/kibana/blob/main/docs/settings/apm-settings.asciidoc
|
||||
// and be included on cloud allow list unless there are specific reasons not to
|
||||
const configSchema = schema.object({
|
||||
autoCreateApmDataView: schema.boolean({ defaultValue: true }),
|
||||
serviceMapEnabled: schema.boolean({ defaultValue: true }),
|
||||
serviceMapFingerprintBucketSize: schema.number({ defaultValue: 100 }),
|
||||
serviceMapTraceIdBucketSize: schema.number({ defaultValue: 65 }),
|
||||
|
@ -25,7 +26,6 @@ const configSchema = schema.object({
|
|||
}),
|
||||
serviceMapTraceIdGlobalBucketSize: schema.number({ defaultValue: 6 }),
|
||||
serviceMapMaxTracesPerRequest: schema.number({ defaultValue: 50 }),
|
||||
autocreateApmIndexPattern: schema.boolean({ defaultValue: true }),
|
||||
ui: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
transactionGroupBucketSize: schema.number({ defaultValue: 1000 }),
|
||||
|
@ -59,7 +59,15 @@ const configSchema = schema.object({
|
|||
|
||||
// plugin config
|
||||
export const config: PluginConfigDescriptor<APMConfig> = {
|
||||
deprecations: ({ renameFromRoot, deprecateFromRoot, unusedFromRoot }) => [
|
||||
deprecations: ({
|
||||
rename,
|
||||
renameFromRoot,
|
||||
deprecateFromRoot,
|
||||
unusedFromRoot,
|
||||
}) => [
|
||||
rename('autocreateApmIndexPattern', 'autoCreateApmDataView', {
|
||||
level: 'warning',
|
||||
}),
|
||||
renameFromRoot(
|
||||
'apm_oss.transactionIndices',
|
||||
'xpack.apm.indices.transaction',
|
||||
|
|
|
@ -36,7 +36,7 @@ describe('createStaticDataView', () => {
|
|||
const savedObjectsClient = getMockSavedObjectsClient('apm-*');
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: false } as APMConfig,
|
||||
config: { autoCreateApmDataView: false } as APMConfig,
|
||||
savedObjectsClient,
|
||||
spaceId: 'default',
|
||||
});
|
||||
|
@ -53,7 +53,7 @@ describe('createStaticDataView', () => {
|
|||
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: true } as APMConfig,
|
||||
config: { autoCreateApmDataView: true } as APMConfig,
|
||||
savedObjectsClient,
|
||||
spaceId: 'default',
|
||||
});
|
||||
|
@ -70,7 +70,7 @@ describe('createStaticDataView', () => {
|
|||
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: true } as APMConfig,
|
||||
config: { autoCreateApmDataView: true } as APMConfig,
|
||||
savedObjectsClient,
|
||||
spaceId: 'default',
|
||||
});
|
||||
|
@ -90,7 +90,7 @@ describe('createStaticDataView', () => {
|
|||
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: true } as APMConfig,
|
||||
config: { autoCreateApmDataView: true } as APMConfig,
|
||||
savedObjectsClient,
|
||||
spaceId: 'default',
|
||||
});
|
||||
|
@ -117,7 +117,7 @@ describe('createStaticDataView', () => {
|
|||
|
||||
await createStaticDataView({
|
||||
setup,
|
||||
config: { autocreateApmIndexPattern: true } as APMConfig,
|
||||
config: { autoCreateApmDataView: true } as APMConfig,
|
||||
savedObjectsClient,
|
||||
spaceId: 'default',
|
||||
});
|
||||
|
|
|
@ -31,8 +31,8 @@ export async function createStaticDataView({
|
|||
spaceId?: string;
|
||||
}): Promise<boolean> {
|
||||
return withApmSpan('create_static_data_view', async () => {
|
||||
// don't autocreate APM data view if it's been disabled via the config
|
||||
if (!config.autocreateApmIndexPattern) {
|
||||
// don't auto-create APM data view if it's been disabled via the config
|
||||
if (!config.autoCreateApmDataView) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue