diff --git a/CHANGELOG.md b/CHANGELOG.md index bfb5996af32..467e5df5dfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### 🚩 Deprecations 🚩 +- Deprecate `configunmarshaler` package, move it to internal (#5151) - Deprecate all API in `model/semconv`. The package is moved to a new `semcomv` module (#5196) ### 💡 Enhancements 💡 diff --git a/config/common.go b/config/common.go new file mode 100644 index 00000000000..b2e582356c4 --- /dev/null +++ b/config/common.go @@ -0,0 +1,23 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config // import "go.opentelemetry.io/collector/config" + +func unmarshal(componentSection *Map, intoCfg interface{}) error { + if cu, ok := intoCfg.(Unmarshallable); ok { + return cu.Unmarshal(componentSection) + } + + return componentSection.UnmarshalExact(intoCfg) +} diff --git a/config/configunmarshaler/unmarshaler.go b/config/configunmarshaler/unmarshaler.go index 7c649e70440..d92df284046 100644 --- a/config/configunmarshaler/unmarshaler.go +++ b/config/configunmarshaler/unmarshaler.go @@ -15,12 +15,14 @@ package configunmarshaler // import "go.opentelemetry.io/collector/config/configunmarshaler" import ( - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/internal/configunmarshaler" ) -// ConfigUnmarshaler is the interface that unmarshalls the collector configuration from the config.Map. -type ConfigUnmarshaler interface { - // Unmarshal the configuration from the given parser and factories. - Unmarshal(v *config.Map, factories component.Factories) (*config.Config, error) -} +// Deprecated: [v0.50.0] if you need to update the config.Config implement custom (or wrap) service.ConfigProvider. +type ConfigUnmarshaler = configunmarshaler.ConfigUnmarshaler + +// Deprecated: [v0.50.0] not needed since interface will be removed. +var NewDefault = configunmarshaler.NewDefault + +// Deprecated: [v0.50.0] use config.UnmarshalReceiver. +var LoadReceiver = configunmarshaler.LoadReceiver diff --git a/config/exporter.go b/config/exporter.go index 3bba3874c99..c13c7db2837 100644 --- a/config/exporter.go +++ b/config/exporter.go @@ -23,6 +23,13 @@ type Exporter interface { privateConfigExporter() } +// UnmarshalExporter helper function to unmarshal an Exporter config. +// It checks if the config implements Unmarshallable and uses that if available, +// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +func UnmarshalExporter(cfgMap *Map, cfg Exporter) error { + return unmarshal(cfgMap, cfg) +} + // ExporterSettings defines common settings for a component.Exporter configuration. // Specific exporters can embed this struct and extend it with more fields if needed. // diff --git a/config/extension.go b/config/extension.go index 44d87c8d86b..24f6cac7d24 100644 --- a/config/extension.go +++ b/config/extension.go @@ -23,6 +23,13 @@ type Extension interface { privateConfigExtension() } +// UnmarshalExtension helper function to unmarshal an Extension config. +// It checks if the config implements Unmarshallable and uses that if available, +// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +func UnmarshalExtension(cfgMap *Map, cfg Extension) error { + return unmarshal(cfgMap, cfg) +} + // ExtensionSettings defines common settings for a component.Extension configuration. // Specific processors can embed this struct and extend it with more fields if needed. // diff --git a/config/processor.go b/config/processor.go index 212ba32ac17..bde13f68736 100644 --- a/config/processor.go +++ b/config/processor.go @@ -23,6 +23,13 @@ type Processor interface { privateConfigProcessor() } +// UnmarshalProcessor helper function to unmarshal a Processor config. +// It checks if the config implements Unmarshallable and uses that if available, +// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +func UnmarshalProcessor(cfgMap *Map, cfg Processor) error { + return unmarshal(cfgMap, cfg) +} + // ProcessorSettings defines common settings for a component.Processor configuration. // Specific processors can embed this struct and extend it with more fields if needed. // diff --git a/config/receiver.go b/config/receiver.go index 5935b78d59a..6974efbc46b 100644 --- a/config/receiver.go +++ b/config/receiver.go @@ -23,6 +23,13 @@ type Receiver interface { privateConfigReceiver() } +// UnmarshalReceiver helper function to unmarshal a Receiver config. +// It checks if the config implements Unmarshallable and uses that if available, +// otherwise uses Map.UnmarshalExact, erroring if a field is nonexistent. +func UnmarshalReceiver(cfgMap *Map, cfg Receiver) error { + return unmarshal(cfgMap, cfg) +} + // ReceiverSettings defines common settings for a component.Receiver configuration. // Specific receivers can embed this struct and extend it with more fields if needed. // diff --git a/config/configunmarshaler/defaultunmarshaler.go b/internal/configunmarshaler/defaultunmarshaler.go similarity index 92% rename from config/configunmarshaler/defaultunmarshaler.go rename to internal/configunmarshaler/defaultunmarshaler.go index 7956b54a0f7..4de43165c3d 100644 --- a/config/configunmarshaler/defaultunmarshaler.go +++ b/internal/configunmarshaler/defaultunmarshaler.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package configunmarshaler // import "go.opentelemetry.io/collector/config/configunmarshaler" +package configunmarshaler // import "go.opentelemetry.io/collector/internal/configunmarshaler" import ( "fmt" @@ -25,6 +25,12 @@ import ( "go.opentelemetry.io/collector/config/configtelemetry" ) +// ConfigUnmarshaler is the interface that unmarshalls the collector configuration from the config.Map. +type ConfigUnmarshaler interface { + // Unmarshal the configuration from the given parser and factories. + Unmarshal(v *config.Map, factories component.Factories) (*config.Config, error) +} + // These are errors that can be returned by Unmarshal(). Note that error codes are not part // of Unmarshal()'s public API, they are for internal unit testing only. type configErrorCode int @@ -154,7 +160,7 @@ func unmarshalExtensions(exts map[config.ComponentID]map[string]interface{}, fac // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := unmarshal(config.NewMapFromStringMap(value), extensionCfg); err != nil { + if err := config.UnmarshalExtension(config.NewMapFromStringMap(value), extensionCfg); err != nil { return nil, errorUnmarshalError(extensionsKeyName, id, err) } @@ -183,7 +189,7 @@ func unmarshalService(srvRaw map[string]interface{}) (config.Service, error) { }, } - if err := unmarshal(config.NewMapFromStringMap(srvRaw), &srv); err != nil { + if err := config.NewMapFromStringMap(srvRaw).UnmarshalExact(&srv); err != nil { return srv, fmt.Errorf("error reading service configuration: %w", err) } @@ -210,7 +216,7 @@ func LoadReceiver(componentConfig *config.Map, id config.ComponentID, factory co // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := unmarshal(componentConfig, receiverCfg); err != nil { + if err := config.UnmarshalReceiver(componentConfig, receiverCfg); err != nil { return nil, errorUnmarshalError(receiversKeyName, id, err) } @@ -259,7 +265,7 @@ func unmarshalExporters(exps map[config.ComponentID]map[string]interface{}, fact // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := unmarshal(config.NewMapFromStringMap(value), exporterCfg); err != nil { + if err := config.UnmarshalExporter(config.NewMapFromStringMap(value), exporterCfg); err != nil { return nil, errorUnmarshalError(exportersKeyName, id, err) } @@ -287,7 +293,7 @@ func unmarshalProcessors(procs map[config.ComponentID]map[string]interface{}, fa // Now that the default config struct is created we can Unmarshal into it, // and it will apply user-defined config on top of the default. - if err := unmarshal(config.NewMapFromStringMap(value), processorCfg); err != nil { + if err := config.UnmarshalProcessor(config.NewMapFromStringMap(value), processorCfg); err != nil { return nil, errorUnmarshalError(processorsKeyName, id, err) } @@ -297,14 +303,6 @@ func unmarshalProcessors(procs map[config.ComponentID]map[string]interface{}, fa return processors, nil } -func unmarshal(componentSection *config.Map, intoCfg interface{}) error { - if cu, ok := intoCfg.(config.Unmarshallable); ok { - return cu.Unmarshal(componentSection) - } - - return componentSection.UnmarshalExact(intoCfg) -} - func errorUnknownType(component string, id config.ComponentID, factories []reflect.Value) error { return fmt.Errorf("unknown %s type %q for %q (valid values: %v)", component, id.Type(), id, factories) } diff --git a/config/configunmarshaler/defaultunmarshaler_test.go b/internal/configunmarshaler/defaultunmarshaler_test.go similarity index 100% rename from config/configunmarshaler/defaultunmarshaler_test.go rename to internal/configunmarshaler/defaultunmarshaler_test.go diff --git a/config/configunmarshaler/testdata/duplicate-exporter.yaml b/internal/configunmarshaler/testdata/duplicate-exporter.yaml similarity index 100% rename from config/configunmarshaler/testdata/duplicate-exporter.yaml rename to internal/configunmarshaler/testdata/duplicate-exporter.yaml diff --git a/config/configunmarshaler/testdata/duplicate-extension.yaml b/internal/configunmarshaler/testdata/duplicate-extension.yaml similarity index 100% rename from config/configunmarshaler/testdata/duplicate-extension.yaml rename to internal/configunmarshaler/testdata/duplicate-extension.yaml diff --git a/config/configunmarshaler/testdata/duplicate-pipeline.yaml b/internal/configunmarshaler/testdata/duplicate-pipeline.yaml similarity index 100% rename from config/configunmarshaler/testdata/duplicate-pipeline.yaml rename to internal/configunmarshaler/testdata/duplicate-pipeline.yaml diff --git a/config/configunmarshaler/testdata/duplicate-processor.yaml b/internal/configunmarshaler/testdata/duplicate-processor.yaml similarity index 100% rename from config/configunmarshaler/testdata/duplicate-processor.yaml rename to internal/configunmarshaler/testdata/duplicate-processor.yaml diff --git a/config/configunmarshaler/testdata/duplicate-receiver.yaml b/internal/configunmarshaler/testdata/duplicate-receiver.yaml similarity index 100% rename from config/configunmarshaler/testdata/duplicate-receiver.yaml rename to internal/configunmarshaler/testdata/duplicate-receiver.yaml diff --git a/config/configunmarshaler/testdata/empty-all-sections.yaml b/internal/configunmarshaler/testdata/empty-all-sections.yaml similarity index 100% rename from config/configunmarshaler/testdata/empty-all-sections.yaml rename to internal/configunmarshaler/testdata/empty-all-sections.yaml diff --git a/config/configunmarshaler/testdata/empty-config.yaml b/internal/configunmarshaler/testdata/empty-config.yaml similarity index 100% rename from config/configunmarshaler/testdata/empty-config.yaml rename to internal/configunmarshaler/testdata/empty-config.yaml diff --git a/config/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml b/internal/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml rename to internal/configunmarshaler/testdata/invalid-exporter-name-after-slash.yaml diff --git a/config/configunmarshaler/testdata/invalid-exporter-section.yaml b/internal/configunmarshaler/testdata/invalid-exporter-section.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-exporter-section.yaml rename to internal/configunmarshaler/testdata/invalid-exporter-section.yaml diff --git a/config/configunmarshaler/testdata/invalid-exporter-sub-config.yaml b/internal/configunmarshaler/testdata/invalid-exporter-sub-config.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-exporter-sub-config.yaml rename to internal/configunmarshaler/testdata/invalid-exporter-sub-config.yaml diff --git a/config/configunmarshaler/testdata/invalid-exporter-type.yaml b/internal/configunmarshaler/testdata/invalid-exporter-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-exporter-type.yaml rename to internal/configunmarshaler/testdata/invalid-exporter-type.yaml diff --git a/config/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml b/internal/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml rename to internal/configunmarshaler/testdata/invalid-extension-name-after-slash.yaml diff --git a/config/configunmarshaler/testdata/invalid-extension-section.yaml b/internal/configunmarshaler/testdata/invalid-extension-section.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-extension-section.yaml rename to internal/configunmarshaler/testdata/invalid-extension-section.yaml diff --git a/config/configunmarshaler/testdata/invalid-extension-sub-config.yaml b/internal/configunmarshaler/testdata/invalid-extension-sub-config.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-extension-sub-config.yaml rename to internal/configunmarshaler/testdata/invalid-extension-sub-config.yaml diff --git a/config/configunmarshaler/testdata/invalid-extension-type.yaml b/internal/configunmarshaler/testdata/invalid-extension-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-extension-type.yaml rename to internal/configunmarshaler/testdata/invalid-extension-type.yaml diff --git a/config/configunmarshaler/testdata/invalid-logs-level.yaml b/internal/configunmarshaler/testdata/invalid-logs-level.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-logs-level.yaml rename to internal/configunmarshaler/testdata/invalid-logs-level.yaml diff --git a/config/configunmarshaler/testdata/invalid-metrics-level.yaml b/internal/configunmarshaler/testdata/invalid-metrics-level.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-metrics-level.yaml rename to internal/configunmarshaler/testdata/invalid-metrics-level.yaml diff --git a/config/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml b/internal/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml rename to internal/configunmarshaler/testdata/invalid-pipeline-name-after-slash.yaml diff --git a/config/configunmarshaler/testdata/invalid-pipeline-section.yaml b/internal/configunmarshaler/testdata/invalid-pipeline-section.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-pipeline-section.yaml rename to internal/configunmarshaler/testdata/invalid-pipeline-section.yaml diff --git a/config/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml b/internal/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml rename to internal/configunmarshaler/testdata/invalid-pipeline-sub-config.yaml diff --git a/config/configunmarshaler/testdata/invalid-pipeline-type.yaml b/internal/configunmarshaler/testdata/invalid-pipeline-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-pipeline-type.yaml rename to internal/configunmarshaler/testdata/invalid-pipeline-type.yaml diff --git a/config/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml b/internal/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml rename to internal/configunmarshaler/testdata/invalid-processor-name-after-slash.yaml diff --git a/config/configunmarshaler/testdata/invalid-processor-section.yaml b/internal/configunmarshaler/testdata/invalid-processor-section.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-processor-section.yaml rename to internal/configunmarshaler/testdata/invalid-processor-section.yaml diff --git a/config/configunmarshaler/testdata/invalid-processor-sub-config.yaml b/internal/configunmarshaler/testdata/invalid-processor-sub-config.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-processor-sub-config.yaml rename to internal/configunmarshaler/testdata/invalid-processor-sub-config.yaml diff --git a/config/configunmarshaler/testdata/invalid-processor-type.yaml b/internal/configunmarshaler/testdata/invalid-processor-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-processor-type.yaml rename to internal/configunmarshaler/testdata/invalid-processor-type.yaml diff --git a/config/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml b/internal/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml rename to internal/configunmarshaler/testdata/invalid-receiver-name-after-slash.yaml diff --git a/config/configunmarshaler/testdata/invalid-receiver-section.yaml b/internal/configunmarshaler/testdata/invalid-receiver-section.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-receiver-section.yaml rename to internal/configunmarshaler/testdata/invalid-receiver-section.yaml diff --git a/config/configunmarshaler/testdata/invalid-receiver-sub-config.yaml b/internal/configunmarshaler/testdata/invalid-receiver-sub-config.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-receiver-sub-config.yaml rename to internal/configunmarshaler/testdata/invalid-receiver-sub-config.yaml diff --git a/config/configunmarshaler/testdata/invalid-receiver-type.yaml b/internal/configunmarshaler/testdata/invalid-receiver-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-receiver-type.yaml rename to internal/configunmarshaler/testdata/invalid-receiver-type.yaml diff --git a/config/configunmarshaler/testdata/invalid-sequence-value.yaml b/internal/configunmarshaler/testdata/invalid-sequence-value.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-sequence-value.yaml rename to internal/configunmarshaler/testdata/invalid-sequence-value.yaml diff --git a/config/configunmarshaler/testdata/invalid-service-extensions-section.yaml b/internal/configunmarshaler/testdata/invalid-service-extensions-section.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-service-extensions-section.yaml rename to internal/configunmarshaler/testdata/invalid-service-extensions-section.yaml diff --git a/config/configunmarshaler/testdata/invalid-service-section.yaml b/internal/configunmarshaler/testdata/invalid-service-section.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-service-section.yaml rename to internal/configunmarshaler/testdata/invalid-service-section.yaml diff --git a/config/configunmarshaler/testdata/invalid-top-level-section.yaml b/internal/configunmarshaler/testdata/invalid-top-level-section.yaml similarity index 100% rename from config/configunmarshaler/testdata/invalid-top-level-section.yaml rename to internal/configunmarshaler/testdata/invalid-top-level-section.yaml diff --git a/config/configunmarshaler/testdata/unknown-exporter-type.yaml b/internal/configunmarshaler/testdata/unknown-exporter-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/unknown-exporter-type.yaml rename to internal/configunmarshaler/testdata/unknown-exporter-type.yaml diff --git a/config/configunmarshaler/testdata/unknown-extension-type.yaml b/internal/configunmarshaler/testdata/unknown-extension-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/unknown-extension-type.yaml rename to internal/configunmarshaler/testdata/unknown-extension-type.yaml diff --git a/config/configunmarshaler/testdata/unknown-pipeline-type.yaml b/internal/configunmarshaler/testdata/unknown-pipeline-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/unknown-pipeline-type.yaml rename to internal/configunmarshaler/testdata/unknown-pipeline-type.yaml diff --git a/config/configunmarshaler/testdata/unknown-processor-type.yaml b/internal/configunmarshaler/testdata/unknown-processor-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/unknown-processor-type.yaml rename to internal/configunmarshaler/testdata/unknown-processor-type.yaml diff --git a/config/configunmarshaler/testdata/unknown-receiver-type.yaml b/internal/configunmarshaler/testdata/unknown-receiver-type.yaml similarity index 100% rename from config/configunmarshaler/testdata/unknown-receiver-type.yaml rename to internal/configunmarshaler/testdata/unknown-receiver-type.yaml diff --git a/config/configunmarshaler/testdata/valid-config.yaml b/internal/configunmarshaler/testdata/valid-config.yaml similarity index 100% rename from config/configunmarshaler/testdata/valid-config.yaml rename to internal/configunmarshaler/testdata/valid-config.yaml diff --git a/service/config_provider.go b/service/config_provider.go index bbdb0d5db43..a64b4b51639 100644 --- a/service/config_provider.go +++ b/service/config_provider.go @@ -25,12 +25,12 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/configunmarshaler" "go.opentelemetry.io/collector/config/experimental/configsource" "go.opentelemetry.io/collector/config/mapconverter/expandmapconverter" "go.opentelemetry.io/collector/config/mapprovider/envmapprovider" "go.opentelemetry.io/collector/config/mapprovider/filemapprovider" "go.opentelemetry.io/collector/config/mapprovider/yamlmapprovider" + "go.opentelemetry.io/collector/internal/configunmarshaler" ) // ConfigProvider provides the service configuration. @@ -91,8 +91,9 @@ type ConfigProviderSettings struct { // MapConverters is a slice of config.MapConverterFunc. MapConverters []config.MapConverterFunc - // The configunmarshaler.ConfigUnmarshaler to be used to unmarshal the config.Map into config.Config. - // It is required to not be nil, use configunmarshaler.NewDefault() by default. + // Deprecated: [v0.50.0] because providing custom ConfigUnmarshaler is not necessary since users can wrap/implement + // ConfigProvider if needed to change the resulted config. This functionality will be kept for at least 2 minor versions, + // and if nobody express a need for it will be removed. Unmarshaler configunmarshaler.ConfigUnmarshaler } diff --git a/service/config_provider_test.go b/service/config_provider_test.go index 93cc5a2ca9a..500771161ca 100644 --- a/service/config_provider_test.go +++ b/service/config_provider_test.go @@ -28,9 +28,9 @@ import ( "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" - "go.opentelemetry.io/collector/config/configunmarshaler" "go.opentelemetry.io/collector/config/experimental/configsource" "go.opentelemetry.io/collector/config/mapprovider/filemapprovider" + "go.opentelemetry.io/collector/internal/configunmarshaler" ) type mockProvider struct { diff --git a/service/servicetest/configprovider.go b/service/servicetest/configprovider.go index 9bd6a258ce3..921e8b5c403 100644 --- a/service/servicetest/configprovider.go +++ b/service/servicetest/configprovider.go @@ -18,7 +18,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" - "go.opentelemetry.io/collector/config/configunmarshaler" + "go.opentelemetry.io/collector/internal/configunmarshaler" ) // LoadConfig loads a config.Config from file, and does NOT validate the configuration.