Description
An extremely common issue when working with hierarchical configuration is understanding where values are coming from.
In particular, quickly determining if a specific value is coming from a specific source.
What I'd like to have is something I'm calling a "loading report": an iterator that touches all values that have been loaded and tells you "X was loaded from source Y, which overrode the value set by source Z".
This could be used to emit the report as telemetry data (e.g. a structured log record).
The current config
crate does not help here, because the different layers are eagerly merged.
figment
is almost equally unhelpful, because you'd have to wrap every single field in Tagged
(+find a way to implement a visitor).
Is this something you'd be interested to support in the next iteration of config
?