Open jagan2221 opened 5 months ago
@jagan2221 are you actively working on this?
@mx-psi @TylerHelmuth can you assign this to me? I'll take this enhancement up.
There are many issues related to this particular functionality and it would be great to have a custom merge strategy supported.
Is your feature request related to a problem? Please describe. go.opentelemetry.io/collector/confmap exposes Merge method currently. I am writing a custom provider which uses confMap, I am trying to implement custom merge logic instead of default merging in underlying koanf map. Seems this is possible in koanf's library, by providing custom merge logic to koanf.Merge method, But confmap exposes normal merge currently and not custom merge functionality.
Ref-> https://github.com/knadh/koanf/blob/ef5fbbc9b413b38887e95d5600a330da5a842aa3/koanf.go#L405
Describe the solution you'd like Expose an additional Merge method in confMap which takes in custom merge function as argument and pass it to koanf's merge. confMap.Merge(in Conf, opts options)