Config deprecations: allow to collect usage of deprecated (renamed) config keys #112633
Labels
discuss
Feature:Configuration
Settings in kibana.yml
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Currently, the recommended way to handle a change of name or path for a configuration property is to use the
rename
orrenameFromRoot
config deprecations.However, those deprecations simply move the
deprecated
property to itsnew
target, removing thedeprecated
entry from the config.Effectively, this makes telemetry's
config
collector blind or the usages of the deprecated key. In other words there is no way, when using arename
deprecation, to collect telemetry info about the usage (value overrides) of the deprecated key.As we want to preserve BWC by keeping the deprecated config path usable until a certain threshold is reached (as in #76385 for example), we need a way to have the
config
usage collector be aware of those deprecated (and removed keys).One possibility would be to
copy
the deprecated key to the new path instead of moving it. However this has impacts on the owners schemas, as the schema then need to define both the old and new key, just for the sake of the collector to be able to collect this info, and doesn't seem like the correct approach (there are probably other side effects to this option).Not sure what alternative we have though, as
CoreUsageDataService.getNonDefaultKibanaConfigs
directly relies on theconfigService
's raw config, which already has the deprecations applied. Maybe we should have a way to have the config deprecations return the info of the potentially used-by-deleted keys when applying them, and then have the core usage data service leverage this info insidegetNonDefaultKibanaConfigs
?The text was updated successfully, but these errors were encountered: