Clearer docs on config merging
Opened this issue · 0 comments
matthewhughes-uw commented
The docs (https://opentelemetry.io/docs/collector/configuration/) mention:
You can provide one or more configurations using the --config option
but don't expand on how the multiple configurations will be merged, e.g. how are duplicate maps in a key handled, are existing values stomped or are new values ignored?
Glancing at the code:
- creating a config calls
NewResolver
- The
Resolve
func on that type callsMerge
on theConf
objectopentelemetry-collector/confmap/resolver.go
Line 173 in fa49026
- Then
Merge
on that typeopentelemetry-collector/confmap/confmap.go
Line 163 in fa49026
Maybe it would be sufficient to link to https://pkg.go.dev/github.com/knadh/koanf/v2#readme-merge-behavior