From b17e01dd9a8e77aa45438d89bad60ca2bd4b12b6 Mon Sep 17 00:00:00 2001 From: Giorgos Bamparopoulos Date: Tue, 26 Oct 2021 16:42:32 +0100 Subject: [PATCH] [APM] Set level for all registered deprecations (#116272) --- x-pack/plugins/apm/server/index.ts | 37 +++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/apm/server/index.ts b/x-pack/plugins/apm/server/index.ts index 1ed54be0271dd..6bf3b2cb493f1 100644 --- a/x-pack/plugins/apm/server/index.ts +++ b/x-pack/plugins/apm/server/index.ts @@ -62,23 +62,38 @@ export const config: PluginConfigDescriptor = { deprecations: ({ renameFromRoot, deprecateFromRoot, unusedFromRoot }) => [ renameFromRoot( 'apm_oss.transactionIndices', - 'xpack.apm.indices.transaction' + 'xpack.apm.indices.transaction', + { level: 'warning' } ), - renameFromRoot('apm_oss.spanIndices', 'xpack.apm.indices.span'), - renameFromRoot('apm_oss.errorIndices', 'xpack.apm.indices.error'), - renameFromRoot('apm_oss.metricsIndices', 'xpack.apm.indices.metric'), - renameFromRoot('apm_oss.sourcemapIndices', 'xpack.apm.indices.sourcemap'), - renameFromRoot('apm_oss.onboardingIndices', 'xpack.apm.indices.onboarding'), - deprecateFromRoot('apm_oss.enabled', '8.0.0'), - unusedFromRoot('apm_oss.fleetMode'), - unusedFromRoot('apm_oss.indexPattern'), + renameFromRoot('apm_oss.spanIndices', 'xpack.apm.indices.span', { + level: 'warning', + }), + renameFromRoot('apm_oss.errorIndices', 'xpack.apm.indices.error', { + level: 'warning', + }), + renameFromRoot('apm_oss.metricsIndices', 'xpack.apm.indices.metric', { + level: 'warning', + }), + renameFromRoot('apm_oss.sourcemapIndices', 'xpack.apm.indices.sourcemap', { + level: 'warning', + }), + renameFromRoot( + 'apm_oss.onboardingIndices', + 'xpack.apm.indices.onboarding', + { level: 'warning' } + ), + deprecateFromRoot('apm_oss.enabled', '8.0.0', { level: 'warning' }), + unusedFromRoot('apm_oss.fleetMode', { level: 'warning' }), + unusedFromRoot('apm_oss.indexPattern', { level: 'warning' }), renameFromRoot( 'xpack.apm.maxServiceEnvironments', - `uiSettings.overrides[${maxSuggestions}]` + `uiSettings.overrides[${maxSuggestions}]`, + { level: 'warning' } ), renameFromRoot( 'xpack.apm.maxServiceSelections', - `uiSettings.overrides[${maxSuggestions}]` + `uiSettings.overrides[${maxSuggestions}]`, + { level: 'warning' } ), ], exposeToBrowser: {