Netflix / archaius

Library for configuration management API
Apache License 2.0
2.47k stars 485 forks source link

Fix instrumentation propagation of PrefixedViewConfigs #721

Closed akang31 closed 6 months ago

akang31 commented 6 months ago

PrefixedViewConfigs, on updates from configs that it depends on, did not propagate updates to configs that depend on it, meaning any fast property updates for example would be lost.

Example: For the situation of a CompositeConfig over a PrefixedViewConfig over an instrumented config, any accesses on the overarching CompositeConfig would not be properly re-prefixed with the PrefixedViewConfig when propagating instrumentation data to the instrumented config.

Consider CompositeConfig.getRawProperty("prop") for PrefixedViewConfig with prefix "prefix"

Previous behavior: Instrumented config tries to record usage for "prop", but that's not actually the property being accessed. Fixed behavior: PrefixedViewConfig when passed through prepends "prefix." resulting in the expected "prefix.prop" being reported as accessed.