diff --git a/exporter/alibabacloudlogserviceexporter/config.go b/exporter/alibabacloudlogserviceexporter/config.go index 6756b4ee9a839..f074e4eb0db4f 100644 --- a/exporter/alibabacloudlogserviceexporter/config.go +++ b/exporter/alibabacloudlogserviceexporter/config.go @@ -14,11 +14,11 @@ package alibabacloudlogserviceexporter -import "go.opentelemetry.io/collector/config/configmodels" +import "go.opentelemetry.io/collector/config" // Config defines configuration for AlibabaCloud Log Service exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // LogService's Endpoint, https://www.alibabacloud.com/help/doc-detail/29008.htm // for AlibabaCloud Kubernetes(or ECS), set {region-id}-intranet.log.aliyuncs.com, eg cn-hangzhou-intranet.log.aliyuncs.com; // others set {region-id}.log.aliyuncs.com, eg cn-hangzhou.log.aliyuncs.com diff --git a/exporter/alibabacloudlogserviceexporter/config_test.go b/exporter/alibabacloudlogserviceexporter/config_test.go index 59637251d0850..a3b0fc42a976f 100644 --- a/exporter/alibabacloudlogserviceexporter/config_test.go +++ b/exporter/alibabacloudlogserviceexporter/config_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" ) @@ -33,7 +33,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -50,8 +50,8 @@ func TestLoadConfig(t *testing.T) { e1 := cfg.Exporters[expectedName] expectedCfg := Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: expectedName, }, Endpoint: "cn-hangzhou.log.aliyuncs.com", diff --git a/exporter/alibabacloudlogserviceexporter/factory.go b/exporter/alibabacloudlogserviceexporter/factory.go index 373a0bc1ec3c4..5e6b90bcd7d63 100644 --- a/exporter/alibabacloudlogserviceexporter/factory.go +++ b/exporter/alibabacloudlogserviceexporter/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -38,10 +38,10 @@ func NewFactory() component.ExporterFactory { } // CreateDefaultConfig creates the default configuration for exporter. -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, } @@ -50,7 +50,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { return newTraceExporter(params.Logger, cfg) } @@ -58,7 +58,7 @@ func createTraceExporter( func createMetricsExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (exp component.MetricsExporter, err error) { return newMetricsExporter(params.Logger, cfg) } @@ -66,7 +66,7 @@ func createMetricsExporter( func createLogsExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (exp component.LogsExporter, err error) { return newLogsExporter(params.Logger, cfg) } diff --git a/exporter/alibabacloudlogserviceexporter/go.mod b/exporter/alibabacloudlogserviceexporter/go.mod index 15e9f3162261f..ce04a15d4ca3d 100644 --- a/exporter/alibabacloudlogserviceexporter/go.mod +++ b/exporter/alibabacloudlogserviceexporter/go.mod @@ -8,7 +8,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/exporter/alibabacloudlogserviceexporter/go.sum b/exporter/alibabacloudlogserviceexporter/go.sum index cc21f63878e2a..d0cb7c263b2c7 100644 --- a/exporter/alibabacloudlogserviceexporter/go.sum +++ b/exporter/alibabacloudlogserviceexporter/go.sum @@ -909,8 +909,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/alibabacloudlogserviceexporter/logs_exporter.go b/exporter/alibabacloudlogserviceexporter/logs_exporter.go index ec2e7ef063137..5a6254db2d5e0 100644 --- a/exporter/alibabacloudlogserviceexporter/logs_exporter.go +++ b/exporter/alibabacloudlogserviceexporter/logs_exporter.go @@ -18,14 +18,14 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" ) // newLogsExporter return a new LogService logs exporter. -func newLogsExporter(logger *zap.Logger, cfg configmodels.Exporter) (component.LogsExporter, error) { +func newLogsExporter(logger *zap.Logger, cfg config.Exporter) (component.LogsExporter, error) { l := &logServiceLogsSender{ logger: logger, diff --git a/exporter/alibabacloudlogserviceexporter/metrics_exporter.go b/exporter/alibabacloudlogserviceexporter/metrics_exporter.go index 757051549663f..01a129ce18ef4 100644 --- a/exporter/alibabacloudlogserviceexporter/metrics_exporter.go +++ b/exporter/alibabacloudlogserviceexporter/metrics_exporter.go @@ -18,14 +18,14 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" ) // newMetricsExporter return a new LogSerice metrics exporter. -func newMetricsExporter(logger *zap.Logger, cfg configmodels.Exporter) (component.MetricsExporter, error) { +func newMetricsExporter(logger *zap.Logger, cfg config.Exporter) (component.MetricsExporter, error) { l := &logServiceMetricsSender{ logger: logger, diff --git a/exporter/alibabacloudlogserviceexporter/trace_exporter.go b/exporter/alibabacloudlogserviceexporter/trace_exporter.go index a678d08f7daa8..214d3d3c195b4 100644 --- a/exporter/alibabacloudlogserviceexporter/trace_exporter.go +++ b/exporter/alibabacloudlogserviceexporter/trace_exporter.go @@ -18,14 +18,14 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" ) // newTraceExporter return a new LogSerice trace exporter. -func newTraceExporter(logger *zap.Logger, cfg configmodels.Exporter) (component.TracesExporter, error) { +func newTraceExporter(logger *zap.Logger, cfg config.Exporter) (component.TracesExporter, error) { l := &logServiceTraceSender{ logger: logger, diff --git a/exporter/awsemfexporter/config.go b/exporter/awsemfexporter/config.go index 127b1ea542572..d56244c93c4ec 100644 --- a/exporter/awsemfexporter/config.go +++ b/exporter/awsemfexporter/config.go @@ -15,7 +15,7 @@ package awsemfexporter import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" ) @@ -28,7 +28,7 @@ var ( // Config defines configuration for AWS EMF exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // LogGroupName is the name of CloudWatch log group which defines group of log streams // that share the same retention, monitoring, and access control settings. LogGroupName string `mapstructure:"log_group_name"` diff --git a/exporter/awsemfexporter/config_test.go b/exporter/awsemfexporter/config_test.go index 35744196de950..7fe74b88bc69f 100644 --- a/exporter/awsemfexporter/config_test.go +++ b/exporter/awsemfexporter/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -49,7 +49,7 @@ func TestLoadConfig(t *testing.T) { r1.Validate() assert.Equal(t, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "awsemf/1"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "awsemf/1"}, LogGroupName: "", LogStreamName: "", Endpoint: "", @@ -70,7 +70,7 @@ func TestLoadConfig(t *testing.T) { r2.Validate() assert.Equal(t, r2, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "awsemf/resource_attr_to_label"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "awsemf/resource_attr_to_label"}, LogGroupName: "", LogStreamName: "", Endpoint: "", @@ -97,7 +97,7 @@ func TestConfigValidate(t *testing.T) { {unit: "Megabytes", metricName: "memory_usage"}, } config := &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "awsemf/resource_attr_to_label"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "awsemf/resource_attr_to_label"}, RequestTimeoutSeconds: 30, MaxRetries: 1, DimensionRollupOption: "ZeroAndSingleDimensionRollup", diff --git a/exporter/awsemfexporter/emf_exporter.go b/exporter/awsemfexporter/emf_exporter.go index f437ee9baaf96..649d705e86a6f 100644 --- a/exporter/awsemfexporter/emf_exporter.go +++ b/exporter/awsemfexporter/emf_exporter.go @@ -25,7 +25,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/google/uuid" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -42,7 +42,7 @@ type emfExporter struct { //Each (log group, log stream) keeps a separate Pusher because of each (log group, log stream) requires separate stream token. groupStreamToPusherMap map[string]map[string]Pusher svcStructuredLog LogClient - config configmodels.Exporter + config config.Exporter logger *zap.Logger metricTranslator metricTranslator @@ -54,7 +54,7 @@ type emfExporter struct { // New func creates an EMF Exporter instance with data push callback func func New( - config configmodels.Exporter, + config config.Exporter, params component.ExporterCreateParams, ) (component.MetricsExporter, error) { if config == nil { @@ -92,7 +92,7 @@ func New( // NewEmfExporter creates a new exporter using exporterhelper func NewEmfExporter( - config configmodels.Exporter, + config config.Exporter, params component.ExporterCreateParams, ) (component.MetricsExporter, error) { exp, err := New(config, params) diff --git a/exporter/awsemfexporter/factory.go b/exporter/awsemfexporter/factory.go index 7c8b7b087c05b..707768d0c7b41 100644 --- a/exporter/awsemfexporter/factory.go +++ b/exporter/awsemfexporter/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -36,10 +36,10 @@ func NewFactory() component.ExporterFactory { } // CreateDefaultConfig creates the default configuration for exporter. -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, LogGroupName: "", @@ -63,7 +63,7 @@ func createDefaultConfig() configmodels.Exporter { // createMetricsExporter creates a metrics exporter based on this config. func createMetricsExporter(_ context.Context, params component.ExporterCreateParams, - config configmodels.Exporter) (component.MetricsExporter, error) { + config config.Exporter) (component.MetricsExporter, error) { expCfg := config.(*Config) diff --git a/exporter/awsemfexporter/factory_test.go b/exporter/awsemfexporter/factory_test.go index 51f8fd77d5d18..12582f5b73893 100644 --- a/exporter/awsemfexporter/factory_test.go +++ b/exporter/awsemfexporter/factory_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" ) @@ -42,7 +42,7 @@ func TestCreateTraceExporter(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -60,7 +60,7 @@ func TestCreateMetricsExporter(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) diff --git a/exporter/awsemfexporter/go.mod b/exporter/awsemfexporter/go.mod index b22d4f0ebc509..51d34464bd39e 100644 --- a/exporter/awsemfexporter/go.mod +++ b/exporter/awsemfexporter/go.mod @@ -17,7 +17,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws v0.0.0-00010101000000-000000000000 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/awsemfexporter/go.sum b/exporter/awsemfexporter/go.sum index 9acf7123a1e76..822821bf0bd58 100644 --- a/exporter/awsemfexporter/go.sum +++ b/exporter/awsemfexporter/go.sum @@ -826,7 +826,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -992,7 +991,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1051,8 +1049,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.opentelemetry.io/otel v0.19.0 h1:Lenfy7QHRXPZVsw/12CWpxX6d/JkrX8wrx2vO8G80Ng= go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg= go.opentelemetry.io/otel/metric v0.19.0/go.mod h1:8f9fglJPRnXuskQmKpnad31lcLJ2VmNNqIsx/uIwBSc= diff --git a/exporter/awskinesisexporter/config.go b/exporter/awskinesisexporter/config.go index 191cb9146a8d5..50f0d41cd7a43 100644 --- a/exporter/awskinesisexporter/config.go +++ b/exporter/awskinesisexporter/config.go @@ -15,7 +15,7 @@ package awskinesisexporter import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // AWSConfig contains AWS specific configuration such as awskinesis stream, region, etc. @@ -42,7 +42,7 @@ type KPLConfig struct { // Config contains the main configuration options for the awskinesis exporter type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` + config.ExporterSettings `mapstructure:",squash"` AWS AWSConfig `mapstructure:"aws"` KPL KPLConfig `mapstructure:"kpl"` diff --git a/exporter/awskinesisexporter/config_test.go b/exporter/awskinesisexporter/config_test.go index f917df7748846..d551ef20e6253 100644 --- a/exporter/awskinesisexporter/config_test.go +++ b/exporter/awskinesisexporter/config_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" ) @@ -42,7 +42,7 @@ func TestDefaultConfig(t *testing.T) { assert.Equal(t, e, &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ TypeVal: "awskinesis", NameVal: "awskinesis", }, @@ -83,7 +83,7 @@ func TestConfig(t *testing.T) { assert.Equal(t, e, &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ TypeVal: "awskinesis", NameVal: "awskinesis", }, diff --git a/exporter/awskinesisexporter/factory.go b/exporter/awskinesisexporter/factory.go index e569e5e79458c..5179a59112e3b 100644 --- a/exporter/awskinesisexporter/factory.go +++ b/exporter/awskinesisexporter/factory.go @@ -19,7 +19,7 @@ import ( awskinesis "github.com/signalfx/opencensus-go-exporter-kinesis" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -37,9 +37,9 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithTraces(createTraceExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -65,7 +65,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - config configmodels.Exporter, + config config.Exporter, ) (component.TracesExporter, error) { c := config.(*Config) k, err := awskinesis.NewExporter(&awskinesis.Options{ diff --git a/exporter/awskinesisexporter/go.mod b/exporter/awskinesisexporter/go.mod index 49dfd76e6cc07..4b0164e987404 100644 --- a/exporter/awskinesisexporter/go.mod +++ b/exporter/awskinesisexporter/go.mod @@ -12,7 +12,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/signalfx/opencensus-go-exporter-kinesis v0.6.3 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/exporter/awskinesisexporter/go.sum b/exporter/awskinesisexporter/go.sum index 33799312864d9..d5fef6d481a61 100644 --- a/exporter/awskinesisexporter/go.sum +++ b/exporter/awskinesisexporter/go.sum @@ -840,7 +840,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1021,7 +1020,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1081,8 +1079,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/awsprometheusremotewriteexporter/config_test.go b/exporter/awsprometheusremotewriteexporter/config_test.go index 7f2ab2ad428a7..2b694a7ea8301 100644 --- a/exporter/awsprometheusremotewriteexporter/config_test.go +++ b/exporter/awsprometheusremotewriteexporter/config_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -55,7 +55,7 @@ func TestLoadConfig(t *testing.T) { e1 := cfg.Exporters["awsprometheusremotewrite/2"] cfgComplete := &Config{ Config: prw.Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "awsprometheusremotewrite/2", TypeVal: "awsprometheusremotewrite", }, diff --git a/exporter/awsprometheusremotewriteexporter/factory.go b/exporter/awsprometheusremotewriteexporter/factory.go index 61f0332dd21be..b2b4ef160911e 100644 --- a/exporter/awsprometheusremotewriteexporter/factory.go +++ b/exporter/awsprometheusremotewriteexporter/factory.go @@ -21,7 +21,7 @@ import ( "net/http" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" prw "go.opentelemetry.io/collector/exporter/prometheusremotewriteexporter" ) @@ -36,16 +36,16 @@ func NewFactory() component.ExporterFactory { return &awsFactory{ExporterFactory: prw.NewFactory()} } -func (af *awsFactory) Type() configmodels.Type { +func (af *awsFactory) Type() config.Type { return typeStr } func (af *awsFactory) CreateMetricsExporter(ctx context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter) (component.MetricsExporter, error) { + cfg config.Exporter) (component.MetricsExporter, error) { return af.ExporterFactory.CreateMetricsExporter(ctx, params, &cfg.(*Config).Config) } -func (af *awsFactory) CreateDefaultConfig() configmodels.Exporter { +func (af *awsFactory) CreateDefaultConfig() config.Exporter { cfg := &Config{ Config: *af.ExporterFactory.CreateDefaultConfig().(*prw.Config), AuthConfig: AuthConfig{ diff --git a/exporter/awsprometheusremotewriteexporter/factory_test.go b/exporter/awsprometheusremotewriteexporter/factory_test.go index 1dc72ce2a1cfe..513d3c66568b0 100644 --- a/exporter/awsprometheusremotewriteexporter/factory_test.go +++ b/exporter/awsprometheusremotewriteexporter/factory_test.go @@ -22,16 +22,16 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtls" "go.uber.org/zap" ) func TestType(t *testing.T) { af := NewFactory() - assert.Equal(t, af.Type(), configmodels.Type(typeStr)) + assert.Equal(t, af.Type(), config.Type(typeStr)) } //Tests whether or not the default Exporter factory can instantiate a properly interfaced Exporter with default conditions @@ -73,7 +73,7 @@ func TestCreateMetricsExporter(t *testing.T) { tests := []struct { name string - cfg configmodels.Exporter + cfg config.Exporter params component.ExporterCreateParams returnError bool }{ diff --git a/exporter/awsprometheusremotewriteexporter/go.mod b/exporter/awsprometheusremotewriteexporter/go.mod index fb426c327f88e..19b08123747ef 100644 --- a/exporter/awsprometheusremotewriteexporter/go.mod +++ b/exporter/awsprometheusremotewriteexporter/go.mod @@ -13,7 +13,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/exporter/awsprometheusremotewriteexporter/go.sum b/exporter/awsprometheusremotewriteexporter/go.sum index d24c2670af964..9b7498ff040fd 100644 --- a/exporter/awsprometheusremotewriteexporter/go.sum +++ b/exporter/awsprometheusremotewriteexporter/go.sum @@ -826,7 +826,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -992,7 +991,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1051,8 +1049,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/awsxrayexporter/awsxray.go b/exporter/awsxrayexporter/awsxray.go index 705f2616f334b..e7a8ee1a008bc 100644 --- a/exporter/awsxrayexporter/awsxray.go +++ b/exporter/awsxrayexporter/awsxray.go @@ -20,7 +20,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/xray" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -36,7 +36,7 @@ const ( // newTraceExporter creates an component.TraceExporter that converts to an X-Ray PutTraceSegments // request and then posts the request to the configured region's X-Ray endpoint. func newTraceExporter( - config configmodels.Exporter, params component.ExporterCreateParams, cn connAttr) (component.TracesExporter, error) { + config config.Exporter, params component.ExporterCreateParams, cn connAttr) (component.TracesExporter, error) { typeLog := zap.String("type", string(config.Type())) nameLog := zap.String("name", config.Name()) logger := params.Logger diff --git a/exporter/awsxrayexporter/config.go b/exporter/awsxrayexporter/config.go index bd2f8813aa575..551474f2f8fc3 100644 --- a/exporter/awsxrayexporter/config.go +++ b/exporter/awsxrayexporter/config.go @@ -14,11 +14,11 @@ package awsxrayexporter -import "go.opentelemetry.io/collector/config/configmodels" +import "go.opentelemetry.io/collector/config" // Config defines configuration for AWS X-Ray exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // Maximum number of concurrent calls to AWS X-Ray to upload documents. NumberOfWorkers int `mapstructure:"num_workers"` // X-Ray service endpoint to which the collector sends segment documents. diff --git a/exporter/awsxrayexporter/config_test.go b/exporter/awsxrayexporter/config_test.go index daca4442c9121..f4bda39f63c21 100644 --- a/exporter/awsxrayexporter/config_test.go +++ b/exporter/awsxrayexporter/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -30,7 +30,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -46,7 +46,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Exporters["awsxray/customname"].(*Config) assert.Equal(t, r1, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "awsxray/customname"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "awsxray/customname"}, NumberOfWorkers: 8, Endpoint: "", RequestTimeoutSeconds: 30, diff --git a/exporter/awsxrayexporter/factory.go b/exporter/awsxrayexporter/factory.go index f31e9d3d06ce9..1320a3df502a9 100644 --- a/exporter/awsxrayexporter/factory.go +++ b/exporter/awsxrayexporter/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -35,10 +35,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithTraces(createTraceExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, NumberOfWorkers: 8, @@ -57,7 +57,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { eCfg := cfg.(*Config) return newTraceExporter(eCfg, params, &Conn{}) diff --git a/exporter/awsxrayexporter/factory_test.go b/exporter/awsxrayexporter/factory_test.go index 9dfa8cf5897d9..c84b58b5245ef 100644 --- a/exporter/awsxrayexporter/factory_test.go +++ b/exporter/awsxrayexporter/factory_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" ) @@ -33,8 +33,8 @@ func TestCreateDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() assert.Equal(t, cfg, &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, NumberOfWorkers: 8, @@ -57,7 +57,7 @@ func TestCreateTraceExporter(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -75,7 +75,7 @@ func TestCreateMetricsExporter(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) diff --git a/exporter/awsxrayexporter/go.mod b/exporter/awsxrayexporter/go.mod index 0fe3c9caf890a..828880e489772 100644 --- a/exporter/awsxrayexporter/go.mod +++ b/exporter/awsxrayexporter/go.mod @@ -14,7 +14,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/awsxray v0.0.0-00010101000000-000000000000 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 golang.org/x/net v0.0.0-20210119194325-5f4716e94777 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/awsxrayexporter/go.sum b/exporter/awsxrayexporter/go.sum index d24c2670af964..9b7498ff040fd 100644 --- a/exporter/awsxrayexporter/go.sum +++ b/exporter/awsxrayexporter/go.sum @@ -826,7 +826,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -992,7 +991,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1051,8 +1049,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/azuremonitorexporter/config.go b/exporter/azuremonitorexporter/config.go index e3d6f3fe16048..56496a0fbc5d6 100644 --- a/exporter/azuremonitorexporter/config.go +++ b/exporter/azuremonitorexporter/config.go @@ -17,15 +17,15 @@ package azuremonitorexporter import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config defines configuration for Azure Monitor type Config struct { // squash ensures fields are correctly decoded in embedded struct. - configmodels.ExporterSettings `mapstructure:",squash"` - Endpoint string `mapstructure:"endpoint"` - InstrumentationKey string `mapstructure:"instrumentation_key"` - MaxBatchSize int `mapstructure:"maxbatchsize"` - MaxBatchInterval time.Duration `mapstructure:"maxbatchinterval"` + config.ExporterSettings `mapstructure:",squash"` + Endpoint string `mapstructure:"endpoint"` + InstrumentationKey string `mapstructure:"instrumentation_key"` + MaxBatchSize int `mapstructure:"maxbatchsize"` + MaxBatchInterval time.Duration `mapstructure:"maxbatchinterval"` } diff --git a/exporter/azuremonitorexporter/config_test.go b/exporter/azuremonitorexporter/config_test.go index c37393aaa2979..e1a382d441663 100644 --- a/exporter/azuremonitorexporter/config_test.go +++ b/exporter/azuremonitorexporter/config_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" ) @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -52,7 +52,7 @@ func TestLoadConfig(t *testing.T) { assert.Equal( t, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: exporterType}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: exporterType}, Endpoint: defaultEndpoint, InstrumentationKey: "abcdefg", MaxBatchSize: 100, diff --git a/exporter/azuremonitorexporter/factory.go b/exporter/azuremonitorexporter/factory.go index e5a0c2d279230..014a55ea5f35c 100644 --- a/exporter/azuremonitorexporter/factory.go +++ b/exporter/azuremonitorexporter/factory.go @@ -21,7 +21,7 @@ import ( "github.com/microsoft/ApplicationInsights-Go/appinsights" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" ) @@ -50,10 +50,10 @@ type factory struct { tChannel transportChannel } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Endpoint: defaultEndpoint, @@ -65,7 +65,7 @@ func createDefaultConfig() configmodels.Exporter { func (f *factory) createTraceExporter( ctx context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { exporterConfig, ok := cfg.(*Config) diff --git a/exporter/azuremonitorexporter/factory_test.go b/exporter/azuremonitorexporter/factory_test.go index d88120601ec25..5b71b99227a34 100644 --- a/exporter/azuremonitorexporter/factory_test.go +++ b/exporter/azuremonitorexporter/factory_test.go @@ -20,13 +20,13 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.uber.org/zap" ) // An inappropriate config type badConfig struct { - configmodels.ExporterSettings `mapstructure:",squash"` + config.ExporterSettings `mapstructure:",squash"` } func TestCreateTraceExporterUsingSpecificTransportChannel(t *testing.T) { diff --git a/exporter/azuremonitorexporter/go.mod b/exporter/azuremonitorexporter/go.mod index 487edfd3a208b..0c4908e397a89 100644 --- a/exporter/azuremonitorexporter/go.mod +++ b/exporter/azuremonitorexporter/go.mod @@ -15,7 +15,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 github.com/tedsuo/ifrit v0.0.0-20191009134036-9a97d0632f00 // indirect - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 golang.org/x/net v0.0.0-20210119194325-5f4716e94777 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/azuremonitorexporter/go.sum b/exporter/azuremonitorexporter/go.sum index 537d9f867edb6..bb55074fcdb93 100644 --- a/exporter/azuremonitorexporter/go.sum +++ b/exporter/azuremonitorexporter/go.sum @@ -833,7 +833,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1002,7 +1001,6 @@ github.com/tedsuo/ifrit v0.0.0-20191009134036-9a97d0632f00 h1:mujcChM89zOHwgZBBN github.com/tedsuo/ifrit v0.0.0-20191009134036-9a97d0632f00/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1061,8 +1059,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/carbonexporter/config.go b/exporter/carbonexporter/config.go index 80559dc94d81f..7f44c567e0e38 100644 --- a/exporter/carbonexporter/config.go +++ b/exporter/carbonexporter/config.go @@ -17,7 +17,7 @@ package carbonexporter import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Defaults for not specified configuration settings. @@ -28,7 +28,7 @@ const ( // Config defines configuration for Carbon exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // Endpoint specifies host and port to send metrics in the Carbon plaintext // format. The default value is defined by the DefaultEndpoint constant. diff --git a/exporter/carbonexporter/config_test.go b/exporter/carbonexporter/config_test.go index cdae1503402fa..dd7bd2b175592 100644 --- a/exporter/carbonexporter/config_test.go +++ b/exporter/carbonexporter/config_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" ) @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -49,8 +49,8 @@ func TestLoadConfig(t *testing.T) { e1 := cfg.Exporters[expectedName] expectedCfg := Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: expectedName, }, Endpoint: "localhost:8080", diff --git a/exporter/carbonexporter/factory.go b/exporter/carbonexporter/factory.go index f7fa360a5a11c..c2da0829002b1 100644 --- a/exporter/carbonexporter/factory.go +++ b/exporter/carbonexporter/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -35,10 +35,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithMetrics(createMetricsExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Endpoint: DefaultEndpoint, @@ -49,7 +49,7 @@ func createDefaultConfig() configmodels.Exporter { func createMetricsExporter( _ context.Context, params component.ExporterCreateParams, - config configmodels.Exporter, + config config.Exporter, ) (component.MetricsExporter, error) { exp, err := newCarbonExporter(config.(*Config), params) diff --git a/exporter/carbonexporter/go.mod b/exporter/carbonexporter/go.mod index e444d1445f7be..6a0eb6ba66040 100644 --- a/exporter/carbonexporter/go.mod +++ b/exporter/carbonexporter/go.mod @@ -13,7 +13,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/carbonexporter/go.sum b/exporter/carbonexporter/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/exporter/carbonexporter/go.sum +++ b/exporter/carbonexporter/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/datadogexporter/config/config.go b/exporter/datadogexporter/config/config.go index 7e4a159834920..50452d30f6846 100644 --- a/exporter/datadogexporter/config/config.go +++ b/exporter/datadogexporter/config/config.go @@ -20,7 +20,7 @@ import ( "strings" "sync" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metadata/valid" @@ -146,7 +146,7 @@ func (t *TagsConfig) GetHostTags() []string { // Config defines configuration for the Datadog exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. TagsConfig `mapstructure:",squash"` diff --git a/exporter/datadogexporter/factory.go b/exporter/datadogexporter/factory.go index 9b690a785090e..9bd8218d3e0d3 100644 --- a/exporter/datadogexporter/factory.go +++ b/exporter/datadogexporter/factory.go @@ -18,12 +18,12 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config" + ddconfig "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metadata" ) @@ -43,19 +43,19 @@ func NewFactory() component.ExporterFactory { } // createDefaultConfig creates the default exporter configuration -func createDefaultConfig() configmodels.Exporter { - return &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), +func createDefaultConfig() config.Exporter { + return &ddconfig.Config{ + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, - API: config.APIConfig{ + API: ddconfig.APIConfig{ Key: "$DD_API_KEY", // Must be set if using API Site: "$DD_SITE", // If not provided, set during config sanitization }, - TagsConfig: config.TagsConfig{ + TagsConfig: ddconfig.TagsConfig{ Hostname: "$DD_HOST", Env: "$DD_ENV", Service: "$DD_SERVICE", @@ -63,18 +63,18 @@ func createDefaultConfig() configmodels.Exporter { EnvVarTags: "$DD_TAGS", // Only taken into account if Tags is not set }, - Metrics: config.MetricsConfig{ + Metrics: ddconfig.MetricsConfig{ TCPAddr: confignet.TCPAddr{ Endpoint: "$DD_URL", // If not provided, set during config sanitization }, SendMonotonic: true, DeltaTTL: 3600, - ExporterConfig: config.MetricsExporterConfig{ + ExporterConfig: ddconfig.MetricsExporterConfig{ ResourceAttributesAsTags: false, }, }, - Traces: config.TracesConfig{ + Traces: ddconfig.TracesConfig{ SampleRate: 1, TCPAddr: confignet.TCPAddr{ Endpoint: "$DD_APM_URL", // If not provided, set during config sanitization @@ -90,10 +90,10 @@ func createDefaultConfig() configmodels.Exporter { func createMetricsExporter( ctx context.Context, params component.ExporterCreateParams, - c configmodels.Exporter, + c config.Exporter, ) (component.MetricsExporter, error) { - cfg := c.(*config.Config) + cfg := c.(*ddconfig.Config) params.Logger.Info("sanitizing Datadog metrics exporter configuration") if err := cfg.Sanitize(); err != nil { @@ -140,10 +140,10 @@ func createMetricsExporter( func createTraceExporter( ctx context.Context, params component.ExporterCreateParams, - c configmodels.Exporter, + c config.Exporter, ) (component.TracesExporter, error) { - cfg := c.(*config.Config) + cfg := c.(*ddconfig.Config) params.Logger.Info("sanitizing Datadog metrics exporter configuration") if err := cfg.Sanitize(); err != nil { diff --git a/exporter/datadogexporter/factory_test.go b/exporter/datadogexporter/factory_test.go index 60970a29378c9..392ce2ecb20fc 100644 --- a/exporter/datadogexporter/factory_test.go +++ b/exporter/datadogexporter/factory_test.go @@ -25,13 +25,13 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config" + ddconfig "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/metadata" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/testutils" ) @@ -43,18 +43,18 @@ func TestCreateDefaultConfig(t *testing.T) { // Note: the default configuration created by CreateDefaultConfig // still has the unresolved environment variables. - assert.Equal(t, &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + assert.Equal(t, &ddconfig.Config{ + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, - API: config.APIConfig{ + API: ddconfig.APIConfig{ Key: "$DD_API_KEY", Site: "$DD_SITE", }, - Metrics: config.MetricsConfig{ + Metrics: ddconfig.MetricsConfig{ TCPAddr: confignet.TCPAddr{ Endpoint: "$DD_URL", }, @@ -62,14 +62,14 @@ func TestCreateDefaultConfig(t *testing.T) { SendMonotonic: true, }, - Traces: config.TracesConfig{ + Traces: ddconfig.TracesConfig{ SampleRate: 1, TCPAddr: confignet.TCPAddr{ Endpoint: "$DD_APM_URL", }, }, - TagsConfig: config.TagsConfig{ + TagsConfig: ddconfig.TagsConfig{ Hostname: "$DD_HOST", Env: "$DD_ENV", Service: "$DD_SERVICE", @@ -97,17 +97,17 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) require.NotNil(t, cfg) - apiConfig := cfg.Exporters["datadog/api"].(*config.Config) + apiConfig := cfg.Exporters["datadog/api"].(*ddconfig.Config) err = apiConfig.Sanitize() require.NoError(t, err) - assert.Equal(t, &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ + assert.Equal(t, &ddconfig.Config{ + ExporterSettings: config.ExporterSettings{ NameVal: "datadog/api", TypeVal: typeStr, }, - TagsConfig: config.TagsConfig{ + TagsConfig: ddconfig.TagsConfig{ Hostname: "customhostname", Env: "prod", Service: "myservice", @@ -116,12 +116,12 @@ func TestLoadConfig(t *testing.T) { Tags: []string{"example:tag"}, }, - API: config.APIConfig{ + API: ddconfig.APIConfig{ Key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", Site: "datadoghq.eu", }, - Metrics: config.MetricsConfig{ + Metrics: ddconfig.MetricsConfig{ TCPAddr: confignet.TCPAddr{ Endpoint: "https://api.datadoghq.eu", }, @@ -129,7 +129,7 @@ func TestLoadConfig(t *testing.T) { SendMonotonic: true, }, - Traces: config.TracesConfig{ + Traces: ddconfig.TracesConfig{ SampleRate: 1, TCPAddr: confignet.TCPAddr{ Endpoint: "https://trace.agent.datadoghq.eu", @@ -140,17 +140,17 @@ func TestLoadConfig(t *testing.T) { UseResourceMetadata: true, }, apiConfig) - defaultConfig := cfg.Exporters["datadog/default"].(*config.Config) + defaultConfig := cfg.Exporters["datadog/default"].(*ddconfig.Config) err = defaultConfig.Sanitize() require.NoError(t, err) - assert.Equal(t, &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ + assert.Equal(t, &ddconfig.Config{ + ExporterSettings: config.ExporterSettings{ NameVal: "datadog/default", TypeVal: typeStr, }, - TagsConfig: config.TagsConfig{ + TagsConfig: ddconfig.TagsConfig{ Hostname: "", Env: "none", Service: "", @@ -158,12 +158,12 @@ func TestLoadConfig(t *testing.T) { EnvVarTags: "", }, - API: config.APIConfig{ + API: ddconfig.APIConfig{ Key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", Site: "datadoghq.com", }, - Metrics: config.MetricsConfig{ + Metrics: ddconfig.MetricsConfig{ TCPAddr: confignet.TCPAddr{ Endpoint: "https://api.datadoghq.com", }, @@ -171,7 +171,7 @@ func TestLoadConfig(t *testing.T) { DeltaTTL: 3600, }, - Traces: config.TracesConfig{ + Traces: ddconfig.TracesConfig{ SampleRate: 1, TCPAddr: confignet.TCPAddr{ Endpoint: "https://trace.agent.datadoghq.com", @@ -182,7 +182,7 @@ func TestLoadConfig(t *testing.T) { UseResourceMetadata: true, }, defaultConfig) - invalidConfig := cfg.Exporters["datadog/invalid"].(*config.Config) + invalidConfig := cfg.Exporters["datadog/invalid"].(*ddconfig.Config) err = invalidConfig.Sanitize() require.Error(t, err) } @@ -222,18 +222,18 @@ func TestLoadConfigEnvVariables(t *testing.T) { require.NoError(t, err) require.NotNil(t, cfg) - apiConfig := cfg.Exporters["datadog/api2"].(*config.Config) + apiConfig := cfg.Exporters["datadog/api2"].(*ddconfig.Config) err = apiConfig.Sanitize() // Check that settings with env variables get overridden when explicitly set in config require.NoError(t, err) - assert.Equal(t, &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ + assert.Equal(t, &ddconfig.Config{ + ExporterSettings: config.ExporterSettings{ NameVal: "datadog/api2", TypeVal: typeStr, }, - TagsConfig: config.TagsConfig{ + TagsConfig: ddconfig.TagsConfig{ Hostname: "customhostname", Env: "prod", Service: "myservice", @@ -242,12 +242,12 @@ func TestLoadConfigEnvVariables(t *testing.T) { Tags: []string{"example:tag"}, }, - API: config.APIConfig{ + API: ddconfig.APIConfig{ Key: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", Site: "datadoghq.eu", }, - Metrics: config.MetricsConfig{ + Metrics: ddconfig.MetricsConfig{ TCPAddr: confignet.TCPAddr{ Endpoint: "https://api.datadoghq.test", }, @@ -255,7 +255,7 @@ func TestLoadConfigEnvVariables(t *testing.T) { DeltaTTL: 3600, }, - Traces: config.TracesConfig{ + Traces: ddconfig.TracesConfig{ SampleRate: 1, TCPAddr: confignet.TCPAddr{ Endpoint: "https://trace.agent.datadoghq.test", @@ -266,20 +266,20 @@ func TestLoadConfigEnvVariables(t *testing.T) { UseResourceMetadata: true, }, apiConfig) - defaultConfig := cfg.Exporters["datadog/default2"].(*config.Config) + defaultConfig := cfg.Exporters["datadog/default2"].(*ddconfig.Config) err = defaultConfig.Sanitize() require.NoError(t, err) // Check that settings with env variables get taken into account when // no settings are given. - assert.Equal(t, &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ + assert.Equal(t, &ddconfig.Config{ + ExporterSettings: config.ExporterSettings{ NameVal: "datadog/default2", TypeVal: typeStr, }, - TagsConfig: config.TagsConfig{ + TagsConfig: ddconfig.TagsConfig{ Hostname: "testhost", Env: "testenv", Service: "testservice", @@ -287,12 +287,12 @@ func TestLoadConfigEnvVariables(t *testing.T) { EnvVarTags: "envexample:tag envexample2:tag", }, - API: config.APIConfig{ + API: ddconfig.APIConfig{ Key: "replacedapikey", Site: "datadoghq.test", }, - Metrics: config.MetricsConfig{ + Metrics: ddconfig.MetricsConfig{ TCPAddr: confignet.TCPAddr{ Endpoint: "https://api.datadoghq.com", }, @@ -300,7 +300,7 @@ func TestLoadConfigEnvVariables(t *testing.T) { DeltaTTL: 3600, }, - Traces: config.TracesConfig{ + Traces: ddconfig.TracesConfig{ SampleRate: 1, TCPAddr: confignet.TCPAddr{ Endpoint: "https://trace.agent.datadoghq.com", @@ -322,14 +322,14 @@ func TestCreateAPIMetricsExporter(t *testing.T) { require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) require.NotNil(t, cfg) // Use the mock server for API key validation - c := (cfg.Exporters["datadog/api"]).(*config.Config) + c := (cfg.Exporters["datadog/api"]).(*ddconfig.Config) c.Metrics.TCPAddr.Endpoint = server.URL c.SendMetadata = false cfg.Exporters["datadog/api"] = c @@ -355,14 +355,14 @@ func TestCreateAPITracesExporter(t *testing.T) { require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) require.NotNil(t, cfg) // Use the mock server for API key validation - c := (cfg.Exporters["datadog/api"]).(*config.Config) + c := (cfg.Exporters["datadog/api"]).(*ddconfig.Config) c.Metrics.TCPAddr.Endpoint = server.URL c.SendMetadata = false @@ -386,13 +386,13 @@ func TestOnlyMetadata(t *testing.T) { require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory ctx := context.Background() - cfg := &config.Config{ - API: config.APIConfig{Key: "notnull"}, - Metrics: config.MetricsConfig{TCPAddr: confignet.TCPAddr{Endpoint: server.URL}}, - Traces: config.TracesConfig{TCPAddr: confignet.TCPAddr{Endpoint: server.URL}}, + cfg := &ddconfig.Config{ + API: ddconfig.APIConfig{Key: "notnull"}, + Metrics: ddconfig.MetricsConfig{TCPAddr: confignet.TCPAddr{Endpoint: server.URL}}, + Traces: ddconfig.TracesConfig{TCPAddr: confignet.TCPAddr{Endpoint: server.URL}}, SendMetadata: true, OnlyMetadata: true, diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index 122de0aafb28a..ab0db288e2c40 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -19,7 +19,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 github.com/zorkian/go-datadog-api v2.29.0+incompatible // indirect - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/DataDog/dd-trace-go.v1 v1.29.1 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/datadogexporter/go.sum b/exporter/datadogexporter/go.sum index ea5ccb1ea58b2..53037d279e7bc 100644 --- a/exporter/datadogexporter/go.sum +++ b/exporter/datadogexporter/go.sum @@ -1083,8 +1083,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/dynatraceexporter/config/config.go b/exporter/dynatraceexporter/config/config.go index eb66897018172..857b37fd423a5 100644 --- a/exporter/dynatraceexporter/config/config.go +++ b/exporter/dynatraceexporter/config/config.go @@ -19,14 +19,14 @@ import ( "fmt" "strings" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for the Dynatrace exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. confighttp.HTTPClientSettings `mapstructure:",squash"` exporterhelper.QueueSettings `mapstructure:"sending_queue"` diff --git a/exporter/dynatraceexporter/config/config_test.go b/exporter/dynatraceexporter/config/config_test.go index 209d2537025b6..21f516f0a0cfe 100644 --- a/exporter/dynatraceexporter/config/config_test.go +++ b/exporter/dynatraceexporter/config/config_test.go @@ -17,13 +17,13 @@ package config import ( "testing" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" ) func TestConfig_Sanitize(t *testing.T) { type fields struct { - ExporterSettings configmodels.ExporterSettings + ExporterSettings config.ExporterSettings APIToken string Endpoint string Tags []string diff --git a/exporter/dynatraceexporter/factory.go b/exporter/dynatraceexporter/factory.go index 3f0fe27517078..ee3c5207f96d1 100644 --- a/exporter/dynatraceexporter/factory.go +++ b/exporter/dynatraceexporter/factory.go @@ -18,11 +18,11 @@ import ( "context" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter/config" + dtconfig "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter/config" ) const ( @@ -40,10 +40,10 @@ func NewFactory() component.ExporterFactory { } // createDefaultConfig creates the default exporter configuration -func createDefaultConfig() configmodels.Exporter { - return &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), +func createDefaultConfig() config.Exporter { + return &dtconfig.Config{ + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, RetrySettings: exporterhelper.DefaultRetrySettings(), @@ -63,10 +63,10 @@ func createDefaultConfig() configmodels.Exporter { func createMetricsExporter( ctx context.Context, params component.ExporterCreateParams, - c configmodels.Exporter, + c config.Exporter, ) (component.MetricsExporter, error) { - cfg := c.(*config.Config) + cfg := c.(*dtconfig.Config) if err := cfg.Sanitize(); err != nil { return nil, err diff --git a/exporter/dynatraceexporter/factory_test.go b/exporter/dynatraceexporter/factory_test.go index d37d71c9e7cac..a1e97aaae1540 100644 --- a/exporter/dynatraceexporter/factory_test.go +++ b/exporter/dynatraceexporter/factory_test.go @@ -23,14 +23,14 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter/config" + dtconfig "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter/config" ) // Test that the factory creates the default configuration @@ -38,9 +38,9 @@ func TestCreateDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() - assert.Equal(t, &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + assert.Equal(t, &dtconfig.Config{ + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, RetrySettings: exporterhelper.DefaultRetrySettings(), @@ -67,12 +67,12 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) require.NotNil(t, cfg) - apiConfig := cfg.Exporters["dynatrace/valid"].(*config.Config) + apiConfig := cfg.Exporters["dynatrace/valid"].(*dtconfig.Config) err = apiConfig.Sanitize() require.NoError(t, err) - assert.Equal(t, &config.Config{ - ExporterSettings: configmodels.ExporterSettings{ + assert.Equal(t, &dtconfig.Config{ + ExporterSettings: config.ExporterSettings{ NameVal: "dynatrace/valid", TypeVal: typeStr, }, @@ -94,7 +94,7 @@ func TestLoadConfig(t *testing.T) { Tags: []string{"example=tag"}, }, apiConfig) - invalidConfig2 := cfg.Exporters["dynatrace/invalid"].(*config.Config) + invalidConfig2 := cfg.Exporters["dynatrace/invalid"].(*dtconfig.Config) err = invalidConfig2.Sanitize() require.Error(t, err) } @@ -106,13 +106,13 @@ func TestCreateAPIMetricsExporter(t *testing.T) { require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yml"), factories) require.NoError(t, err) require.NotNil(t, cfg) - c := (cfg.Exporters["dynatrace/valid"]).(*config.Config) + c := (cfg.Exporters["dynatrace/valid"]).(*dtconfig.Config) cfg.Exporters["dynatrace/valid"] = c ctx := context.Background() @@ -133,13 +133,13 @@ func TestCreateAPIMetricsExporterInvalid(t *testing.T) { require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yml"), factories) require.NoError(t, err) require.NotNil(t, cfg) - c := (cfg.Exporters["dynatrace/invalid"]).(*config.Config) + c := (cfg.Exporters["dynatrace/invalid"]).(*dtconfig.Config) cfg.Exporters["dynatrace/invalid"] = c ctx := context.Background() diff --git a/exporter/dynatraceexporter/go.mod b/exporter/dynatraceexporter/go.mod index 8b58cf46f8f00..8b52c0aff5a68 100644 --- a/exporter/dynatraceexporter/go.mod +++ b/exporter/dynatraceexporter/go.mod @@ -12,7 +12,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/exporter/dynatraceexporter/go.sum b/exporter/dynatraceexporter/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/exporter/dynatraceexporter/go.sum +++ b/exporter/dynatraceexporter/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/elasticexporter/config.go b/exporter/elasticexporter/config.go index fd467bab825a0..1503623c47bfe 100644 --- a/exporter/elasticexporter/config.go +++ b/exporter/elasticexporter/config.go @@ -17,14 +17,14 @@ package elasticexporter import ( "errors" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtls" ) // Config defines configuration for Elastic APM exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` - configtls.TLSClientSetting `mapstructure:",squash"` + config.ExporterSettings `mapstructure:",squash"` + configtls.TLSClientSetting `mapstructure:",squash"` // APMServerURLs holds the APM Server URL. // diff --git a/exporter/elasticexporter/config_test.go b/exporter/elasticexporter/config_test.go index 3fd6e0e9237b1..a2e22f4d14567 100644 --- a/exporter/elasticexporter/config_test.go +++ b/exporter/elasticexporter/config_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/consumer/pdata" "go.uber.org/zap" @@ -37,7 +37,7 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -51,7 +51,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Exporters["elastic/customname"].(*Config) assert.Equal(t, r1, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "elastic/customname"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "elastic/customname"}, APMServerURL: "https://elastic.example.com", APIKey: "RTNxMjlXNEJt", SecretToken: "hunter2", diff --git a/exporter/elasticexporter/exporter.go b/exporter/elasticexporter/exporter.go index 3765f6c64c716..0e2d29ddb20e0 100644 --- a/exporter/elasticexporter/exporter.go +++ b/exporter/elasticexporter/exporter.go @@ -27,7 +27,7 @@ import ( "go.elastic.co/apm/transport" "go.elastic.co/fastjson" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -38,7 +38,7 @@ import ( func newElasticTraceExporter( params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { exporter, err := newElasticExporter(cfg.(*Config), params.Logger) if err != nil { @@ -60,7 +60,7 @@ func newElasticTraceExporter( func newElasticMetricsExporter( params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.MetricsExporter, error) { exporter, err := newElasticExporter(cfg.(*Config), params.Logger) if err != nil { diff --git a/exporter/elasticexporter/factory.go b/exporter/elasticexporter/factory.go index 43e317efb9893..0afe3dad476ef 100644 --- a/exporter/elasticexporter/factory.go +++ b/exporter/elasticexporter/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -37,10 +37,10 @@ func NewFactory() component.ExporterFactory { ) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, } @@ -49,7 +49,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( ctx context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { return newElasticTraceExporter(params, cfg) } @@ -57,7 +57,7 @@ func createTraceExporter( func createMetricsExporter( ctx context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.MetricsExporter, error) { return newElasticMetricsExporter(params, cfg) } diff --git a/exporter/elasticexporter/go.mod b/exporter/elasticexporter/go.mod index 6f7c02f05b3e2..b3be31bb3920d 100644 --- a/exporter/elasticexporter/go.mod +++ b/exporter/elasticexporter/go.mod @@ -16,7 +16,7 @@ require ( github.com/stretchr/testify v1.7.0 go.elastic.co/apm v1.9.1-0.20201218004853-18a8126106c6 go.elastic.co/fastjson v1.1.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect howett.net/plist v0.0.0-20201026045517-117a925f2150 // indirect diff --git a/exporter/elasticexporter/go.sum b/exporter/elasticexporter/go.sum index 940664d383d8d..1a0e4ac723490 100644 --- a/exporter/elasticexporter/go.sum +++ b/exporter/elasticexporter/go.sum @@ -836,7 +836,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1006,7 +1005,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1069,8 +1067,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/elasticsearchexporter/config.go b/exporter/elasticsearchexporter/config.go index a6c3b73f87ef6..b35f619c3693b 100644 --- a/exporter/elasticsearchexporter/config.go +++ b/exporter/elasticsearchexporter/config.go @@ -21,13 +21,13 @@ import ( "strings" "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtls" ) // Config defines configuration for Elastic exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` + config.ExporterSettings `mapstructure:",squash"` // Endpoints holds the Elasticsearch URLs the exporter should send events to. // diff --git a/exporter/elasticsearchexporter/config_test.go b/exporter/elasticsearchexporter/config_test.go index 805cfeec68d0c..895f9fe7eefee 100644 --- a/exporter/elasticsearchexporter/config_test.go +++ b/exporter/elasticsearchexporter/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -31,7 +31,7 @@ func TestLoadConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -45,7 +45,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Exporters["elasticsearch/customname"].(*Config) assert.Equal(t, r1, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "elasticsearch/customname"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "elasticsearch/customname"}, Endpoints: []string{"https://elastic.example.com:9200"}, CloudID: "TRNMxjXlNJEt", Index: "myindex", diff --git a/exporter/elasticsearchexporter/factory.go b/exporter/elasticsearchexporter/factory.go index 71d11e522f038..56a7a1463829b 100644 --- a/exporter/elasticsearchexporter/factory.go +++ b/exporter/elasticsearchexporter/factory.go @@ -20,7 +20,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -38,10 +38,10 @@ func NewFactory() component.ExporterFactory { ) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, HTTPClientSettings: HTTPClientSettings{ @@ -68,7 +68,7 @@ func createDefaultConfig() configmodels.Exporter { func createLogsExporter( ctx context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.LogsExporter, error) { exporter, err := newExporter(params.Logger, cfg.(*Config)) if err != nil { diff --git a/exporter/elasticsearchexporter/go.mod b/exporter/elasticsearchexporter/go.mod index 057e05dcf8ae7..3b4fc87788910 100644 --- a/exporter/elasticsearchexporter/go.mod +++ b/exporter/elasticsearchexporter/go.mod @@ -14,7 +14,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/exporter/elasticsearchexporter/go.sum b/exporter/elasticsearchexporter/go.sum index 0b605cc103a20..d6337ee6711f7 100644 --- a/exporter/elasticsearchexporter/go.sum +++ b/exporter/elasticsearchexporter/go.sum @@ -827,7 +827,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -993,7 +992,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1052,8 +1050,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/f5cloudexporter/config_test.go b/exporter/f5cloudexporter/config_test.go index c1420e327e90a..c37be4dddde4d 100644 --- a/exporter/f5cloudexporter/config_test.go +++ b/exporter/f5cloudexporter/config_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/exporterhelper" otlphttp "go.opentelemetry.io/collector/exporter/otlphttpexporter" @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -46,7 +46,7 @@ func TestLoadConfig(t *testing.T) { actualCfg := exporter.(*Config) expectedCfg := &Config{ Config: otlphttp.Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "f5cloud/allsettings", TypeVal: "f5cloud", }, @@ -88,7 +88,7 @@ func TestConfig_sanitize(t *testing.T) { const validSource = "tests" type fields struct { - ExporterSettings configmodels.ExporterSettings + ExporterSettings config.ExporterSettings Endpoint string Source string CredentialFile string diff --git a/exporter/f5cloudexporter/factory.go b/exporter/f5cloudexporter/factory.go index 0255f126255ad..7a4716fef2eb8 100644 --- a/exporter/f5cloudexporter/factory.go +++ b/exporter/f5cloudexporter/factory.go @@ -20,7 +20,7 @@ import ( "strings" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" otlphttp "go.opentelemetry.io/collector/exporter/otlphttpexporter" "golang.org/x/oauth2" "google.golang.org/api/idtoken" @@ -44,14 +44,14 @@ func NewFactoryWithTokenSourceGetter(tsg TokenSourceGetter) component.ExporterFa return &f5cloudFactory{ExporterFactory: otlphttp.NewFactory(), getTokenSource: tsg} } -func (f *f5cloudFactory) Type() configmodels.Type { +func (f *f5cloudFactory) Type() config.Type { return typeStr } func (f *f5cloudFactory) CreateMetricsExporter( ctx context.Context, params component.ExporterCreateParams, - config configmodels.Exporter) (component.MetricsExporter, error) { + config config.Exporter) (component.MetricsExporter, error) { cfg := config.(*Config) @@ -67,7 +67,7 @@ func (f *f5cloudFactory) CreateMetricsExporter( func (f *f5cloudFactory) CreateTracesExporter( ctx context.Context, params component.ExporterCreateParams, - config configmodels.Exporter) (component.TracesExporter, error) { + config config.Exporter) (component.TracesExporter, error) { cfg := config.(*Config) @@ -83,7 +83,7 @@ func (f *f5cloudFactory) CreateTracesExporter( func (f *f5cloudFactory) CreateLogsExporter( ctx context.Context, params component.ExporterCreateParams, - config configmodels.Exporter) (component.LogsExporter, error) { + config config.Exporter) (component.LogsExporter, error) { cfg := config.(*Config) @@ -96,7 +96,7 @@ func (f *f5cloudFactory) CreateLogsExporter( return f.ExporterFactory.CreateLogsExporter(ctx, params, &cfg.Config) } -func (f *f5cloudFactory) CreateDefaultConfig() configmodels.Exporter { +func (f *f5cloudFactory) CreateDefaultConfig() config.Exporter { cfg := &Config{ Config: *f.ExporterFactory.CreateDefaultConfig().(*otlphttp.Config), AuthConfig: AuthConfig{ diff --git a/exporter/f5cloudexporter/factory_test.go b/exporter/f5cloudexporter/factory_test.go index 03ec3aaa29e84..197be2eee7ebd 100644 --- a/exporter/f5cloudexporter/factory_test.go +++ b/exporter/f5cloudexporter/factory_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/testutil" "go.uber.org/zap" "golang.org/x/oauth2" @@ -31,7 +31,7 @@ import ( func TestFactory_TestType(t *testing.T) { f := NewFactory() - assert.Equal(t, f.Type(), configmodels.Type(typeStr)) + assert.Equal(t, f.Type(), config.Type(typeStr)) } func TestFactory_CreateDefaultConfig(t *testing.T) { diff --git a/exporter/f5cloudexporter/go.mod b/exporter/f5cloudexporter/go.mod index 2f10a43d30aad..2ffb8f7c6cb7b 100644 --- a/exporter/f5cloudexporter/go.mod +++ b/exporter/f5cloudexporter/go.mod @@ -12,7 +12,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84 google.golang.org/api v0.43.0 diff --git a/exporter/f5cloudexporter/go.sum b/exporter/f5cloudexporter/go.sum index 60682b7e8ecd9..50849acf14f54 100644 --- a/exporter/f5cloudexporter/go.sum +++ b/exporter/f5cloudexporter/go.sum @@ -830,7 +830,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -996,7 +995,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1055,8 +1053,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/googlecloudexporter/config.go b/exporter/googlecloudexporter/config.go index 8cb8ece80de4a..bab0f89073c5e 100644 --- a/exporter/googlecloudexporter/config.go +++ b/exporter/googlecloudexporter/config.go @@ -15,17 +15,17 @@ package googlecloudexporter import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "google.golang.org/api/option" ) // Config defines configuration for Google Cloud exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. - ProjectID string `mapstructure:"project"` - UserAgent string `mapstructure:"user_agent"` - Endpoint string `mapstructure:"endpoint"` + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + ProjectID string `mapstructure:"project"` + UserAgent string `mapstructure:"user_agent"` + Endpoint string `mapstructure:"endpoint"` // Only has effect if Endpoint is not "" UseInsecure bool `mapstructure:"use_insecure"` diff --git a/exporter/googlecloudexporter/config_test.go b/exporter/googlecloudexporter/config_test.go index f73c3ac665a9f..00cbabf336cd2 100644 --- a/exporter/googlecloudexporter/config_test.go +++ b/exporter/googlecloudexporter/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -48,7 +48,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Exporters["googlecloud/customname"].(*Config) assert.Equal(t, r1, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "googlecloud/customname"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "googlecloud/customname"}, ProjectID: "my-project", UserAgent: "opentelemetry-collector-contrib {{version}}", Endpoint: "test-endpoint", diff --git a/exporter/googlecloudexporter/factory.go b/exporter/googlecloudexporter/factory.go index 1c3c757989d76..ad3bbb3ec6cce 100644 --- a/exporter/googlecloudexporter/factory.go +++ b/exporter/googlecloudexporter/factory.go @@ -21,7 +21,7 @@ import ( "go.opencensus.io/stats/view" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -49,10 +49,10 @@ func NewFactory() component.ExporterFactory { } // createDefaultConfig creates the default configuration for exporter. -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, TimeoutSettings: exporterhelper.TimeoutSettings{Timeout: defaultTimeout}, @@ -66,7 +66,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter) (component.TracesExporter, error) { + cfg config.Exporter) (component.TracesExporter, error) { eCfg := cfg.(*Config) return newGoogleCloudTraceExporter(eCfg, params) } @@ -75,7 +75,7 @@ func createTraceExporter( func createMetricsExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter) (component.MetricsExporter, error) { + cfg config.Exporter) (component.MetricsExporter, error) { eCfg := cfg.(*Config) return newGoogleCloudMetricsExporter(eCfg, params) } diff --git a/exporter/googlecloudexporter/go.mod b/exporter/googlecloudexporter/go.mod index 147290ef99436..5f464ed2c2549 100644 --- a/exporter/googlecloudexporter/go.mod +++ b/exporter/googlecloudexporter/go.mod @@ -16,7 +16,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.opentelemetry.io/otel v0.19.0 go.opentelemetry.io/otel/sdk v0.19.0 go.opentelemetry.io/otel/trace v0.19.0 diff --git a/exporter/googlecloudexporter/go.sum b/exporter/googlecloudexporter/go.sum index 73def8129a777..b77b5c82a34ea 100644 --- a/exporter/googlecloudexporter/go.sum +++ b/exporter/googlecloudexporter/go.sum @@ -838,7 +838,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1004,7 +1003,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1063,8 +1061,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.opentelemetry.io/otel v0.19.0 h1:Lenfy7QHRXPZVsw/12CWpxX6d/JkrX8wrx2vO8G80Ng= go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg= go.opentelemetry.io/otel/metric v0.19.0 h1:dtZ1Ju44gkJkYvo+3qGqVXmf88tc+a42edOywypengg= diff --git a/exporter/honeycombexporter/config.go b/exporter/honeycombexporter/config.go index 1fdc00173d360..29e1319290202 100644 --- a/exporter/honeycombexporter/config.go +++ b/exporter/honeycombexporter/config.go @@ -14,10 +14,10 @@ package honeycombexporter -import "go.opentelemetry.io/collector/config/configmodels" +import "go.opentelemetry.io/collector/config" type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // APIKey is the authentication token associated with the Honeycomb account. APIKey string `mapstructure:"api_key"` // Dataset is the Honeycomb dataset to send events to. diff --git a/exporter/honeycombexporter/config_test.go b/exporter/honeycombexporter/config_test.go index 3580ba7e0eca7..bd2c409946e46 100644 --- a/exporter/honeycombexporter/config_test.go +++ b/exporter/honeycombexporter/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -30,7 +30,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -45,7 +45,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Exporters["honeycomb/customname"].(*Config) assert.Equal(t, r1, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "honeycomb/customname"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "honeycomb/customname"}, APIKey: "test-apikey", Dataset: "test-dataset", APIURL: "https://api.testhost.io", @@ -53,7 +53,7 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Exporters["honeycomb/sample_rate"].(*Config) assert.Equal(t, r2, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "honeycomb/sample_rate"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "honeycomb/sample_rate"}, APIURL: "https://api.honeycomb.io", SampleRate: 5, SampleRateAttribute: "custom.sample_rate", diff --git a/exporter/honeycombexporter/factory.go b/exporter/honeycombexporter/factory.go index c76644b41db65..3d22d74cdc17b 100644 --- a/exporter/honeycombexporter/factory.go +++ b/exporter/honeycombexporter/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -35,10 +35,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithTraces(createTraceExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, APIKey: "", @@ -52,7 +52,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { eCfg := cfg.(*Config) exporter, err := newHoneycombTraceExporter(eCfg, params.Logger) diff --git a/exporter/honeycombexporter/factory_test.go b/exporter/honeycombexporter/factory_test.go index 0a825995f8a70..621c87bfc26e9 100644 --- a/exporter/honeycombexporter/factory_test.go +++ b/exporter/honeycombexporter/factory_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" ) @@ -39,7 +39,7 @@ func TestCreateTraceExporter(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -55,7 +55,7 @@ func TestCreateMetricsExporter(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) diff --git a/exporter/honeycombexporter/go.mod b/exporter/honeycombexporter/go.mod index 53ea7ec3ad184..0649754fcb6c4 100644 --- a/exporter/honeycombexporter/go.mod +++ b/exporter/honeycombexporter/go.mod @@ -16,7 +16,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/honeycombexporter/go.sum b/exporter/honeycombexporter/go.sum index fc7761389e516..ee4b9df2f5837 100644 --- a/exporter/honeycombexporter/go.sum +++ b/exporter/honeycombexporter/go.sum @@ -843,7 +843,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1009,7 +1008,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1072,8 +1070,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/jaegerthrifthttpexporter/config.go b/exporter/jaegerthrifthttpexporter/config.go index 4661b9d69d9f0..dab76611fa33e 100644 --- a/exporter/jaegerthrifthttpexporter/config.go +++ b/exporter/jaegerthrifthttpexporter/config.go @@ -17,12 +17,12 @@ package jaegerthrifthttpexporter import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config defines configuration for Jaeger Thrift over HTTP exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // URL is the URL to send the Jaeger trace data to (e.g.: // http://some.url:14268/api/traces). diff --git a/exporter/jaegerthrifthttpexporter/config_test.go b/exporter/jaegerthrifthttpexporter/config_test.go index 2cc58367508f0..11ad357def57c 100644 --- a/exporter/jaegerthrifthttpexporter/config_test.go +++ b/exporter/jaegerthrifthttpexporter/config_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" ) @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -51,8 +51,8 @@ func TestLoadConfig(t *testing.T) { e1 := cfg.Exporters[expectedName] expectedCfg := Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: expectedName, }, URL: "http://some.other.location/api/traces", diff --git a/exporter/jaegerthrifthttpexporter/exporter.go b/exporter/jaegerthrifthttpexporter/exporter.go index 4c854d48db0fe..2cafaa689e526 100644 --- a/exporter/jaegerthrifthttpexporter/exporter.go +++ b/exporter/jaegerthrifthttpexporter/exporter.go @@ -25,7 +25,7 @@ import ( "github.com/apache/thrift/lib/go/thrift" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -44,7 +44,7 @@ const defaultHTTPTimeout = time.Second * 5 // The timeout is used to set the timeout for the HTTP requests, if the // value is equal or smaller than zero the default of 5 seconds is used. func newTraceExporter( - config configmodels.Exporter, + config config.Exporter, params component.ExporterCreateParams, httpAddress string, headers map[string]string, diff --git a/exporter/jaegerthrifthttpexporter/exporter_test.go b/exporter/jaegerthrifthttpexporter/exporter_test.go index a0b99bccadf32..57e880e5cec94 100644 --- a/exporter/jaegerthrifthttpexporter/exporter_test.go +++ b/exporter/jaegerthrifthttpexporter/exporter_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" "go.uber.org/zap" ) @@ -30,7 +30,7 @@ import ( const testHTTPAddress = "http://a.test.dom:123/at/some/path" type args struct { - config configmodels.Exporter + config config.Exporter httpAddress string headers map[string]string timeout time.Duration @@ -38,7 +38,7 @@ type args struct { func TestNew(t *testing.T) { ar := args{ - config: &configmodels.ExporterSettings{}, + config: &config.ExporterSettings{}, httpAddress: testHTTPAddress, headers: map[string]string{"test": "test"}, timeout: 10 * time.Nanosecond, diff --git a/exporter/jaegerthrifthttpexporter/factory.go b/exporter/jaegerthrifthttpexporter/factory.go index b74abf00d2c0b..7452ae5cbb3f1 100644 --- a/exporter/jaegerthrifthttpexporter/factory.go +++ b/exporter/jaegerthrifthttpexporter/factory.go @@ -20,7 +20,7 @@ import ( "net/url" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" ) @@ -38,10 +38,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithTraces(createTraceExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Timeout: defaultHTTPTimeout, @@ -51,7 +51,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, _ component.ExporterCreateParams, - config configmodels.Exporter, + config config.Exporter, ) (component.TracesExporter, error) { expCfg := config.(*Config) diff --git a/exporter/jaegerthrifthttpexporter/factory_test.go b/exporter/jaegerthrifthttpexporter/factory_test.go index 9481d46ab60c6..c28669723bf1e 100644 --- a/exporter/jaegerthrifthttpexporter/factory_test.go +++ b/exporter/jaegerthrifthttpexporter/factory_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.uber.org/zap" ) @@ -55,8 +55,8 @@ func TestCreateInstanceViaFactory(t *testing.T) { func TestFactory_CreateTraceExporter(t *testing.T) { config := &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, URL: "http://some.other.location/api/traces", @@ -82,8 +82,8 @@ func TestFactory_CreateTraceExporterFails(t *testing.T) { { name: "empty_url", config: &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, }, @@ -92,8 +92,8 @@ func TestFactory_CreateTraceExporterFails(t *testing.T) { { name: "invalid_url", config: &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, URL: ".localhost:123", @@ -103,8 +103,8 @@ func TestFactory_CreateTraceExporterFails(t *testing.T) { { name: "negative_duration", config: &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, URL: "localhost:123", diff --git a/exporter/jaegerthrifthttpexporter/go.mod b/exporter/jaegerthrifthttpexporter/go.mod index 6e471991d7144..6d4de21504687 100644 --- a/exporter/jaegerthrifthttpexporter/go.mod +++ b/exporter/jaegerthrifthttpexporter/go.mod @@ -16,7 +16,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/jaegerthrifthttpexporter/go.sum b/exporter/jaegerthrifthttpexporter/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/exporter/jaegerthrifthttpexporter/go.sum +++ b/exporter/jaegerthrifthttpexporter/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/loadbalancingexporter/config.go b/exporter/loadbalancingexporter/config.go index 8281d86223b13..5b3e2d2df7cd1 100644 --- a/exporter/loadbalancingexporter/config.go +++ b/exporter/loadbalancingexporter/config.go @@ -15,15 +15,15 @@ package loadbalancingexporter import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/otlpexporter" ) // Config defines configuration for the exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` - Protocol Protocol `mapstructure:"protocol"` - Resolver ResolverSettings `mapstructure:"resolver"` + config.ExporterSettings `mapstructure:",squash"` + Protocol Protocol `mapstructure:"protocol"` + Resolver ResolverSettings `mapstructure:"resolver"` } // Protocol holds the individual protocol-specific settings. Only OTLP is supported at the moment. diff --git a/exporter/loadbalancingexporter/factory.go b/exporter/loadbalancingexporter/factory.go index 00caf5ffa9d9d..d9da70a12bbf3 100644 --- a/exporter/loadbalancingexporter/factory.go +++ b/exporter/loadbalancingexporter/factory.go @@ -19,7 +19,7 @@ import ( "go.opencensus.io/stats/view" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/otlpexporter" ) @@ -41,12 +41,12 @@ func NewFactory() component.ExporterFactory { ) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { otlpFactory := otlpexporter.NewFactory() otlpDefaultCfg := otlpFactory.CreateDefaultConfig().(*otlpexporter.Config) return &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -56,10 +56,10 @@ func createDefaultConfig() configmodels.Exporter { } } -func createTraceExporter(_ context.Context, params component.ExporterCreateParams, cfg configmodels.Exporter) (component.TracesExporter, error) { +func createTraceExporter(_ context.Context, params component.ExporterCreateParams, cfg config.Exporter) (component.TracesExporter, error) { return newTracesExporter(params, cfg) } -func createLogExporter(_ context.Context, params component.ExporterCreateParams, cfg configmodels.Exporter) (component.LogsExporter, error) { +func createLogExporter(_ context.Context, params component.ExporterCreateParams, cfg config.Exporter) (component.LogsExporter, error) { return newLogsExporter(params, cfg) } diff --git a/exporter/loadbalancingexporter/factory_test.go b/exporter/loadbalancingexporter/factory_test.go index bba01df111f27..c659f034b5d01 100644 --- a/exporter/loadbalancingexporter/factory_test.go +++ b/exporter/loadbalancingexporter/factory_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.uber.org/zap" ) @@ -29,7 +29,7 @@ func TestTraceExporterGetsCreatedWithValidConfiguration(t *testing.T) { factory := NewFactory() creationParams := component.ExporterCreateParams{Logger: zap.NewNop()} cfg := &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "loadbalancing", TypeVal: "loadbalancing", }, @@ -51,7 +51,7 @@ func TestLogExporterGetsCreatedWithValidConfiguration(t *testing.T) { factory := NewFactory() creationParams := component.ExporterCreateParams{Logger: zap.NewNop()} cfg := &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "loadbalancing", TypeVal: "loadbalancing", }, diff --git a/exporter/loadbalancingexporter/go.mod b/exporter/loadbalancingexporter/go.mod index d2412096e718a..b3db9e67eb29e 100644 --- a/exporter/loadbalancingexporter/go.mod +++ b/exporter/loadbalancingexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/exporter/loadbalancingexporter/go.sum b/exporter/loadbalancingexporter/go.sum index 26b9b46a9d8c6..0a39deebe6c12 100644 --- a/exporter/loadbalancingexporter/go.sum +++ b/exporter/loadbalancingexporter/go.sum @@ -807,7 +807,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -972,7 +971,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1030,8 +1028,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/loadbalancingexporter/loadbalancer.go b/exporter/loadbalancingexporter/loadbalancer.go index 9855af235ccdf..e49149abe93b0 100644 --- a/exporter/loadbalancingexporter/loadbalancer.go +++ b/exporter/loadbalancingexporter/loadbalancer.go @@ -22,7 +22,7 @@ import ( "sync" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" "go.uber.org/zap" ) @@ -61,7 +61,7 @@ type loadBalancerImp struct { } // Create new load balancer -func newLoadBalancer(params component.ExporterCreateParams, cfg configmodels.Exporter, factory componentFactory) (*loadBalancerImp, error) { +func newLoadBalancer(params component.ExporterCreateParams, cfg config.Exporter, factory componentFactory) (*loadBalancerImp, error) { oCfg := cfg.(*Config) if oCfg.Resolver.DNS != nil && oCfg.Resolver.Static != nil { diff --git a/exporter/loadbalancingexporter/loadbalancer_test.go b/exporter/loadbalancingexporter/loadbalancer_test.go index d0b12d3e7abfc..7588054b6ec62 100644 --- a/exporter/loadbalancingexporter/loadbalancer_test.go +++ b/exporter/loadbalancingexporter/loadbalancer_test.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/exporter/otlpexporter" @@ -241,16 +241,16 @@ func TestRemoveExtraExporters(t *testing.T) { func TestAddMissingExporters(t *testing.T) { // prepare - config := simpleConfig() + cfg := simpleConfig() params := component.ExporterCreateParams{ Logger: zap.NewNop(), } - exporterFactory := exporterhelper.NewFactory("otlp", func() configmodels.Exporter { + exporterFactory := exporterhelper.NewFactory("otlp", func() config.Exporter { return &otlpexporter.Config{} }, exporterhelper.WithTraces(func( _ context.Context, _ component.ExporterCreateParams, - _ configmodels.Exporter, + _ config.Exporter, ) (component.TracesExporter, error) { return newNopMockTracesExporter(), nil })) @@ -259,12 +259,12 @@ func TestAddMissingExporters(t *testing.T) { ApplicationStartInfo: params.ApplicationStartInfo, } fn := func(ctx context.Context, endpoint string) (component.Exporter, error) { - oCfg := config.Protocol.OTLP + oCfg := cfg.Protocol.OTLP oCfg.Endpoint = endpoint return exporterFactory.CreateTracesExporter(ctx, tmplParams, &oCfg) } - p, err := newLoadBalancer(params, config, fn) + p, err := newLoadBalancer(params, cfg, fn) require.NotNil(t, p) require.NoError(t, err) @@ -281,17 +281,17 @@ func TestAddMissingExporters(t *testing.T) { func TestFailedToAddMissingExporters(t *testing.T) { // prepare - config := simpleConfig() + cfg := simpleConfig() params := component.ExporterCreateParams{ Logger: zap.NewNop(), } expectedErr := errors.New("some expected error") - exporterFactory := exporterhelper.NewFactory("otlp", func() configmodels.Exporter { + exporterFactory := exporterhelper.NewFactory("otlp", func() config.Exporter { return &otlpexporter.Config{} }, exporterhelper.WithTraces(func( _ context.Context, _ component.ExporterCreateParams, - _ configmodels.Exporter, + _ config.Exporter, ) (component.TracesExporter, error) { return nil, expectedErr })) @@ -300,12 +300,12 @@ func TestFailedToAddMissingExporters(t *testing.T) { ApplicationStartInfo: params.ApplicationStartInfo, } fn := func(ctx context.Context, endpoint string) (component.Exporter, error) { - oCfg := config.Protocol.OTLP + oCfg := cfg.Protocol.OTLP oCfg.Endpoint = endpoint return exporterFactory.CreateTracesExporter(ctx, tmplParams, &oCfg) } - p, err := newLoadBalancer(params, config, fn) + p, err := newLoadBalancer(params, cfg, fn) require.NotNil(t, p) require.NoError(t, err) diff --git a/exporter/loadbalancingexporter/log_exporter.go b/exporter/loadbalancingexporter/log_exporter.go index f9674b0655e5c..157968ebde72f 100644 --- a/exporter/loadbalancingexporter/log_exporter.go +++ b/exporter/loadbalancingexporter/log_exporter.go @@ -24,7 +24,7 @@ import ( "go.opencensus.io/stats" "go.opencensus.io/tag" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/otlpexporter" @@ -45,7 +45,7 @@ type logExporterImp struct { } // Create new logs exporter -func newLogsExporter(params component.ExporterCreateParams, cfg configmodels.Exporter) (*logExporterImp, error) { +func newLogsExporter(params component.ExporterCreateParams, cfg config.Exporter) (*logExporterImp, error) { exporterFactory := otlpexporter.NewFactory() tmplParams := component.ExporterCreateParams{ diff --git a/exporter/loadbalancingexporter/trace_exporter.go b/exporter/loadbalancingexporter/trace_exporter.go index 5d397f42b4ec2..b1ae861efab06 100644 --- a/exporter/loadbalancingexporter/trace_exporter.go +++ b/exporter/loadbalancingexporter/trace_exporter.go @@ -24,7 +24,7 @@ import ( "go.opencensus.io/stats" "go.opencensus.io/tag" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/otlpexporter" @@ -49,7 +49,7 @@ type traceExporterImp struct { } // Create new traces exporter -func newTracesExporter(params component.ExporterCreateParams, cfg configmodels.Exporter) (*traceExporterImp, error) { +func newTracesExporter(params component.ExporterCreateParams, cfg config.Exporter) (*traceExporterImp, error) { exporterFactory := otlpexporter.NewFactory() tmplParams := component.ExporterCreateParams{ diff --git a/exporter/logzioexporter/config.go b/exporter/logzioexporter/config.go index 1c8ed80ec2ba4..395417eecb9b5 100644 --- a/exporter/logzioexporter/config.go +++ b/exporter/logzioexporter/config.go @@ -17,16 +17,16 @@ package logzioexporter import ( "errors" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config contains Logz.io specific configuration such as Account TracesToken, Region, etc. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` - TracesToken string `mapstructure:"account_token"` // Your Logz.io Account Token, can be found at https://app.logz.io/#/dashboard/settings/general - MetricsToken string `mapstructure:"metrics_token"` // Your Logz.io Metrics Token, can be found at https://docs.logz.io/user-guide/accounts/finding-your-metrics-account-token/ - Region string `mapstructure:"region"` // Your Logz.io 2-letter region code, can be found at https://docs.logz.io/user-guide/accounts/account-region.html#available-regions - CustomEndpoint string `mapstructure:"custom_endpoint"` // Custom endpoint to ship traces to. Use only for dev and tests. + config.ExporterSettings `mapstructure:",squash"` + TracesToken string `mapstructure:"account_token"` // Your Logz.io Account Token, can be found at https://app.logz.io/#/dashboard/settings/general + MetricsToken string `mapstructure:"metrics_token"` // Your Logz.io Metrics Token, can be found at https://docs.logz.io/user-guide/accounts/finding-your-metrics-account-token/ + Region string `mapstructure:"region"` // Your Logz.io 2-letter region code, can be found at https://docs.logz.io/user-guide/accounts/account-region.html#available-regions + CustomEndpoint string `mapstructure:"custom_endpoint"` // Custom endpoint to ship traces to. Use only for dev and tests. } func (c *Config) validate() error { diff --git a/exporter/logzioexporter/config_test.go b/exporter/logzioexporter/config_test.go index 783f733cde094..db099454537c3 100644 --- a/exporter/logzioexporter/config_test.go +++ b/exporter/logzioexporter/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -30,7 +30,7 @@ func TestLoadConfig(tester *testing.T) { assert.Nil(tester, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( tester, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -40,11 +40,11 @@ func TestLoadConfig(tester *testing.T) { assert.Equal(tester, 2, len(cfg.Exporters)) - config := cfg.Exporters["logzio/2"].(*Config) + cfgExp := cfg.Exporters["logzio/2"].(*Config) assert.Equal(tester, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: typeStr, NameVal: "logzio/2"}, + ExporterSettings: config.ExporterSettings{TypeVal: typeStr, NameVal: "logzio/2"}, TracesToken: "logzioTESTtoken", Region: "eu", CustomEndpoint: "https://some-url.com:8888", - }, config) + }, cfgExp) } diff --git a/exporter/logzioexporter/factory.go b/exporter/logzioexporter/factory.go index 56b3abe86bf25..7209c8d99c27a 100644 --- a/exporter/logzioexporter/factory.go +++ b/exporter/logzioexporter/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -32,10 +32,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithTraces(createTraceExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Region: "", @@ -43,12 +43,12 @@ func createDefaultConfig() configmodels.Exporter { } } -func createTraceExporter(_ context.Context, params component.ExporterCreateParams, cfg configmodels.Exporter) (component.TracesExporter, error) { +func createTraceExporter(_ context.Context, params component.ExporterCreateParams, cfg config.Exporter) (component.TracesExporter, error) { config := cfg.(*Config) return newLogzioTraceExporter(config, params) } -func createMetricsExporter(_ context.Context, params component.ExporterCreateParams, cfg configmodels.Exporter) (component.MetricsExporter, error) { +func createMetricsExporter(_ context.Context, params component.ExporterCreateParams, cfg config.Exporter) (component.MetricsExporter, error) { config := cfg.(*Config) return newLogzioMetricsExporter(config, params) } diff --git a/exporter/logzioexporter/factory_test.go b/exporter/logzioexporter/factory_test.go index 180289aa40b6b..a9a2ecb593126 100644 --- a/exporter/logzioexporter/factory_test.go +++ b/exporter/logzioexporter/factory_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" ) @@ -40,7 +40,7 @@ func TestCreateTraceExporter(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) diff --git a/exporter/logzioexporter/go.mod b/exporter/logzioexporter/go.mod index 99b8cd20626b6..472ba9a21cdfb 100644 --- a/exporter/logzioexporter/go.mod +++ b/exporter/logzioexporter/go.mod @@ -16,7 +16,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/logzioexporter/go.sum b/exporter/logzioexporter/go.sum index 04faa9c80c3eb..3bef47f5f3d9d 100644 --- a/exporter/logzioexporter/go.sum +++ b/exporter/logzioexporter/go.sum @@ -849,7 +849,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1019,7 +1018,6 @@ github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFd github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1081,8 +1079,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/lokiexporter/config.go b/exporter/lokiexporter/config.go index 4656e8f210bee..fd2f00bfdb3d6 100644 --- a/exporter/lokiexporter/config.go +++ b/exporter/lokiexporter/config.go @@ -19,14 +19,14 @@ import ( "net/url" "github.com/prometheus/common/model" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for Loki exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` diff --git a/exporter/lokiexporter/config_test.go b/exporter/lokiexporter/config_test.go index f369c97440ef7..8f6d3364196bf 100644 --- a/exporter/lokiexporter/config_test.go +++ b/exporter/lokiexporter/config_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -36,7 +36,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -46,7 +46,7 @@ func TestLoadConfig(t *testing.T) { actualCfg := cfg.Exporters["loki/allsettings"].(*Config) expectedCfg := Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: typeStr, NameVal: "loki/allsettings"}, + ExporterSettings: config.ExporterSettings{TypeVal: typeStr, NameVal: "loki/allsettings"}, HTTPClientSettings: confighttp.HTTPClientSettings{ Headers: map[string]string{ "x-custom-header": "loki_rocks", @@ -95,7 +95,7 @@ func TestConfig_validate(t *testing.T) { } type fields struct { - ExporterSettings configmodels.ExporterSettings + ExporterSettings config.ExporterSettings Endpoint string Source string CredentialFile string diff --git a/exporter/lokiexporter/factory.go b/exporter/lokiexporter/factory.go index d2a505117a036..9255def8cb022 100644 --- a/exporter/lokiexporter/factory.go +++ b/exporter/lokiexporter/factory.go @@ -19,8 +19,8 @@ import ( "time" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -35,10 +35,10 @@ func NewFactory() component.ExporterFactory { ) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, HTTPClientSettings: confighttp.HTTPClientSettings{ @@ -57,7 +57,7 @@ func createDefaultConfig() configmodels.Exporter { } } -func createLogsExporter(_ context.Context, params component.ExporterCreateParams, config configmodels.Exporter) (component.LogsExporter, error) { +func createLogsExporter(_ context.Context, params component.ExporterCreateParams, config config.Exporter) (component.LogsExporter, error) { expCfg := config.(*Config) if err := expCfg.validate(); err != nil { diff --git a/exporter/lokiexporter/go.mod b/exporter/lokiexporter/go.mod index a14e7e3f21f14..f5cefb466e598 100644 --- a/exporter/lokiexporter/go.mod +++ b/exporter/lokiexporter/go.mod @@ -16,7 +16,7 @@ require ( github.com/prometheus/common v0.20.0 github.com/prometheus/prometheus v1.8.2-0.20210217141258-a6be548dbc17 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/grpc v1.36.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/lokiexporter/go.sum b/exporter/lokiexporter/go.sum index 18edb6af7794d..9155cf3673498 100644 --- a/exporter/lokiexporter/go.sum +++ b/exporter/lokiexporter/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -992,7 +991,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1051,8 +1049,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/newrelicexporter/config.go b/exporter/newrelicexporter/config.go index 00407ff98555f..ffee10ce3119a 100644 --- a/exporter/newrelicexporter/config.go +++ b/exporter/newrelicexporter/config.go @@ -18,12 +18,12 @@ import ( "time" "github.com/newrelic/newrelic-telemetry-sdk-go/telemetry" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config defines configuration options for the New Relic exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // APIKey is the required authentication credentials for New Relic APIs. This field specifies the default key. APIKey string `mapstructure:"apikey"` diff --git a/exporter/newrelicexporter/config_test.go b/exporter/newrelicexporter/config_test.go index 43a7726c7e08a..ec8a20f62a513 100644 --- a/exporter/newrelicexporter/config_test.go +++ b/exporter/newrelicexporter/config_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -53,8 +53,8 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Exporters["newrelic/alt"].(*Config) assert.Equal(t, r1, &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: "newrelic/alt", }, APIKey: "a1b2c3d4", diff --git a/exporter/newrelicexporter/factory.go b/exporter/newrelicexporter/factory.go index f65429020b757..d31efdae67ff9 100644 --- a/exporter/newrelicexporter/factory.go +++ b/exporter/newrelicexporter/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" ) @@ -35,10 +35,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithMetrics(createMetricsExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Timeout: time.Second * 15, @@ -49,7 +49,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { exp, err := newTraceExporter(params.Logger, cfg) if err != nil { @@ -68,7 +68,7 @@ func createTraceExporter( func createMetricsExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.MetricsExporter, error) { exp, err := newMetricsExporter(params.Logger, cfg) if err != nil { diff --git a/exporter/newrelicexporter/go.mod b/exporter/newrelicexporter/go.mod index afd031c63fd4f..2749e42fbc057 100644 --- a/exporter/newrelicexporter/go.mod +++ b/exporter/newrelicexporter/go.mod @@ -15,7 +15,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/genproto v0.0.0-20210302174412-5ede27ff9881 google.golang.org/grpc v1.36.0 diff --git a/exporter/newrelicexporter/go.sum b/exporter/newrelicexporter/go.sum index 1796fdbc4c312..71356b643b795 100644 --- a/exporter/newrelicexporter/go.sum +++ b/exporter/newrelicexporter/go.sum @@ -827,7 +827,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -993,7 +992,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1052,8 +1050,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/newrelicexporter/newrelic.go b/exporter/newrelicexporter/newrelic.go index fabbdc0cc1def..7a6f303405c51 100644 --- a/exporter/newrelicexporter/newrelic.go +++ b/exporter/newrelicexporter/newrelic.go @@ -24,7 +24,7 @@ import ( "github.com/newrelic/newrelic-telemetry-sdk-go/cumulative" "github.com/newrelic/newrelic-telemetry-sdk-go/telemetry" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/translator/internaldata" @@ -61,7 +61,7 @@ type exporter struct { logger *zap.Logger } -func newMetricsExporter(l *zap.Logger, c configmodels.Exporter) (*exporter, error) { +func newMetricsExporter(l *zap.Logger, c config.Exporter) (*exporter, error) { nrConfig, ok := c.(*Config) if !ok { return nil, fmt.Errorf("invalid config: %#v", c) @@ -85,7 +85,7 @@ func newMetricsExporter(l *zap.Logger, c configmodels.Exporter) (*exporter, erro }, nil } -func newTraceExporter(l *zap.Logger, c configmodels.Exporter) (*exporter, error) { +func newTraceExporter(l *zap.Logger, c config.Exporter) (*exporter, error) { nrConfig, ok := c.(*Config) if !ok { return nil, fmt.Errorf("invalid config: %#v", c) diff --git a/exporter/sapmexporter/config.go b/exporter/sapmexporter/config.go index 4f591e080cd3f..7cbe2b9a14ab0 100644 --- a/exporter/sapmexporter/config.go +++ b/exporter/sapmexporter/config.go @@ -19,7 +19,7 @@ import ( "net/url" sapmclient "github.com/signalfx/sapm-proto/client" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" @@ -32,7 +32,7 @@ const ( // Config defines configuration for SAPM exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // Endpoint is the destination to where traces will be sent to in SAPM format. // It must be a full URL and include the scheme, port and path e.g, https://ingest.signalfx.com/v2/trace diff --git a/exporter/sapmexporter/config_test.go b/exporter/sapmexporter/config_test.go index dff1f30aaf655..ae156626b622e 100644 --- a/exporter/sapmexporter/config_test.go +++ b/exporter/sapmexporter/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - facotries.Exporters[configmodels.Type(typeStr)] = factory + facotries.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), facotries, ) @@ -50,7 +50,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Exporters["sapm/customname"].(*Config) assert.Equal(t, r1, &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "sapm/customname"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "sapm/customname"}, Endpoint: "test-endpoint", AccessToken: "abcd1234", NumWorkers: 3, diff --git a/exporter/sapmexporter/exporter_test.go b/exporter/sapmexporter/exporter_test.go index d95d906178f4b..f3a51be05afea 100644 --- a/exporter/sapmexporter/exporter_test.go +++ b/exporter/sapmexporter/exporter_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/translator/trace/jaeger" "go.uber.org/zap" @@ -37,7 +37,7 @@ import ( func TestCreateTraceExporter(t *testing.T) { config := &Config{ - ExporterSettings: configmodels.ExporterSettings{TypeVal: configmodels.Type(typeStr), NameVal: "sapm/customname"}, + ExporterSettings: config.ExporterSettings{TypeVal: config.Type(typeStr), NameVal: "sapm/customname"}, Endpoint: "test-endpoint", AccessToken: "abcd1234", NumWorkers: 3, diff --git a/exporter/sapmexporter/factory.go b/exporter/sapmexporter/factory.go index 240e997bb43a9..d01dd28845259 100644 --- a/exporter/sapmexporter/factory.go +++ b/exporter/sapmexporter/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" @@ -37,10 +37,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithTraces(createTraceExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, NumWorkers: defaultNumWorkers, @@ -56,7 +56,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { eCfg := cfg.(*Config) return newSAPMTraceExporter(eCfg, params) diff --git a/exporter/sapmexporter/go.mod b/exporter/sapmexporter/go.mod index 960b63dbba303..ddfb8066152d1 100644 --- a/exporter/sapmexporter/go.mod +++ b/exporter/sapmexporter/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.0.0-00010101000000-000000000000 github.com/signalfx/sapm-proto v0.7.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/exporter/sapmexporter/go.sum b/exporter/sapmexporter/go.sum index d148a842439d7..362db3a44c1a6 100644 --- a/exporter/sapmexporter/go.sum +++ b/exporter/sapmexporter/go.sum @@ -902,7 +902,6 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1094,7 +1093,6 @@ github.com/tetafro/godot v1.4.4/go.mod h1:FVDd4JuKliW3UgjswZfJfHq4vAx0bD/Jd5brJj github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1161,8 +1159,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/sentryexporter/config.go b/exporter/sentryexporter/config.go index 330c7132b4d1a..68ec1e183ff8a 100644 --- a/exporter/sentryexporter/config.go +++ b/exporter/sentryexporter/config.go @@ -14,11 +14,11 @@ package sentryexporter -import "go.opentelemetry.io/collector/config/configmodels" +import "go.opentelemetry.io/collector/config" // Config defines the configuration for the Sentry Exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. // DSN to report transaction to Sentry. If the DSN is not set, no trace will be sent to Sentry. DSN string `mapstructure:"dsn"` } diff --git a/exporter/sentryexporter/config_test.go b/exporter/sentryexporter/config_test.go index efe68954c1254..4a582d154ab28 100644 --- a/exporter/sentryexporter/config_test.go +++ b/exporter/sentryexporter/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -30,7 +30,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -43,7 +43,7 @@ func TestLoadConfig(t *testing.T) { e1 := cfg.Exporters["sentry/2"] assert.Equal(t, e1, &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "sentry/2", TypeVal: "sentry", }, diff --git a/exporter/sentryexporter/factory.go b/exporter/sentryexporter/factory.go index 88bfade131df4..5d302d53dae2e 100644 --- a/exporter/sentryexporter/factory.go +++ b/exporter/sentryexporter/factory.go @@ -19,7 +19,7 @@ import ( "fmt" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -36,9 +36,9 @@ func NewFactory() component.ExporterFactory { ) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -48,7 +48,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - config configmodels.Exporter, + config config.Exporter, ) (component.TracesExporter, error) { sentryConfig, ok := config.(*Config) if !ok { diff --git a/exporter/sentryexporter/go.mod b/exporter/sentryexporter/go.mod index b97bb328f7193..193a76d8d0f9e 100644 --- a/exporter/sentryexporter/go.mod +++ b/exporter/sentryexporter/go.mod @@ -14,7 +14,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/exporter/sentryexporter/go.sum b/exporter/sentryexporter/go.sum index 22879d613bec3..74a9c9dd6b3df 100644 --- a/exporter/sentryexporter/go.sum +++ b/exporter/sentryexporter/go.sum @@ -882,7 +882,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1050,7 +1049,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1123,8 +1121,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/signalfxexporter/config.go b/exporter/signalfxexporter/config.go index dcec4199fbf62..a16043088fe1e 100644 --- a/exporter/signalfxexporter/config.go +++ b/exporter/signalfxexporter/config.go @@ -20,7 +20,7 @@ import ( "net/url" "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/correlation" @@ -35,7 +35,7 @@ const ( // Config defines configuration for SignalFx exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` diff --git a/exporter/signalfxexporter/config_test.go b/exporter/signalfxexporter/config_test.go index 35da52b0eb138..2c2eb51224f95 100644 --- a/exporter/signalfxexporter/config_test.go +++ b/exporter/signalfxexporter/config_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" @@ -43,7 +43,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -63,8 +63,8 @@ func TestLoadConfig(t *testing.T) { e1 := cfg.Exporters[expectedName] expectedCfg := Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: expectedName, }, AccessToken: "testToken", @@ -199,7 +199,7 @@ func TestConfig_getOptionsFromConfig(t *testing.T) { return translator } type fields struct { - ExporterSettings configmodels.ExporterSettings + ExporterSettings config.ExporterSettings AccessToken string Realm string IngestURL string diff --git a/exporter/signalfxexporter/factory.go b/exporter/signalfxexporter/factory.go index cfcd589d0d16a..4af22bfa32aea 100644 --- a/exporter/signalfxexporter/factory.go +++ b/exporter/signalfxexporter/factory.go @@ -24,7 +24,6 @@ import ( "github.com/spf13/viper" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" @@ -54,10 +53,10 @@ func NewFactory() component.ExporterFactory { ) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, TimeoutSettings: exporterhelper.TimeoutSettings{Timeout: defaultHTTPTimeout}, @@ -96,7 +95,7 @@ func customUnmarshaler(componentViperSection *viper.Viper, intoCfg interface{}) func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - eCfg configmodels.Exporter, + eCfg config.Exporter, ) (component.TracesExporter, error) { cfg := eCfg.(*Config) corrCfg := cfg.Correlation @@ -124,7 +123,7 @@ func createTraceExporter( func createMetricsExporter( _ context.Context, params component.ExporterCreateParams, - config configmodels.Exporter, + config config.Exporter, ) (component.MetricsExporter, error) { expCfg := config.(*Config) @@ -210,7 +209,7 @@ func loadDefaultExcludes() ([]dpfilters.MetricFilter, error) { func createLogsExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.LogsExporter, error) { expCfg := cfg.(*Config) diff --git a/exporter/signalfxexporter/factory_test.go b/exporter/signalfxexporter/factory_test.go index 906d8bd093597..bab380ee5bf30 100644 --- a/exporter/signalfxexporter/factory_test.go +++ b/exporter/signalfxexporter/factory_test.go @@ -27,8 +27,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/translator/internaldata" @@ -112,8 +112,8 @@ func TestCreateInstanceViaFactory(t *testing.T) { func TestCreateMetricsExporter_CustomConfig(t *testing.T) { config := &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, AccessToken: "testToken", @@ -139,8 +139,8 @@ func TestFactory_CreateMetricsExporterFails(t *testing.T) { { name: "negative_duration", config: &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, AccessToken: "testToken", @@ -152,8 +152,8 @@ func TestFactory_CreateMetricsExporterFails(t *testing.T) { { name: "empty_realm_and_urls", config: &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, AccessToken: "testToken", @@ -164,8 +164,8 @@ func TestFactory_CreateMetricsExporterFails(t *testing.T) { { name: "empty_realm_and_api_url", config: &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, AccessToken: "testToken", @@ -267,8 +267,8 @@ func TestDefaultTranslationRules(t *testing.T) { func TestCreateMetricsExporterWithDefaultExcludeMetrics(t *testing.T) { config := &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, AccessToken: "testToken", @@ -285,8 +285,8 @@ func TestCreateMetricsExporterWithDefaultExcludeMetrics(t *testing.T) { func TestCreateMetricsExporterWithExcludeMetrics(t *testing.T) { config := &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, AccessToken: "testToken", @@ -308,8 +308,8 @@ func TestCreateMetricsExporterWithExcludeMetrics(t *testing.T) { func TestCreateMetricsExporterWithEmptyExcludeMetrics(t *testing.T) { config := &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, AccessToken: "testToken", diff --git a/exporter/signalfxexporter/go.mod b/exporter/signalfxexporter/go.mod index e031853da6123..5d1e277d23c02 100644 --- a/exporter/signalfxexporter/go.mod +++ b/exporter/signalfxexporter/go.mod @@ -15,7 +15,7 @@ require ( github.com/signalfx/signalfx-agent/pkg/apm v0.0.0-20201202163743-65b4fa925fc8 github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 diff --git a/exporter/signalfxexporter/go.sum b/exporter/signalfxexporter/go.sum index 4a1c503144356..423101c3ec96f 100644 --- a/exporter/signalfxexporter/go.sum +++ b/exporter/signalfxexporter/go.sum @@ -832,7 +832,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1015,7 +1014,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1075,8 +1073,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/splunkhecexporter/config.go b/exporter/splunkhecexporter/config.go index 8bf3b8b6c5fcf..5129e8181b9a3 100644 --- a/exporter/splunkhecexporter/config.go +++ b/exporter/splunkhecexporter/config.go @@ -20,7 +20,7 @@ import ( "net/url" "path" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -31,7 +31,7 @@ const ( // Config defines configuration for Splunk exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` diff --git a/exporter/splunkhecexporter/config_test.go b/exporter/splunkhecexporter/config_test.go index 0bbacabaeef2b..2461547bc7e58 100644 --- a/exporter/splunkhecexporter/config_test.go +++ b/exporter/splunkhecexporter/config_test.go @@ -25,7 +25,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.uber.org/zap" @@ -36,7 +36,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -54,8 +54,8 @@ func TestLoadConfig(t *testing.T) { e1 := cfg.Exporters[expectedName] expectedCfg := Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: expectedName, }, Token: "00000000-0000-0000-0000-0000000000000", @@ -89,7 +89,7 @@ func TestLoadConfig(t *testing.T) { func TestConfig_getOptionsFromConfig(t *testing.T) { type fields struct { - ExporterSettings configmodels.ExporterSettings + ExporterSettings config.ExporterSettings Endpoint string Token string Source string diff --git a/exporter/splunkhecexporter/factory.go b/exporter/splunkhecexporter/factory.go index 6de32ca1fdc55..c2c3b0c3ba74e 100644 --- a/exporter/splunkhecexporter/factory.go +++ b/exporter/splunkhecexporter/factory.go @@ -20,7 +20,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -41,10 +41,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithLogs(createLogsExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, TimeoutSettings: exporterhelper.TimeoutSettings{ @@ -60,7 +60,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - config configmodels.Exporter, + config config.Exporter, ) (component.TracesExporter, error) { if config == nil { return nil, errors.New("nil config") @@ -87,7 +87,7 @@ func createTraceExporter( func createMetricsExporter( _ context.Context, params component.ExporterCreateParams, - config configmodels.Exporter, + config config.Exporter, ) (component.MetricsExporter, error) { if config == nil { return nil, errors.New("nil config") @@ -115,7 +115,7 @@ func createMetricsExporter( func createLogsExporter( _ context.Context, params component.ExporterCreateParams, - config configmodels.Exporter, + config config.Exporter, ) (exporter component.LogsExporter, err error) { if config == nil { return nil, errors.New("nil config") diff --git a/exporter/splunkhecexporter/factory_test.go b/exporter/splunkhecexporter/factory_test.go index 4d7678af486be..5c922a28e6f84 100644 --- a/exporter/splunkhecexporter/factory_test.go +++ b/exporter/splunkhecexporter/factory_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.uber.org/zap" ) @@ -123,8 +123,8 @@ func TestCreateInstanceViaFactory(t *testing.T) { func TestFactory_CreateMetricsExporter(t *testing.T) { config := &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Token: "testToken", @@ -146,8 +146,8 @@ func TestFactory_CreateMetricsExporterFails(t *testing.T) { { name: "empty_endpoint", config: &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Token: "token", @@ -157,8 +157,8 @@ func TestFactory_CreateMetricsExporterFails(t *testing.T) { { name: "empty_token", config: &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Endpoint: "https://example.com:8000", diff --git a/exporter/splunkhecexporter/go.mod b/exporter/splunkhecexporter/go.mod index a02299ee08ac8..00872bc394002 100644 --- a/exporter/splunkhecexporter/go.mod +++ b/exporter/splunkhecexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/census-instrumentation/opencensus-proto v0.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 diff --git a/exporter/splunkhecexporter/go.sum b/exporter/splunkhecexporter/go.sum index 2f806486b0332..39a76f17f6ae4 100644 --- a/exporter/splunkhecexporter/go.sum +++ b/exporter/splunkhecexporter/go.sum @@ -808,7 +808,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -973,7 +972,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1031,8 +1029,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/stackdriverexporter/factory.go b/exporter/stackdriverexporter/factory.go index eda92044b7854..5ea4e3bb32957 100644 --- a/exporter/stackdriverexporter/factory.go +++ b/exporter/stackdriverexporter/factory.go @@ -19,7 +19,7 @@ import ( "sync" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter" @@ -31,7 +31,7 @@ type factory struct { const ( // The value of "type" key in configuration. - typeVal = configmodels.Type("stackdriver") + typeVal = config.Type("stackdriver") ) var once sync.Once @@ -47,11 +47,11 @@ func logDeprecation(logger *zap.Logger) { }) } -func (f *factory) Type() configmodels.Type { +func (f *factory) Type() config.Type { return typeVal } -func (f *factory) CreateDefaultConfig() configmodels.Exporter { +func (f *factory) CreateDefaultConfig() config.Exporter { cfg := f.ExporterFactory.CreateDefaultConfig() cfg.(*googlecloudexporter.Config).TypeVal = f.Type() return cfg @@ -60,7 +60,7 @@ func (f *factory) CreateDefaultConfig() configmodels.Exporter { func (f *factory) CreateTracesExporter( ctx context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { logDeprecation(params.Logger) return f.ExporterFactory.CreateTracesExporter(ctx, params, cfg) @@ -69,7 +69,7 @@ func (f *factory) CreateTracesExporter( func (f *factory) CreateMetricsExporter( ctx context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.MetricsExporter, error) { logDeprecation(params.Logger) return f.ExporterFactory.CreateMetricsExporter(ctx, params, cfg) diff --git a/exporter/stackdriverexporter/go.mod b/exporter/stackdriverexporter/go.mod index 61bbd16028f76..58c42c4ac5ae8 100644 --- a/exporter/stackdriverexporter/go.mod +++ b/exporter/stackdriverexporter/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/exporter/stackdriverexporter/go.sum b/exporter/stackdriverexporter/go.sum index 534b1bdb9bbb8..fef28d345f79a 100644 --- a/exporter/stackdriverexporter/go.sum +++ b/exporter/stackdriverexporter/go.sum @@ -806,7 +806,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -969,7 +968,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1026,8 +1024,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.opentelemetry.io/otel v0.19.0 h1:Lenfy7QHRXPZVsw/12CWpxX6d/JkrX8wrx2vO8G80Ng= go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg= go.opentelemetry.io/otel/metric v0.19.0 h1:dtZ1Ju44gkJkYvo+3qGqVXmf88tc+a42edOywypengg= diff --git a/exporter/sumologicexporter/config.go b/exporter/sumologicexporter/config.go index 13b66287a07dc..2440a529c70c8 100644 --- a/exporter/sumologicexporter/config.go +++ b/exporter/sumologicexporter/config.go @@ -17,14 +17,14 @@ package sumologicexporter import ( "time" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" ) // Config defines configuration for Sumo Logic exporter. type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` diff --git a/exporter/sumologicexporter/factory.go b/exporter/sumologicexporter/factory.go index 2794db937a782..2e6c3df620686 100644 --- a/exporter/sumologicexporter/factory.go +++ b/exporter/sumologicexporter/factory.go @@ -19,7 +19,7 @@ import ( "fmt" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -38,13 +38,13 @@ func NewFactory() component.ExporterFactory { ) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { qs := exporterhelper.DefaultQueueSettings() qs.Enabled = false return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, @@ -66,7 +66,7 @@ func createDefaultConfig() configmodels.Exporter { func createLogsExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.LogsExporter, error) { exp, err := newLogsExporter(cfg.(*Config), params) if err != nil { @@ -79,7 +79,7 @@ func createLogsExporter( func createMetricsExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.MetricsExporter, error) { exp, err := newMetricsExporter(cfg.(*Config), params) if err != nil { diff --git a/exporter/sumologicexporter/factory_test.go b/exporter/sumologicexporter/factory_test.go index 0b5e46c69a5d7..18d81caa6c8f6 100644 --- a/exporter/sumologicexporter/factory_test.go +++ b/exporter/sumologicexporter/factory_test.go @@ -19,16 +19,16 @@ import ( "time" "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" ) func TestType(t *testing.T) { factory := NewFactory() pType := factory.Type() - assert.Equal(t, pType, configmodels.Type("sumologic")) + assert.Equal(t, pType, config.Type("sumologic")) } func TestCreateDefaultConfig(t *testing.T) { @@ -38,7 +38,7 @@ func TestCreateDefaultConfig(t *testing.T) { qs.Enabled = false assert.Equal(t, cfg, &Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: typeStr, TypeVal: typeStr, }, diff --git a/exporter/sumologicexporter/go.mod b/exporter/sumologicexporter/go.mod index c2e251efc73e6..8af1ef385a1b2 100644 --- a/exporter/sumologicexporter/go.mod +++ b/exporter/sumologicexporter/go.mod @@ -12,6 +12,6 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/exporter/sumologicexporter/go.sum b/exporter/sumologicexporter/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/exporter/sumologicexporter/go.sum +++ b/exporter/sumologicexporter/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/exporter/uptraceexporter/config.go b/exporter/uptraceexporter/config.go index c4e746364d241..80810116a5de7 100644 --- a/exporter/uptraceexporter/config.go +++ b/exporter/uptraceexporter/config.go @@ -15,13 +15,13 @@ package uptraceexporter import ( + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" ) type Config struct { - configmodels.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + config.ExporterSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. exporterhelper.QueueSettings `mapstructure:"sending_queue"` exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` diff --git a/exporter/uptraceexporter/config_test.go b/exporter/uptraceexporter/config_test.go index 64527488c3622..a72b2a0f47d27 100644 --- a/exporter/uptraceexporter/config_test.go +++ b/exporter/uptraceexporter/config_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -29,7 +29,7 @@ func TestLoadConfig(t *testing.T) { require.Nil(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, @@ -41,15 +41,15 @@ func TestLoadConfig(t *testing.T) { require.Equal(t, 2, len(cfg.Exporters)) c0 := cfg.Exporters["uptrace"].(*Config) - require.Equal(t, configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + require.Equal(t, config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: "uptrace", }, c0.ExporterSettings) require.Equal(t, "https://api.uptrace.dev@example.com/1", c0.DSN) c1 := cfg.Exporters["uptrace/customname"].(*Config) - require.Equal(t, configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + require.Equal(t, config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: "uptrace/customname", }, c1.ExporterSettings) require.Equal(t, "https://key@example.com/1", c1.DSN) diff --git a/exporter/uptraceexporter/factory.go b/exporter/uptraceexporter/factory.go index 617dd3e76867d..6233e7941a03a 100644 --- a/exporter/uptraceexporter/factory.go +++ b/exporter/uptraceexporter/factory.go @@ -19,8 +19,8 @@ import ( "time" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -37,10 +37,10 @@ func NewFactory() component.ExporterFactory { exporterhelper.WithTraces(createTraceExporter)) } -func createDefaultConfig() configmodels.Exporter { +func createDefaultConfig() config.Exporter { return &Config{ - ExporterSettings: configmodels.ExporterSettings{ - TypeVal: configmodels.Type(typeStr), + ExporterSettings: config.ExporterSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, HTTPClientSettings: confighttp.HTTPClientSettings{ @@ -60,7 +60,7 @@ func createDefaultConfig() configmodels.Exporter { func createTraceExporter( _ context.Context, params component.ExporterCreateParams, - cfg configmodels.Exporter, + cfg config.Exporter, ) (component.TracesExporter, error) { oCfg := cfg.(*Config) diff --git a/exporter/uptraceexporter/factory_test.go b/exporter/uptraceexporter/factory_test.go index e8ee337859522..bb4811f8c5426 100644 --- a/exporter/uptraceexporter/factory_test.go +++ b/exporter/uptraceexporter/factory_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.uber.org/zap" ) @@ -47,7 +47,7 @@ func TestCreateTraceExporterLoadConfig(t *testing.T) { require.NoError(t, err) factory := NewFactory() - factories.Exporters[configmodels.Type(typeStr)] = factory + factories.Exporters[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, diff --git a/exporter/uptraceexporter/go.mod b/exporter/uptraceexporter/go.mod index 93be955dffa9b..0462d50a43972 100644 --- a/exporter/uptraceexporter/go.mod +++ b/exporter/uptraceexporter/go.mod @@ -15,7 +15,7 @@ require ( github.com/stretchr/testify v1.7.0 github.com/uptrace/uptrace-go v0.19.3 github.com/vmihailenco/msgpack/v5 v5.3.1 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.opentelemetry.io/otel v0.19.0 go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/exporter/uptraceexporter/go.sum b/exporter/uptraceexporter/go.sum index ec806ae53650e..1185346497c16 100644 --- a/exporter/uptraceexporter/go.sum +++ b/exporter/uptraceexporter/go.sum @@ -828,7 +828,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -994,7 +993,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1060,8 +1058,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.opentelemetry.io/contrib v0.19.0 h1:x6Josyb/V+aDHg6IozzmZMaOhE+0Jb2NvEAM4/0Gftc= go.opentelemetry.io/contrib v0.19.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.19.0 h1:bol92QNY0BMTWfGlqxYipDf/pX9//kGsNdR95zX72Pk= diff --git a/extension/fluentbitextension/config.go b/extension/fluentbitextension/config.go index 5696c0f0553da..07acd31b48903 100644 --- a/extension/fluentbitextension/config.go +++ b/extension/fluentbitextension/config.go @@ -15,12 +15,12 @@ package fluentbitextension import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config has the configuration for the fluentbit extension. type Config struct { - configmodels.ExtensionSettings `mapstructure:",squash"` + config.ExtensionSettings `mapstructure:",squash"` // The TCP `host:port` to which the subprocess should send log entries. // This is required unless you are overridding `args` and providing the diff --git a/extension/fluentbitextension/config_test.go b/extension/fluentbitextension/config_test.go index 6676074453420..7900a91e0241b 100644 --- a/extension/fluentbitextension/config_test.go +++ b/extension/fluentbitextension/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -42,7 +42,7 @@ func TestLoadConfig(t *testing.T) { ext1 := cfg.Extensions["fluentbit/1"] assert.Equal(t, &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ TypeVal: "fluentbit", NameVal: "fluentbit/1", }, diff --git a/extension/fluentbitextension/factory.go b/extension/fluentbitextension/factory.go index f04a64631b64e..de8b8ad2269b0 100644 --- a/extension/fluentbitextension/factory.go +++ b/extension/fluentbitextension/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/extension/extensionhelper" ) @@ -35,16 +35,16 @@ func NewFactory() component.ExtensionFactory { createExtension) } -func createDefaultConfig() configmodels.Extension { +func createDefaultConfig() config.Extension { return &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ TypeVal: typeStr, NameVal: typeStr, }, } } -func createExtension(_ context.Context, params component.ExtensionCreateParams, cfg configmodels.Extension) (component.Extension, error) { +func createExtension(_ context.Context, params component.ExtensionCreateParams, cfg config.Extension) (component.Extension, error) { config := cfg.(*Config) return newProcessManager(config, params.Logger), nil } diff --git a/extension/fluentbitextension/factory_test.go b/extension/fluentbitextension/factory_test.go index f691cad906ad8..4a5861d5b9ef8 100644 --- a/extension/fluentbitextension/factory_test.go +++ b/extension/fluentbitextension/factory_test.go @@ -21,15 +21,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.uber.org/zap" ) func TestFactory_CreateDefaultConfig(t *testing.T) { cfg := createDefaultConfig() assert.Equal(t, &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ NameVal: typeStr, TypeVal: typeStr, }, diff --git a/extension/fluentbitextension/go.mod b/extension/fluentbitextension/go.mod index f57bddd55b48c..9912b34338925 100644 --- a/extension/fluentbitextension/go.mod +++ b/extension/fluentbitextension/go.mod @@ -6,6 +6,6 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/shirou/gopsutil v3.21.2+incompatible github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/extension/fluentbitextension/go.sum b/extension/fluentbitextension/go.sum index 26b9b46a9d8c6..0a39deebe6c12 100644 --- a/extension/fluentbitextension/go.sum +++ b/extension/fluentbitextension/go.sum @@ -807,7 +807,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -972,7 +971,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1030,8 +1028,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/extension/httpforwarder/config.go b/extension/httpforwarder/config.go index c124b0f0bdb9b..7a2772359b3bf 100644 --- a/extension/httpforwarder/config.go +++ b/extension/httpforwarder/config.go @@ -15,13 +15,13 @@ package httpforwarder import ( + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" ) // Config defines configuration for http forwarder extension. type Config struct { - configmodels.ExtensionSettings `mapstructure:",squash"` + config.ExtensionSettings `mapstructure:",squash"` // Ingress holds config settings for HTTP server listening for requests. Ingress confighttp.HTTPServerSettings `mapstructure:"ingress"` diff --git a/extension/httpforwarder/factory.go b/extension/httpforwarder/factory.go index 579cfb20dbdf5..e82ddf924381d 100644 --- a/extension/httpforwarder/factory.go +++ b/extension/httpforwarder/factory.go @@ -19,14 +19,14 @@ import ( "time" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/extension/extensionhelper" ) const ( // The value of extension "type" in configuration. - typeStr configmodels.Type = "http_forwarder" + typeStr config.Type = "http_forwarder" // Default endpoints to bind to. defaultEndpoint = ":6060" @@ -40,9 +40,9 @@ func NewFactory() component.ExtensionFactory { createExtension) } -func createDefaultConfig() configmodels.Extension { +func createDefaultConfig() config.Extension { return &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ TypeVal: typeStr, NameVal: string(typeStr), }, @@ -58,7 +58,7 @@ func createDefaultConfig() configmodels.Extension { func createExtension( _ context.Context, params component.ExtensionCreateParams, - cfg configmodels.Extension, + cfg config.Extension, ) (component.Extension, error) { return newHTTPForwarder(cfg.(*Config), params.Logger) } diff --git a/extension/httpforwarder/factory_test.go b/extension/httpforwarder/factory_test.go index 7543782e168a6..49e54d670ca20 100644 --- a/extension/httpforwarder/factory_test.go +++ b/extension/httpforwarder/factory_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtls" "go.uber.org/zap" ) @@ -32,11 +32,11 @@ import ( func TestFactory(t *testing.T) { f := NewFactory() expectType := "http_forwarder" - require.Equal(t, configmodels.Type(expectType), f.Type()) + require.Equal(t, config.Type(expectType), f.Type()) cfg := f.CreateDefaultConfig().(*Config) require.Equal(t, expectType, cfg.Name()) - require.Equal(t, configmodels.Type(expectType), cfg.Type()) + require.Equal(t, config.Type(expectType), cfg.Type()) require.Equal(t, ":6060", cfg.Ingress.Endpoint) require.Equal(t, 10*time.Second, cfg.Egress.Timeout) diff --git a/extension/httpforwarder/go.mod b/extension/httpforwarder/go.mod index 0b5550b19712a..38d836c6b9f3e 100644 --- a/extension/httpforwarder/go.mod +++ b/extension/httpforwarder/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/extension/httpforwarder/go.sum b/extension/httpforwarder/go.sum index 6f69371899b0d..1d5cbb506c9bc 100644 --- a/extension/httpforwarder/go.sum +++ b/extension/httpforwarder/go.sum @@ -891,8 +891,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/extension/observer/hostobserver/config.go b/extension/observer/hostobserver/config.go index d30b5767410e9..03fb4c6143b9b 100644 --- a/extension/observer/hostobserver/config.go +++ b/extension/observer/hostobserver/config.go @@ -17,12 +17,12 @@ package hostobserver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config defines configuration for host observer. type Config struct { - configmodels.ExtensionSettings `mapstructure:",squash"` + config.ExtensionSettings `mapstructure:",squash"` // RefreshInterval determines how frequency at which the observer // needs to poll for collecting information about new processes. diff --git a/extension/observer/hostobserver/config_test.go b/extension/observer/hostobserver/config_test.go index 210198ba12f80..75c5a72581ede 100644 --- a/extension/observer/hostobserver/config_test.go +++ b/extension/observer/hostobserver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -45,7 +45,7 @@ func TestLoadConfig(t *testing.T) { ext1 := cfg.Extensions["host_observer/all_settings"] assert.Equal(t, &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ TypeVal: "host_observer", NameVal: "host_observer/all_settings", }, diff --git a/extension/observer/hostobserver/factory.go b/extension/observer/hostobserver/factory.go index 87539d20e4029..570e640e350f3 100644 --- a/extension/observer/hostobserver/factory.go +++ b/extension/observer/hostobserver/factory.go @@ -19,13 +19,13 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/extension/extensionhelper" ) const ( // The value of extension "type" in configuration. - typeStr configmodels.Type = "host_observer" + typeStr config.Type = "host_observer" defaultCollectionInterval = 10 ) @@ -38,9 +38,9 @@ func NewFactory() component.ExtensionFactory { createExtension) } -func createDefaultConfig() configmodels.Extension { +func createDefaultConfig() config.Extension { return &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ TypeVal: typeStr, NameVal: string(typeStr), }, @@ -51,7 +51,7 @@ func createDefaultConfig() configmodels.Extension { func createExtension( _ context.Context, params component.ExtensionCreateParams, - cfg configmodels.Extension, + cfg config.Extension, ) (component.Extension, error) { config := cfg.(*Config) return newObserver(params.Logger, config) diff --git a/extension/observer/hostobserver/go.mod b/extension/observer/hostobserver/go.mod index 9a9e51d609225..d3495054e6600 100644 --- a/extension/observer/hostobserver/go.mod +++ b/extension/observer/hostobserver/go.mod @@ -14,7 +14,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/shirou/gopsutil v3.21.2+incompatible github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/extension/observer/hostobserver/go.sum b/extension/observer/hostobserver/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/extension/observer/hostobserver/go.sum +++ b/extension/observer/hostobserver/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/extension/observer/k8sobserver/config.go b/extension/observer/k8sobserver/config.go index b8537410181a8..a0ab7ce083fe7 100644 --- a/extension/observer/k8sobserver/config.go +++ b/extension/observer/k8sobserver/config.go @@ -15,15 +15,15 @@ package k8sobserver import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" ) // Config defines configuration for k8s attributes processor. type Config struct { - configmodels.ExtensionSettings `mapstructure:",squash"` - k8sconfig.APIConfig `mapstructure:",squash"` + config.ExtensionSettings `mapstructure:",squash"` + k8sconfig.APIConfig `mapstructure:",squash"` // Node should be set to the node name to limit discovered endpoints to. For example, node name can // be set using the downward API inside the collector pod spec as follows: diff --git a/extension/observer/k8sobserver/config_test.go b/extension/observer/k8sobserver/config_test.go index c13721025dce0..238096e78a110 100644 --- a/extension/observer/k8sobserver/config_test.go +++ b/extension/observer/k8sobserver/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" @@ -46,7 +46,7 @@ func TestLoadConfig(t *testing.T) { ext1 := cfg.Extensions["k8s_observer/1"] assert.Equal(t, &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ TypeVal: "k8s_observer", NameVal: "k8s_observer/1", }, diff --git a/extension/observer/k8sobserver/factory.go b/extension/observer/k8sobserver/factory.go index 2faf87706405c..44e35320e5794 100644 --- a/extension/observer/k8sobserver/factory.go +++ b/extension/observer/k8sobserver/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/client-go/kubernetes" @@ -30,7 +30,7 @@ import ( const ( // The value of extension "type" in configuration. - typeStr configmodels.Type = "k8s_observer" + typeStr config.Type = "k8s_observer" ) // Factory is the factory for the extension. @@ -43,14 +43,14 @@ type Factory struct { var _ component.Factory = (*Factory)(nil) // Type gets the type of the config created by this factory. -func (f *Factory) Type() configmodels.Type { +func (f *Factory) Type() config.Type { return typeStr } // CreateDefaultConfig creates the default configuration for the extension. -func (f *Factory) CreateDefaultConfig() configmodels.Extension { +func (f *Factory) CreateDefaultConfig() config.Extension { return &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ TypeVal: typeStr, NameVal: string(typeStr), }, @@ -62,7 +62,7 @@ func (f *Factory) CreateDefaultConfig() configmodels.Extension { func (f *Factory) CreateExtension( ctx context.Context, params component.ExtensionCreateParams, - cfg configmodels.Extension, + cfg config.Extension, ) (component.Extension, error) { config := cfg.(*Config) diff --git a/extension/observer/k8sobserver/factory_test.go b/extension/observer/k8sobserver/factory_test.go index 8b096b36d2e38..ee4ce9f2b6b45 100644 --- a/extension/observer/k8sobserver/factory_test.go +++ b/extension/observer/k8sobserver/factory_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.uber.org/zap" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" @@ -43,7 +43,7 @@ func TestFactory_CreateDefaultConfig(t *testing.T) { factory := Factory{createK8sClientset: nilClient} cfg := factory.CreateDefaultConfig() assert.Equal(t, &Config{ - ExtensionSettings: configmodels.ExtensionSettings{ + ExtensionSettings: config.ExtensionSettings{ TypeVal: typeStr, NameVal: string(typeStr), }, diff --git a/extension/observer/k8sobserver/go.mod b/extension/observer/k8sobserver/go.mod index 22af1aa7f0b81..462ae40cc3d80 100644 --- a/extension/observer/k8sobserver/go.mod +++ b/extension/observer/k8sobserver/go.mod @@ -14,7 +14,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.0.0-00010101000000-000000000000 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect k8s.io/api v0.20.5 diff --git a/extension/observer/k8sobserver/go.sum b/extension/observer/k8sobserver/go.sum index 986fd0245a304..b0b73564e340e 100644 --- a/extension/observer/k8sobserver/go.sum +++ b/extension/observer/k8sobserver/go.sum @@ -829,7 +829,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -996,7 +995,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1055,8 +1053,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/go.mod b/go.mod index a5ec7feee7cd7..e007acdab5235 100644 --- a/go.mod +++ b/go.mod @@ -61,7 +61,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 ) diff --git a/go.sum b/go.sum index c9ce676018125..262b720820761 100644 --- a/go.sum +++ b/go.sum @@ -1490,8 +1490,8 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.22.0/go.mod h1:sBkAGYUQSh1f+owCK0aPV2uLcUB6rPHEOWjdvuE2SdQ= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.opentelemetry.io/otel v0.19.0 h1:Lenfy7QHRXPZVsw/12CWpxX6d/JkrX8wrx2vO8G80Ng= go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg= go.opentelemetry.io/otel/metric v0.19.0 h1:dtZ1Ju44gkJkYvo+3qGqVXmf88tc+a42edOywypengg= diff --git a/internal/splunk/go.mod b/internal/splunk/go.mod index 20e1a36425579..24d578906fb44 100644 --- a/internal/splunk/go.mod +++ b/internal/splunk/go.mod @@ -5,6 +5,6 @@ go 1.15 require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/internal/splunk/go.sum b/internal/splunk/go.sum index 595a62d6f2d31..746c2a8378b37 100644 --- a/internal/splunk/go.sum +++ b/internal/splunk/go.sum @@ -897,8 +897,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/internal/stanza/config.go b/internal/stanza/config.go index 954dae8bd922e..434fb2ce9062a 100644 --- a/internal/stanza/config.go +++ b/internal/stanza/config.go @@ -16,14 +16,14 @@ package stanza import ( "github.com/open-telemetry/opentelemetry-log-collection/operator" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "gopkg.in/yaml.v2" ) // BaseConfig is the common configuration of a stanza-based receiver type BaseConfig struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - Operators OperatorConfigs `mapstructure:"operators"` + config.ReceiverSettings `mapstructure:",squash"` + Operators OperatorConfigs `mapstructure:"operators"` } // OperatorConfigs is an alias that allows for unmarshaling outside of mapstructure diff --git a/internal/stanza/factory.go b/internal/stanza/factory.go index 1900091e64b2f..4ade2d8d5033a 100644 --- a/internal/stanza/factory.go +++ b/internal/stanza/factory.go @@ -20,17 +20,17 @@ import ( "github.com/open-telemetry/opentelemetry-log-collection/agent" "github.com/open-telemetry/opentelemetry-log-collection/operator" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" ) // LogReceiverType is the interface used by stanza-based log receivers type LogReceiverType interface { - Type() configmodels.Type - CreateDefaultConfig() configmodels.Receiver - BaseConfig(configmodels.Receiver) BaseConfig - DecodeInputConfig(configmodels.Receiver) (*operator.Config, error) + Type() config.Type + CreateDefaultConfig() config.Receiver + BaseConfig(config.Receiver) BaseConfig + DecodeInputConfig(config.Receiver) (*operator.Config, error) } // NewFactory creates a factory for a Stanza-based receiver @@ -46,7 +46,7 @@ func createLogsReceiver(logReceiverType LogReceiverType) receiverhelper.CreateLo return func( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, nextConsumer consumer.Logs, ) (component.LogsReceiver, error) { inputCfg, err := logReceiverType.DecodeInputConfig(cfg) diff --git a/internal/stanza/go.mod b/internal/stanza/go.mod index 1093d028134b6..f6cae958d71b0 100644 --- a/internal/stanza/go.mod +++ b/internal/stanza/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/open-telemetry/opentelemetry-log-collection v0.16.1-0.20210315170618-aa8d82509c31 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/internal/stanza/go.sum b/internal/stanza/go.sum index 6026ad0b952eb..6eae8884c4cf6 100644 --- a/internal/stanza/go.sum +++ b/internal/stanza/go.sum @@ -935,8 +935,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.22.0/go.mod h1:sBkAGYUQSh1f+owCK0aPV2uLcUB6rPHEOWjdvuE2SdQ= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/internal/stanza/mocks_test.go b/internal/stanza/mocks_test.go index 2d0cde931fb6f..5653ba7054115 100644 --- a/internal/stanza/mocks_test.go +++ b/internal/stanza/mocks_test.go @@ -22,7 +22,7 @@ import ( "github.com/open-telemetry/opentelemetry-log-collection/operator" "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/transformer/noop" "github.com/open-telemetry/opentelemetry-log-collection/operator/helper" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" ) @@ -96,15 +96,15 @@ type TestConfig struct { } type TestReceiverType struct{} -func (f TestReceiverType) Type() configmodels.Type { - return configmodels.Type(testType) +func (f TestReceiverType) Type() config.Type { + return config.Type(testType) } -func (f TestReceiverType) CreateDefaultConfig() configmodels.Receiver { +func (f TestReceiverType) CreateDefaultConfig() config.Receiver { return &TestConfig{ BaseConfig: BaseConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(testType), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(testType), NameVal: testType, }, Operators: OperatorConfigs{}, @@ -113,11 +113,11 @@ func (f TestReceiverType) CreateDefaultConfig() configmodels.Receiver { } } -func (f TestReceiverType) BaseConfig(cfg configmodels.Receiver) BaseConfig { +func (f TestReceiverType) BaseConfig(cfg config.Receiver) BaseConfig { return cfg.(*TestConfig).BaseConfig } -func (f TestReceiverType) DecodeInputConfig(cfg configmodels.Receiver) (*operator.Config, error) { +func (f TestReceiverType) DecodeInputConfig(cfg config.Receiver) (*operator.Config, error) { testConfig := cfg.(*TestConfig) // Allow tests to run without implementing input config diff --git a/internal/tools/go.mod b/internal/tools/go.mod index cdba8368cf420..e0c97e92ff7ea 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -11,6 +11,5 @@ require ( github.com/tcnksm/ghr v0.13.0 go.opentelemetry.io/collector/cmd/checkdoc v0.0.0-20210315221557-cadd84d04ee9 go.opentelemetry.io/collector/cmd/issuegenerator v0.23.0 - go.opentelemetry.io/collector/cmd/mdatagen v0.23.0 - + go.opentelemetry.io/collector/cmd/mdatagen v0.23.1-0.20210326203202-f5bfc3c516be ) diff --git a/internal/tools/go.sum b/internal/tools/go.sum index e04e1413ff35d..dd2e188ce5777 100644 --- a/internal/tools/go.sum +++ b/internal/tools/go.sum @@ -540,8 +540,8 @@ go.opentelemetry.io/collector/cmd/checkdoc v0.0.0-20210315221557-cadd84d04ee9 h1 go.opentelemetry.io/collector/cmd/checkdoc v0.0.0-20210315221557-cadd84d04ee9/go.mod h1:ocXcey1UOABwvbGLqOrCPY5TDxEV+T5XW4KoEicDZfs= go.opentelemetry.io/collector/cmd/issuegenerator v0.23.0 h1:ujQkaBgJVA/wPCZHzk8IJclwbykY/wwxWmVkf4KPTug= go.opentelemetry.io/collector/cmd/issuegenerator v0.23.0/go.mod h1:RAUZ03z9JaCu9D+ox5p7LDcv/d4D02EiBJg0sOOzoVY= -go.opentelemetry.io/collector/cmd/mdatagen v0.23.0 h1:Y3QhraqD0B5guF3kKxG9Bh+Gr4HuQ8S1EbCh96k+nqE= -go.opentelemetry.io/collector/cmd/mdatagen v0.23.0/go.mod h1:oWCxEeYMK/9i6cQEVs5YCWr5Q5KZn9uxnLLQxm8j/S4= +go.opentelemetry.io/collector/cmd/mdatagen v0.23.1-0.20210326203202-f5bfc3c516be h1:16K8zHqBu5wZvu84GOlOqXulybVAIfweOIKfbDLNTBY= +go.opentelemetry.io/collector/cmd/mdatagen v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:oWCxEeYMK/9i6cQEVs5YCWr5Q5KZn9uxnLLQxm8j/S4= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/pkg/batchperresourceattr/go.mod b/pkg/batchperresourceattr/go.mod index a894e695b2fd8..1c3aaaa2fabc1 100644 --- a/pkg/batchperresourceattr/go.mod +++ b/pkg/batchperresourceattr/go.mod @@ -4,5 +4,5 @@ go 1.14 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be ) diff --git a/pkg/batchperresourceattr/go.sum b/pkg/batchperresourceattr/go.sum index 5d16acf22c168..30c43315cf3bd 100644 --- a/pkg/batchperresourceattr/go.sum +++ b/pkg/batchperresourceattr/go.sum @@ -872,8 +872,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/pkg/batchpersignal/go.mod b/pkg/batchpersignal/go.mod index 0e26976b3d2df..7d267235252fc 100644 --- a/pkg/batchpersignal/go.mod +++ b/pkg/batchpersignal/go.mod @@ -4,5 +4,5 @@ go 1.14 require ( github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be ) diff --git a/pkg/batchpersignal/go.sum b/pkg/batchpersignal/go.sum index 5d16acf22c168..30c43315cf3bd 100644 --- a/pkg/batchpersignal/go.sum +++ b/pkg/batchpersignal/go.sum @@ -872,8 +872,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/pkg/batchpertrace/go.mod b/pkg/batchpertrace/go.mod index e9a8f8ae0fd1c..60e727f20ec89 100644 --- a/pkg/batchpertrace/go.mod +++ b/pkg/batchpertrace/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be ) replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal => ../batchpersignal diff --git a/pkg/batchpertrace/go.sum b/pkg/batchpertrace/go.sum index 5d16acf22c168..30c43315cf3bd 100644 --- a/pkg/batchpertrace/go.sum +++ b/pkg/batchpertrace/go.sum @@ -872,8 +872,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/processor/groupbyattrsprocessor/config.go b/processor/groupbyattrsprocessor/config.go index e6494b5fd8407..b51dd36b275db 100644 --- a/processor/groupbyattrsprocessor/config.go +++ b/processor/groupbyattrsprocessor/config.go @@ -15,12 +15,12 @@ package groupbyattrsprocessor import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config is the configuration for the processor. type Config struct { - configmodels.ProcessorSettings `mapstructure:",squash"` + config.ProcessorSettings `mapstructure:",squash"` // GroupByKeys describes the attribute names that are going to be used for grouping. // Must include at least one attribute name. diff --git a/processor/groupbyattrsprocessor/config_test.go b/processor/groupbyattrsprocessor/config_test.go index 28027c2bd5b0e..130a41af94ba9 100644 --- a/processor/groupbyattrsprocessor/config_test.go +++ b/processor/groupbyattrsprocessor/config_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" ) @@ -36,18 +36,18 @@ func TestLoadConfig(t *testing.T) { err = configcheck.ValidateConfig(factory.CreateDefaultConfig()) require.NoError(t, err) - config, err := configtest.LoadConfigFile( + cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories) require.Nil(t, err) - require.NotNil(t, config) + require.NotNil(t, cfg) - conf := config.Processors["groupbyattrs/custom"] + conf := cfg.Processors["groupbyattrs/custom"] assert.Equal(t, conf, &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: "groupbyattrs", NameVal: "groupbyattrs/custom", }, diff --git a/processor/groupbyattrsprocessor/factory.go b/processor/groupbyattrsprocessor/factory.go index 341435ca185b5..1676057c4cedf 100644 --- a/processor/groupbyattrsprocessor/factory.go +++ b/processor/groupbyattrsprocessor/factory.go @@ -21,7 +21,7 @@ import ( "go.opencensus.io/stats/view" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor/processorhelper" "go.uber.org/zap" @@ -29,7 +29,7 @@ import ( const ( // typeStr is the value of "type" for this processor in the configuration. - typeStr configmodels.Type = "groupbyattrs" + typeStr config.Type = "groupbyattrs" ) var ( @@ -54,9 +54,9 @@ func NewFactory() component.ProcessorFactory { } // createDefaultConfig creates the default configuration for the processor. -func createDefaultConfig() configmodels.Processor { +func createDefaultConfig() config.Processor { return &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: string(typeStr), }, @@ -91,7 +91,7 @@ func createGroupByAttrsProcessor(logger *zap.Logger, attributes []string) (*grou func createTraceProcessor( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextConsumer consumer.Traces) (component.TracesProcessor, error) { oCfg := cfg.(*Config) @@ -111,7 +111,7 @@ func createTraceProcessor( func createLogsProcessor( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextConsumer consumer.Logs) (component.LogsProcessor, error) { oCfg := cfg.(*Config) diff --git a/processor/groupbyattrsprocessor/factory_test.go b/processor/groupbyattrsprocessor/factory_test.go index a3a18b012250d..a09ef75cf8a10 100644 --- a/processor/groupbyattrsprocessor/factory_test.go +++ b/processor/groupbyattrsprocessor/factory_test.go @@ -24,43 +24,39 @@ import ( "go.uber.org/zap" ) -var ( - config = &Config{ - GroupByKeys: []string{"foo"}, - } - - logger, _ = zap.NewDevelopment() - - params = component.ProcessorCreateParams{ - Logger: logger, - } -) - func TestDefaultConfiguration(t *testing.T) { c := createDefaultConfig().(*Config) assert.Empty(t, c.GroupByKeys) } func TestCreateTestProcessor(t *testing.T) { - tp, err := createTraceProcessor(context.Background(), params, config, consumertest.NewTracesNop()) + cfg := &Config{ + GroupByKeys: []string{"foo"}, + } + + params := component.ProcessorCreateParams{ + Logger: zap.NewNop(), + } + + tp, err := createTraceProcessor(context.Background(), params, cfg, consumertest.NewTracesNop()) assert.NoError(t, err) assert.NotNil(t, tp) assert.Equal(t, true, tp.GetCapabilities().MutatesConsumedData) - lp, err := createLogsProcessor(context.Background(), params, config, consumertest.NewLogsNop()) + lp, err := createLogsProcessor(context.Background(), params, cfg, consumertest.NewLogsNop()) assert.NoError(t, err) assert.NotNil(t, lp) assert.Equal(t, true, lp.GetCapabilities().MutatesConsumedData) } func TestNoKeys(t *testing.T) { - gbap, err := createGroupByAttrsProcessor(logger, []string{}) + gbap, err := createGroupByAttrsProcessor(zap.NewNop(), []string{}) assert.Error(t, err) assert.Nil(t, gbap) } func TestDuplicateKeys(t *testing.T) { - gbap, err := createGroupByAttrsProcessor(logger, []string{"foo", "foo", ""}) + gbap, err := createGroupByAttrsProcessor(zap.NewNop(), []string{"foo", "foo", ""}) assert.NoError(t, err) assert.NotNil(t, gbap) assert.EqualValues(t, []string{"foo"}, gbap.groupByKeys) diff --git a/processor/groupbyattrsprocessor/go.mod b/processor/groupbyattrsprocessor/go.mod index c73f6ad158da8..7bcd091ea08de 100644 --- a/processor/groupbyattrsprocessor/go.mod +++ b/processor/groupbyattrsprocessor/go.mod @@ -13,7 +13,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/processor/groupbyattrsprocessor/go.sum b/processor/groupbyattrsprocessor/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/processor/groupbyattrsprocessor/go.sum +++ b/processor/groupbyattrsprocessor/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/processor/groupbyattrsprocessor/processor_test.go b/processor/groupbyattrsprocessor/processor_test.go index ead5a8ac4d746..d982d67859956 100644 --- a/processor/groupbyattrsprocessor/processor_test.go +++ b/processor/groupbyattrsprocessor/processor_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/consumer/pdata" + "go.uber.org/zap" ) var ( @@ -168,7 +169,7 @@ func TestComplexAttributeGrouping(t *testing.T) { inputLogs := someComplexLogs(tt.withResourceAttrIndex, tt.inputResourceCount, tt.inputInstrumentationLibraryCount) inputTraces := someComplexTraces(tt.withResourceAttrIndex, tt.inputResourceCount, tt.inputInstrumentationLibraryCount) - gap, err := createGroupByAttrsProcessor(logger, []string{"commonGroupedAttr"}) + gap, err := createGroupByAttrsProcessor(zap.NewNop(), []string{"commonGroupedAttr"}) require.NoError(t, err) processedLogs, err := gap.ProcessLogs(context.Background(), inputLogs) @@ -250,7 +251,7 @@ func TestAttributeGrouping(t *testing.T) { logs := someLogs(attrMap, tt.count) spans := someSpans(attrMap, tt.count) - gap, err := createGroupByAttrsProcessor(logger, tt.groupByKeys) + gap, err := createGroupByAttrsProcessor(zap.NewNop(), tt.groupByKeys) require.NoError(t, err) expectedResource := prepareResource(attrMap, tt.groupByKeys) diff --git a/processor/groupbytraceprocessor/config.go b/processor/groupbytraceprocessor/config.go index db0c313581188..71ded0c2b27c3 100644 --- a/processor/groupbytraceprocessor/config.go +++ b/processor/groupbytraceprocessor/config.go @@ -17,12 +17,12 @@ package groupbytraceprocessor import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config is the configuration for the processor. type Config struct { - configmodels.ProcessorSettings `mapstructure:",squash"` + config.ProcessorSettings `mapstructure:",squash"` // NumTraces is the max number of traces to keep in memory waiting for the duration. // Default: 1_000_000. diff --git a/processor/groupbytraceprocessor/factory.go b/processor/groupbytraceprocessor/factory.go index aaf718eeaf1f0..5b2f417b9b118 100644 --- a/processor/groupbytraceprocessor/factory.go +++ b/processor/groupbytraceprocessor/factory.go @@ -21,14 +21,14 @@ import ( "go.opencensus.io/stats/view" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor/processorhelper" ) const ( // typeStr is the value of "type" for this processor in the configuration. - typeStr configmodels.Type = "groupbytrace" + typeStr config.Type = "groupbytrace" ) var ( @@ -53,9 +53,9 @@ func NewFactory() component.ProcessorFactory { } // createDefaultConfig creates the default configuration for the processor. -func createDefaultConfig() configmodels.Processor { +func createDefaultConfig() config.Processor { return &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: string(typeStr), }, @@ -72,7 +72,7 @@ func createDefaultConfig() configmodels.Processor { func createTraceProcessor( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextConsumer consumer.Traces) (component.TracesProcessor, error) { oCfg := cfg.(*Config) diff --git a/processor/groupbytraceprocessor/go.mod b/processor/groupbytraceprocessor/go.mod index cbf82969ac24d..8352f3d7012aa 100644 --- a/processor/groupbytraceprocessor/go.mod +++ b/processor/groupbytraceprocessor/go.mod @@ -6,7 +6,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/processor/groupbytraceprocessor/go.sum b/processor/groupbytraceprocessor/go.sum index c1a08301eb7ea..bf41edf86304a 100644 --- a/processor/groupbytraceprocessor/go.sum +++ b/processor/groupbytraceprocessor/go.sum @@ -892,8 +892,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/processor/k8sprocessor/config.go b/processor/k8sprocessor/config.go index 4f93c1ff91221..5216a0348c68a 100644 --- a/processor/k8sprocessor/config.go +++ b/processor/k8sprocessor/config.go @@ -15,14 +15,14 @@ package k8sprocessor import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" ) // Config defines configuration for k8s attributes processor. type Config struct { - configmodels.ProcessorSettings `mapstructure:",squash"` + config.ProcessorSettings `mapstructure:",squash"` k8sconfig.APIConfig `mapstructure:",squash"` diff --git a/processor/k8sprocessor/config_test.go b/processor/k8sprocessor/config_test.go index 47690810b07c6..3a8ead0fb78bc 100644 --- a/processor/k8sprocessor/config_test.go +++ b/processor/k8sprocessor/config_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" @@ -32,34 +32,34 @@ func TestLoadConfig(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Processors[configmodels.Type(typeStr)] = factory + factories.Processors[config.Type(typeStr)] = factory require.NoError(t, err) err = configcheck.ValidateConfig(factory.CreateDefaultConfig()) require.NoError(t, err) - config, err := configtest.LoadConfigFile( + cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories) require.Nil(t, err) - require.NotNil(t, config) + require.NotNil(t, cfg) - p0 := config.Processors["k8s_tagger"] + p0 := cfg.Processors["k8s_tagger"] assert.Equal(t, p0, &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: "k8s_tagger", NameVal: "k8s_tagger", }, APIConfig: k8sconfig.APIConfig{AuthType: k8sconfig.AuthTypeServiceAccount}, }) - p1 := config.Processors["k8s_tagger/2"] + p1 := cfg.Processors["k8s_tagger/2"] assert.Equal(t, p1, &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: "k8s_tagger", NameVal: "k8s_tagger/2", }, diff --git a/processor/k8sprocessor/factory.go b/processor/k8sprocessor/factory.go index 0400968fe8d5e..0699bc3f25d61 100644 --- a/processor/k8sprocessor/factory.go +++ b/processor/k8sprocessor/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor/processorhelper" @@ -45,10 +45,10 @@ func NewFactory() component.ProcessorFactory { ) } -func createDefaultConfig() configmodels.Processor { +func createDefaultConfig() config.Processor { return &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ - TypeVal: configmodels.Type(typeStr), + ProcessorSettings: config.ProcessorSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, APIConfig: k8sconfig.APIConfig{AuthType: k8sconfig.AuthTypeServiceAccount}, @@ -58,7 +58,7 @@ func createDefaultConfig() configmodels.Processor { func createTraceProcessor( ctx context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, next consumer.Traces, ) (component.TracesProcessor, error) { return createTraceProcessorWithOptions(ctx, params, cfg, next) @@ -67,7 +67,7 @@ func createTraceProcessor( func createLogsProcessor( ctx context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextLogsConsumer consumer.Logs, ) (component.LogsProcessor, error) { return createLogsProcessorWithOptions(ctx, params, cfg, nextLogsConsumer) @@ -76,7 +76,7 @@ func createLogsProcessor( func createMetricsProcessor( ctx context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextMetricsConsumer consumer.Metrics, ) (component.MetricsProcessor, error) { return createMetricsProcessorWithOptions(ctx, params, cfg, nextMetricsConsumer) @@ -85,7 +85,7 @@ func createMetricsProcessor( func createTraceProcessorWithOptions( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, next consumer.Traces, options ...Option, ) (component.TracesProcessor, error) { @@ -106,7 +106,7 @@ func createTraceProcessorWithOptions( func createMetricsProcessorWithOptions( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextMetricsConsumer consumer.Metrics, options ...Option, ) (component.MetricsProcessor, error) { @@ -127,7 +127,7 @@ func createMetricsProcessorWithOptions( func createLogsProcessorWithOptions( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextLogsConsumer consumer.Logs, options ...Option, ) (component.LogsProcessor, error) { @@ -147,7 +147,7 @@ func createLogsProcessorWithOptions( func createKubernetesProcessor( params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, options ...Option, ) (*kubernetesprocessor, error) { kp := &kubernetesprocessor{logger: params.Logger} @@ -171,7 +171,7 @@ func createKubernetesProcessor( return kp, nil } -func createProcessorOpts(cfg configmodels.Processor) []Option { +func createProcessorOpts(cfg config.Processor) []Option { oCfg := cfg.(*Config) opts := []Option{} if oCfg.Passthrough { diff --git a/processor/k8sprocessor/go.mod b/processor/k8sprocessor/go.mod index 475e9e62542e1..e8a443bb9e784 100644 --- a/processor/k8sprocessor/go.mod +++ b/processor/k8sprocessor/go.mod @@ -14,7 +14,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect k8s.io/api v0.20.5 diff --git a/processor/k8sprocessor/go.sum b/processor/k8sprocessor/go.sum index 986fd0245a304..b0b73564e340e 100644 --- a/processor/k8sprocessor/go.sum +++ b/processor/k8sprocessor/go.sum @@ -829,7 +829,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -996,7 +995,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1055,8 +1053,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/processor/k8sprocessor/processor_test.go b/processor/k8sprocessor/processor_test.go index 824328f36650f..b10fa84c42433 100644 --- a/processor/k8sprocessor/processor_test.go +++ b/processor/k8sprocessor/processor_test.go @@ -25,7 +25,7 @@ import ( "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/consumer/pdata" @@ -36,7 +36,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sprocessor/kube" ) -func newTraceProcessor(cfg configmodels.Processor, next consumer.Traces, options ...Option) (component.TracesProcessor, error) { +func newTraceProcessor(cfg config.Processor, next consumer.Traces, options ...Option) (component.TracesProcessor, error) { opts := append(options, withKubeClientProvider(newFakeClient)) return createTraceProcessorWithOptions( context.Background(), @@ -47,7 +47,7 @@ func newTraceProcessor(cfg configmodels.Processor, next consumer.Traces, options ) } -func newMetricsProcessor(cfg configmodels.Processor, nextMetricsConsumer consumer.Metrics, options ...Option) (component.MetricsProcessor, error) { +func newMetricsProcessor(cfg config.Processor, nextMetricsConsumer consumer.Metrics, options ...Option) (component.MetricsProcessor, error) { opts := append(options, withKubeClientProvider(newFakeClient)) return createMetricsProcessorWithOptions( context.Background(), @@ -58,7 +58,7 @@ func newMetricsProcessor(cfg configmodels.Processor, nextMetricsConsumer consume ) } -func newLogsProcessor(cfg configmodels.Processor, nextLogsConsumer consumer.Logs, options ...Option) (component.LogsProcessor, error) { +func newLogsProcessor(cfg config.Processor, nextLogsConsumer consumer.Logs, options ...Option) (component.LogsProcessor, error) { opts := append(options, withKubeClientProvider(newFakeClient)) return createLogsProcessorWithOptions( context.Background(), @@ -102,7 +102,7 @@ type multiTest struct { func newMultiTest( t *testing.T, - cfg configmodels.Processor, + cfg config.Processor, errFunc func(err error), options ...Option, ) *multiTest { diff --git a/processor/metricstransformprocessor/config.go b/processor/metricstransformprocessor/config.go index 1527fb87e0b8c..1b86b48a24ebf 100644 --- a/processor/metricstransformprocessor/config.go +++ b/processor/metricstransformprocessor/config.go @@ -15,7 +15,7 @@ package metricstransformprocessor import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) const ( @@ -55,7 +55,7 @@ const ( // Config defines configuration for Resource processor. type Config struct { - configmodels.ProcessorSettings `mapstructure:",squash"` + config.ProcessorSettings `mapstructure:",squash"` // Transform specifies a list of transforms on metrics with each transform focusing on one metric. Transforms []Transform `mapstructure:"transforms"` diff --git a/processor/metricstransformprocessor/config_test.go b/processor/metricstransformprocessor/config_test.go index 9fecea84fd42a..8ae5fbd7c9e26 100644 --- a/processor/metricstransformprocessor/config_test.go +++ b/processor/metricstransformprocessor/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -35,7 +35,7 @@ func TestLoadingFullConfig(t *testing.T) { configFile: "config_full.yaml", filterName: "metricstransform", expCfg: &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: "metricstransform", NameVal: "metricstransform", }, @@ -55,7 +55,7 @@ func TestLoadingFullConfig(t *testing.T) { configFile: "config_full.yaml", filterName: "metricstransform/multiple", expCfg: &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: "metricstransform", NameVal: "metricstransform/multiple", }, @@ -142,7 +142,7 @@ func TestLoadingFullConfig(t *testing.T) { configFile: "config_deprecated.yaml", filterName: "metricstransform", expCfg: &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "metricstransform", TypeVal: typeStr, }, @@ -164,7 +164,7 @@ func TestLoadingFullConfig(t *testing.T) { assert.NoError(t, err) factory := NewFactory() - factories.Processors[configmodels.Type(typeStr)] = factory + factories.Processors[config.Type(typeStr)] = factory config, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", test.configFile), factories) assert.NoError(t, err) require.NotNil(t, config) diff --git a/processor/metricstransformprocessor/factory.go b/processor/metricstransformprocessor/factory.go index b06e245e7be31..57895d0f3d60a 100644 --- a/processor/metricstransformprocessor/factory.go +++ b/processor/metricstransformprocessor/factory.go @@ -21,7 +21,7 @@ import ( "strings" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor/processorhelper" ) @@ -41,9 +41,9 @@ func NewFactory() component.ProcessorFactory { processorhelper.WithMetrics(createMetricsProcessor)) } -func createDefaultConfig() configmodels.Processor { +func createDefaultConfig() config.Processor { return &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -53,7 +53,7 @@ func createDefaultConfig() configmodels.Processor { func createMetricsProcessor( ctx context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextConsumer consumer.Metrics, ) (component.MetricsProcessor, error) { oCfg := cfg.(*Config) diff --git a/processor/metricstransformprocessor/factory_test.go b/processor/metricstransformprocessor/factory_test.go index 19426215a3f84..afb13f0dfe38a 100644 --- a/processor/metricstransformprocessor/factory_test.go +++ b/processor/metricstransformprocessor/factory_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/consumer/consumertest" "go.uber.org/zap" @@ -34,14 +34,14 @@ import ( func TestType(t *testing.T) { factory := NewFactory() pType := factory.Type() - assert.Equal(t, pType, configmodels.Type("metricstransform")) + assert.Equal(t, pType, config.Type("metricstransform")) } func TestCreateDefaultConfig(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() assert.Equal(t, cfg, &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: typeStr, TypeVal: typeStr, }, diff --git a/processor/metricstransformprocessor/go.mod b/processor/metricstransformprocessor/go.mod index 8af61681a13aa..6bdcdbae43ec6 100644 --- a/processor/metricstransformprocessor/go.mod +++ b/processor/metricstransformprocessor/go.mod @@ -14,7 +14,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/processor/metricstransformprocessor/go.sum b/processor/metricstransformprocessor/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/processor/metricstransformprocessor/go.sum +++ b/processor/metricstransformprocessor/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/processor/metricstransformprocessor/metrics_transform_processor_group_test.go b/processor/metricstransformprocessor/metrics_transform_processor_group_test.go index 9a0ab85d79645..51791d85cd1ae 100644 --- a/processor/metricstransformprocessor/metrics_transform_processor_group_test.go +++ b/processor/metricstransformprocessor/metrics_transform_processor_group_test.go @@ -26,7 +26,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/processor/processorhelper" "go.opentelemetry.io/collector/translator/internaldata" @@ -172,7 +172,7 @@ func TestMetricsGrouping(t *testing.T) { p := newMetricsTransformProcessor(zap.NewExample(), test.transforms) mtp, err := processorhelper.NewMetricsProcessor(&Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: typeStr, }, diff --git a/processor/metricstransformprocessor/metrics_transform_processor_test.go b/processor/metricstransformprocessor/metrics_transform_processor_test.go index 6d9e189e89baf..4e86b86f56ee9 100644 --- a/processor/metricstransformprocessor/metrics_transform_processor_test.go +++ b/processor/metricstransformprocessor/metrics_transform_processor_test.go @@ -23,7 +23,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/processor/processorhelper" "go.opentelemetry.io/collector/translator/internaldata" @@ -40,7 +40,7 @@ func TestMetricsTransformProcessor(t *testing.T) { mtp, err := processorhelper.NewMetricsProcessor( &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: typeStr, }, diff --git a/processor/resourcedetectionprocessor/config.go b/processor/resourcedetectionprocessor/config.go index ee710cb5440a1..4f5355c0d35f3 100644 --- a/processor/resourcedetectionprocessor/config.go +++ b/processor/resourcedetectionprocessor/config.go @@ -17,7 +17,7 @@ package resourcedetectionprocessor import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/aws/ec2" @@ -25,7 +25,7 @@ import ( // Config defines configuration for Resource processor. type Config struct { - configmodels.ProcessorSettings `mapstructure:",squash"` + config.ProcessorSettings `mapstructure:",squash"` // Detectors is an ordered list of named detectors that should be // run to attempt to detect resource information. Detectors []string `mapstructure:"detectors"` diff --git a/processor/resourcedetectionprocessor/config_test.go b/processor/resourcedetectionprocessor/config_test.go index 1d79193f97aba..6ef55bc57ec7c 100644 --- a/processor/resourcedetectionprocessor/config_test.go +++ b/processor/resourcedetectionprocessor/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal" @@ -44,7 +44,7 @@ func TestLoadConfig(t *testing.T) { p2 := cfg.Processors["resourcedetection/gce"] assert.Equal(t, p2, &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: "resourcedetection", NameVal: "resourcedetection/gce", }, @@ -55,7 +55,7 @@ func TestLoadConfig(t *testing.T) { p3 := cfg.Processors["resourcedetection/ec2"] assert.Equal(t, p3, &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: "resourcedetection", NameVal: "resourcedetection/ec2", }, diff --git a/processor/resourcedetectionprocessor/factory.go b/processor/resourcedetectionprocessor/factory.go index c2f755e5ef941..b0fd4ba7fbc47 100644 --- a/processor/resourcedetectionprocessor/factory.go +++ b/processor/resourcedetectionprocessor/factory.go @@ -21,7 +21,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor/processorhelper" @@ -81,13 +81,13 @@ func NewFactory() component.ProcessorFactory { } // Type gets the type of the Option config created by this factory. -func (*factory) Type() configmodels.Type { +func (*factory) Type() config.Type { return typeStr } -func createDefaultConfig() configmodels.Processor { +func createDefaultConfig() config.Processor { return &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -100,7 +100,7 @@ func createDefaultConfig() configmodels.Processor { func (f *factory) createTraceProcessor( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextConsumer consumer.Traces, ) (component.TracesProcessor, error) { rdp, err := f.getResourceDetectionProcessor(params, cfg) @@ -119,7 +119,7 @@ func (f *factory) createTraceProcessor( func (f *factory) createMetricsProcessor( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextConsumer consumer.Metrics, ) (component.MetricsProcessor, error) { rdp, err := f.getResourceDetectionProcessor(params, cfg) @@ -138,7 +138,7 @@ func (f *factory) createMetricsProcessor( func (f *factory) createLogsProcessor( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextConsumer consumer.Logs, ) (component.LogsProcessor, error) { rdp, err := f.getResourceDetectionProcessor(params, cfg) @@ -156,7 +156,7 @@ func (f *factory) createLogsProcessor( func (f *factory) getResourceDetectionProcessor( params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, ) (*resourceDetectionProcessor, error) { oCfg := cfg.(*Config) diff --git a/processor/resourcedetectionprocessor/go.mod b/processor/resourcedetectionprocessor/go.mod index abf5152a271e0..2b194d2583ebb 100644 --- a/processor/resourcedetectionprocessor/go.mod +++ b/processor/resourcedetectionprocessor/go.mod @@ -16,7 +16,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/processor/resourcedetectionprocessor/go.sum b/processor/resourcedetectionprocessor/go.sum index fa2fb47fa5325..7be5322fe6765 100644 --- a/processor/resourcedetectionprocessor/go.sum +++ b/processor/resourcedetectionprocessor/go.sum @@ -833,7 +833,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -999,7 +998,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1058,8 +1056,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/processor/routingprocessor/config.go b/processor/routingprocessor/config.go index 9d53d49c60889..b4dcb3a931263 100644 --- a/processor/routingprocessor/config.go +++ b/processor/routingprocessor/config.go @@ -15,12 +15,12 @@ package routingprocessor import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config defines configuration for the Routing processor. type Config struct { - configmodels.ProcessorSettings `mapstructure:",squash"` + config.ProcessorSettings `mapstructure:",squash"` // DefaultExporters contains the list of exporters to use when a more specific record can't be found in the routing table. // Optional. diff --git a/processor/routingprocessor/config_test.go b/processor/routingprocessor/config_test.go index e12b4fe07877e..fdd3727c4fbed 100644 --- a/processor/routingprocessor/config_test.go +++ b/processor/routingprocessor/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/jaegerexporter" "go.opentelemetry.io/collector/exporter/otlpexporter" @@ -46,7 +46,7 @@ func TestLoadConfig(t *testing.T) { parsed := cfg.Processors["routing"] assert.Equal(t, parsed, &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "routing", TypeVal: "routing", }, diff --git a/processor/routingprocessor/factory.go b/processor/routingprocessor/factory.go index c5c0742da066d..51ad9956b89d4 100644 --- a/processor/routingprocessor/factory.go +++ b/processor/routingprocessor/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor/processorhelper" ) @@ -37,16 +37,16 @@ func NewFactory() component.ProcessorFactory { ) } -func createDefaultConfig() configmodels.Processor { +func createDefaultConfig() config.Processor { return &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: typeStr, }, } } -func createTraceProcessor(_ context.Context, params component.ProcessorCreateParams, cfg configmodels.Processor, nextConsumer consumer.Traces) (component.TracesProcessor, error) { +func createTraceProcessor(_ context.Context, params component.ProcessorCreateParams, cfg config.Processor, nextConsumer consumer.Traces) (component.TracesProcessor, error) { _, ok := nextConsumer.(component.Processor) if ok { params.Logger.Warn("another processor has been defined after the routing processor: it will NOT receive any data!") diff --git a/processor/routingprocessor/factory_test.go b/processor/routingprocessor/factory_test.go index 104f7693b8c22..e9ca2e8999426 100644 --- a/processor/routingprocessor/factory_test.go +++ b/processor/routingprocessor/factory_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/processor/processorhelper" @@ -34,7 +34,7 @@ func TestProcessorGetsCreatedWithValidConfiguration(t *testing.T) { factory := NewFactory() creationParams := component.ProcessorCreateParams{Logger: zap.NewNop()} cfg := &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "routing", TypeVal: "routing", }, @@ -75,7 +75,7 @@ func TestProcessorFailsToBeCreatedWhenRouteHasNoExporters(t *testing.T) { factory := NewFactory() creationParams := component.ProcessorCreateParams{Logger: zap.NewNop()} cfg := &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "routing", TypeVal: "routing", }, @@ -101,7 +101,7 @@ func TestProcessorFailsToBeCreatedWhenNoRoutesExist(t *testing.T) { factory := NewFactory() creationParams := component.ProcessorCreateParams{Logger: zap.NewNop()} cfg := &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "routing", TypeVal: "routing", }, @@ -123,7 +123,7 @@ func TestProcessorFailsWithNoFromAttribute(t *testing.T) { factory := NewFactory() creationParams := component.ProcessorCreateParams{Logger: zap.NewNop()} cfg := &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "routing", TypeVal: "routing", }, @@ -149,7 +149,7 @@ func TestShouldNotFailWhenNextIsProcessor(t *testing.T) { factory := NewFactory() creationParams := component.ProcessorCreateParams{Logger: zap.NewNop()} cfg := &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "routing", TypeVal: "routing", }, @@ -178,7 +178,7 @@ func TestShutdown(t *testing.T) { factory := NewFactory() creationParams := component.ProcessorCreateParams{Logger: zap.NewNop()} cfg := &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "routing", TypeVal: "routing", }, diff --git a/processor/routingprocessor/go.mod b/processor/routingprocessor/go.mod index 668e0fa20f370..9cde0d5337703 100644 --- a/processor/routingprocessor/go.mod +++ b/processor/routingprocessor/go.mod @@ -12,7 +12,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/grpc v1.36.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/processor/routingprocessor/go.sum b/processor/routingprocessor/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/processor/routingprocessor/go.sum +++ b/processor/routingprocessor/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/processor/routingprocessor/routing.go b/processor/routingprocessor/routing.go index 9e90e4ba3a8b5..71cb42fdfd561 100644 --- a/processor/routingprocessor/routing.go +++ b/processor/routingprocessor/routing.go @@ -21,7 +21,7 @@ import ( "strings" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" "go.uber.org/zap" "google.golang.org/grpc/metadata" @@ -45,7 +45,7 @@ type processorImp struct { } // Crete new processor -func newProcessor(logger *zap.Logger, cfg configmodels.Exporter) (*processorImp, error) { +func newProcessor(logger *zap.Logger, cfg config.Exporter) (*processorImp, error) { logger.Info("building processor") oCfg := cfg.(*Config) @@ -78,7 +78,7 @@ func (e *processorImp) Start(_ context.Context, host component.Host) error { // first, let's build a map of exporter names with the exporter instances source := host.GetExporters() availableExporters := map[string]component.TracesExporter{} - for k, exp := range source[configmodels.TracesDataType] { + for k, exp := range source[config.TracesDataType] { traceExp, ok := exp.(component.TracesExporter) if !ok { return fmt.Errorf("the exporter %q isn't a trace exporter", k.Name()) diff --git a/processor/routingprocessor/routing_test.go b/processor/routingprocessor/routing_test.go index fec2fd96996a3..06aca8c9bfcac 100644 --- a/processor/routingprocessor/routing_test.go +++ b/processor/routingprocessor/routing_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/otlpexporter" "go.uber.org/zap" @@ -127,7 +127,7 @@ func TestRegisterExportersForValidRoute(t *testing.T) { otlpExpFactory := otlpexporter.NewFactory() creationParams := component.ExporterCreateParams{Logger: zap.NewNop()} otlpConfig := &otlpexporter.Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "otlp", TypeVal: "otlp", }, @@ -139,9 +139,9 @@ func TestRegisterExportersForValidRoute(t *testing.T) { require.NoError(t, err) host := &mockHost{ Host: componenttest.NewNopHost(), - GetExportersFunc: func() map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter { - return map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter{ - configmodels.TracesDataType: { + GetExportersFunc: func() map[config.DataType]map[config.NamedEntity]component.Exporter { + return map[config.DataType]map[config.NamedEntity]component.Exporter{ + config.TracesDataType: { otlpConfig: otlpExp, }, } @@ -195,7 +195,7 @@ func TestErrorRequestedExporterNotFoundForDefaultRoute(t *testing.T) { otlpExpFactory := otlpexporter.NewFactory() creationParams := component.ExporterCreateParams{Logger: zap.NewNop()} otlpConfig := &otlpexporter.Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "otlp", TypeVal: "otlp", }, @@ -207,9 +207,9 @@ func TestErrorRequestedExporterNotFoundForDefaultRoute(t *testing.T) { require.NoError(t, err) host := &mockHost{ Host: componenttest.NewNopHost(), - GetExportersFunc: func() map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter { - return map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter{ - configmodels.TracesDataType: { + GetExportersFunc: func() map[config.DataType]map[config.NamedEntity]component.Exporter { + return map[config.DataType]map[config.NamedEntity]component.Exporter{ + config.TracesDataType: { otlpConfig: otlpExp, }, } @@ -238,16 +238,16 @@ func TestInvalidExporter(t *testing.T) { require.NoError(t, err) otlpConfig := &otlpexporter.Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "otlp", TypeVal: "otlp", }, } host := &mockHost{ Host: componenttest.NewNopHost(), - GetExportersFunc: func() map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter { - return map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter{ - configmodels.TracesDataType: { + GetExportersFunc: func() map[config.DataType]map[config.NamedEntity]component.Exporter { + return map[config.DataType]map[config.NamedEntity]component.Exporter{ + config.TracesDataType: { otlpConfig: &mockComponent{}, }, } @@ -425,10 +425,10 @@ func TestProcessorCapabilities(t *testing.T) { type mockHost struct { component.Host - GetExportersFunc func() map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter + GetExportersFunc func() map[config.DataType]map[config.NamedEntity]component.Exporter } -func (m *mockHost) GetExporters() map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter { +func (m *mockHost) GetExporters() map[config.DataType]map[config.NamedEntity]component.Exporter { if m.GetExportersFunc != nil { return m.GetExportersFunc() } diff --git a/processor/spanmetricsprocessor/config.go b/processor/spanmetricsprocessor/config.go index 3adace5d7319a..edd5f3c95f59e 100644 --- a/processor/spanmetricsprocessor/config.go +++ b/processor/spanmetricsprocessor/config.go @@ -17,7 +17,7 @@ package spanmetricsprocessor import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Dimension defines the dimension name and optional default value if the Dimension is missing from a span attribute. @@ -28,7 +28,7 @@ type Dimension struct { // Config defines the configuration options for spanmetricsprocessor. type Config struct { - configmodels.ProcessorSettings `mapstructure:",squash"` + config.ProcessorSettings `mapstructure:",squash"` // MetricsExporter is the name of the metrics exporter to use to ship metrics. MetricsExporter string `mapstructure:"metrics_exporter"` diff --git a/processor/spanmetricsprocessor/config_test.go b/processor/spanmetricsprocessor/config_test.go index e325191a9bcad..44b327b0c454e 100644 --- a/processor/spanmetricsprocessor/config_test.go +++ b/processor/spanmetricsprocessor/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/jaegerexporter" "go.opentelemetry.io/collector/exporter/otlpexporter" @@ -82,7 +82,7 @@ func TestLoadConfig(t *testing.T) { require.NotNil(t, cfg) assert.Equal(t, &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ NameVal: "spanmetrics", TypeVal: "spanmetrics", }, diff --git a/processor/spanmetricsprocessor/factory.go b/processor/spanmetricsprocessor/factory.go index b1c30643701c9..c8f1218abbf89 100644 --- a/processor/spanmetricsprocessor/factory.go +++ b/processor/spanmetricsprocessor/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor/processorhelper" ) @@ -37,15 +37,15 @@ func NewFactory() component.ProcessorFactory { ) } -func createDefaultConfig() configmodels.Processor { +func createDefaultConfig() config.Processor { return &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: typeStr, }, } } -func createTraceProcessor(_ context.Context, params component.ProcessorCreateParams, cfg configmodels.Processor, nextConsumer consumer.Traces) (component.TracesProcessor, error) { +func createTraceProcessor(_ context.Context, params component.ProcessorCreateParams, cfg config.Processor, nextConsumer consumer.Traces) (component.TracesProcessor, error) { return newProcessor(params.Logger, cfg, nextConsumer) } diff --git a/processor/spanmetricsprocessor/go.mod b/processor/spanmetricsprocessor/go.mod index 4b52ab5bbcf78..1a784bc8a3076 100644 --- a/processor/spanmetricsprocessor/go.mod +++ b/processor/spanmetricsprocessor/go.mod @@ -12,7 +12,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/grpc v1.36.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/processor/spanmetricsprocessor/go.sum b/processor/spanmetricsprocessor/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/processor/spanmetricsprocessor/go.sum +++ b/processor/spanmetricsprocessor/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/processor/spanmetricsprocessor/mocks/Host.go b/processor/spanmetricsprocessor/mocks/Host.go index ed2f8796ed272..47e1968306976 100644 --- a/processor/spanmetricsprocessor/mocks/Host.go +++ b/processor/spanmetricsprocessor/mocks/Host.go @@ -19,7 +19,7 @@ package mocks import ( mock "github.com/stretchr/testify/mock" component "go.opentelemetry.io/collector/component" - configmodels "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Host is an autogenerated mock type for the Host type @@ -28,15 +28,15 @@ type Host struct { } // GetExporters provides a mock function with given fields: -func (_m *Host) GetExporters() map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter { +func (_m *Host) GetExporters() map[config.DataType]map[config.NamedEntity]component.Exporter { ret := _m.Called() - var r0 map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter - if rf, ok := ret.Get(0).(func() map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter); ok { + var r0 map[config.DataType]map[config.NamedEntity]component.Exporter + if rf, ok := ret.Get(0).(func() map[config.DataType]map[config.NamedEntity]component.Exporter); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter) + r0 = ret.Get(0).(map[config.DataType]map[config.NamedEntity]component.Exporter) } } @@ -44,15 +44,15 @@ func (_m *Host) GetExporters() map[configmodels.DataType]map[configmodels.NamedE } // GetExtensions provides a mock function with given fields: -func (_m *Host) GetExtensions() map[configmodels.NamedEntity]component.Extension { +func (_m *Host) GetExtensions() map[config.NamedEntity]component.Extension { ret := _m.Called() - var r0 map[configmodels.NamedEntity]component.Extension - if rf, ok := ret.Get(0).(func() map[configmodels.NamedEntity]component.Extension); ok { + var r0 map[config.NamedEntity]component.Extension + if rf, ok := ret.Get(0).(func() map[config.NamedEntity]component.Extension); ok { r0 = rf() } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(map[configmodels.NamedEntity]component.Extension) + r0 = ret.Get(0).(map[config.NamedEntity]component.Extension) } } @@ -60,11 +60,11 @@ func (_m *Host) GetExtensions() map[configmodels.NamedEntity]component.Extension } // GetFactory provides a mock function with given fields: kind, componentType -func (_m *Host) GetFactory(kind component.Kind, componentType configmodels.Type) component.Factory { +func (_m *Host) GetFactory(kind component.Kind, componentType config.Type) component.Factory { ret := _m.Called(kind, componentType) var r0 component.Factory - if rf, ok := ret.Get(0).(func(component.Kind, configmodels.Type) component.Factory); ok { + if rf, ok := ret.Get(0).(func(component.Kind, config.Type) component.Factory); ok { r0 = rf(kind, componentType) } else { if ret.Get(0) != nil { diff --git a/processor/spanmetricsprocessor/processor.go b/processor/spanmetricsprocessor/processor.go index 1e80c46ecfbf7..7b575061e672e 100644 --- a/processor/spanmetricsprocessor/processor.go +++ b/processor/spanmetricsprocessor/processor.go @@ -25,7 +25,7 @@ import ( "unicode" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/translator/conventions" @@ -83,7 +83,7 @@ type processorImp struct { metricKeyToDimensions map[metricKey]dimKV } -func newProcessor(logger *zap.Logger, config configmodels.Exporter, nextConsumer consumer.Traces) (*processorImp, error) { +func newProcessor(logger *zap.Logger, config config.Exporter, nextConsumer consumer.Traces) (*processorImp, error) { logger.Info("Building spanmetricsprocessor") pConfig := config.(*Config) @@ -163,7 +163,7 @@ func (p *processorImp) Start(ctx context.Context, host component.Host) error { var availableMetricsExporters []string // The available list of exporters come from any configured metrics pipelines' exporters. - for k, exp := range exporters[configmodels.MetricsDataType] { + for k, exp := range exporters[config.MetricsDataType] { metricsExp, ok := exp.(component.MetricsExporter) if !ok { return fmt.Errorf("the exporter %q isn't a metrics exporter", k.Name()) diff --git a/processor/spanmetricsprocessor/processor_test.go b/processor/spanmetricsprocessor/processor_test.go index f570ab70cd485..a1304283e7fb0 100644 --- a/processor/spanmetricsprocessor/processor_test.go +++ b/processor/spanmetricsprocessor/processor_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configgrpc" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/exporter/otlpexporter" @@ -87,8 +87,8 @@ func TestProcessorStart(t *testing.T) { } { t.Run(tc.name, func(t *testing.T) { // Prepare - exporters := map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter{ - configmodels.MetricsDataType: { + exporters := map[config.DataType]map[config.NamedEntity]component.Exporter{ + config.MetricsDataType: { otlpConfig: tc.exporter, }, } @@ -468,7 +468,7 @@ func buildSpan(span span) pdata.Span { func newOTLPExporters(t *testing.T) (*otlpexporter.Config, component.MetricsExporter, component.TracesExporter) { otlpExpFactory := otlpexporter.NewFactory() otlpConfig := &otlpexporter.Config{ - ExporterSettings: configmodels.ExporterSettings{ + ExporterSettings: config.ExporterSettings{ NameVal: "otlp", TypeVal: "otlp", }, diff --git a/processor/tailsamplingprocessor/config.go b/processor/tailsamplingprocessor/config.go index 90edf0ac99439..8ade0f97e18b8 100644 --- a/processor/tailsamplingprocessor/config.go +++ b/processor/tailsamplingprocessor/config.go @@ -17,7 +17,7 @@ package tailsamplingprocessor import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // PolicyType indicates the type of sampling policy. @@ -79,7 +79,7 @@ type RateLimitingCfg struct { // Config holds the configuration for tail-based sampling. type Config struct { - configmodels.ProcessorSettings `mapstructure:",squash"` + config.ProcessorSettings `mapstructure:",squash"` // DecisionWait is the desired wait time from the arrival of the first span of // trace until the decision about sampling it or not is evaluated. DecisionWait time.Duration `mapstructure:"decision_wait"` diff --git a/processor/tailsamplingprocessor/config_test.go b/processor/tailsamplingprocessor/config_test.go index da8249f02282b..8f73e539432db 100644 --- a/processor/tailsamplingprocessor/config_test.go +++ b/processor/tailsamplingprocessor/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -39,7 +39,7 @@ func TestLoadConfig(t *testing.T) { assert.Equal(t, cfg.Processors["tail_sampling"], &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: "tail_sampling", NameVal: "tail_sampling", }, diff --git a/processor/tailsamplingprocessor/factory.go b/processor/tailsamplingprocessor/factory.go index 6cb455933cd8f..073cbffc7e7d9 100644 --- a/processor/tailsamplingprocessor/factory.go +++ b/processor/tailsamplingprocessor/factory.go @@ -21,7 +21,7 @@ import ( "go.opencensus.io/stats/view" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor/processorhelper" @@ -47,9 +47,9 @@ func NewFactory() component.ProcessorFactory { processorhelper.WithTraces(createTraceProcessor)) } -func createDefaultConfig() configmodels.Processor { +func createDefaultConfig() config.Processor { return &Config{ - ProcessorSettings: configmodels.ProcessorSettings{ + ProcessorSettings: config.ProcessorSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -61,7 +61,7 @@ func createDefaultConfig() configmodels.Processor { func createTraceProcessor( _ context.Context, params component.ProcessorCreateParams, - cfg configmodels.Processor, + cfg config.Processor, nextConsumer consumer.Traces, ) (component.TracesProcessor, error) { tCfg := cfg.(*Config) diff --git a/processor/tailsamplingprocessor/go.mod b/processor/tailsamplingprocessor/go.mod index 415f2d65096e7..dcb17ccd6f25f 100644 --- a/processor/tailsamplingprocessor/go.mod +++ b/processor/tailsamplingprocessor/go.mod @@ -14,7 +14,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/processor/tailsamplingprocessor/go.sum b/processor/tailsamplingprocessor/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/processor/tailsamplingprocessor/go.sum +++ b/processor/tailsamplingprocessor/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/awsecscontainermetricsreceiver/config.go b/receiver/awsecscontainermetricsreceiver/config.go index 6d327469a9dc7..c11250b004ca9 100644 --- a/receiver/awsecscontainermetricsreceiver/config.go +++ b/receiver/awsecscontainermetricsreceiver/config.go @@ -17,12 +17,12 @@ package awsecscontainermetricsreceiver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) // Config defines configuration for aws ecs container metrics receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` // CollectionInterval is the interval at which metrics should be collected CollectionInterval time.Duration `mapstructure:"collection_interval"` diff --git a/receiver/awsecscontainermetricsreceiver/config_test.go b/receiver/awsecscontainermetricsreceiver/config_test.go index 9dfc4e1a8f115..32e0fe73d9c32 100644 --- a/receiver/awsecscontainermetricsreceiver/config_test.go +++ b/receiver/awsecscontainermetricsreceiver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { factory := NewFactory() receiverType := "awsecscontainermetrics" - factories.Receivers[configmodels.Type(receiverType)] = factory + factories.Receivers[config.Type(receiverType)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -48,8 +48,8 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Receivers["awsecscontainermetrics/collection_interval_settings"].(*Config) assert.Equal(t, r2, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(receiverType), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(receiverType), NameVal: "awsecscontainermetrics/collection_interval_settings", }, CollectionInterval: 10 * time.Second, diff --git a/receiver/awsecscontainermetricsreceiver/factory.go b/receiver/awsecscontainermetricsreceiver/factory.go index b8acd7239d598..d1beba6900459 100644 --- a/receiver/awsecscontainermetricsreceiver/factory.go +++ b/receiver/awsecscontainermetricsreceiver/factory.go @@ -22,7 +22,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.uber.org/zap" @@ -48,9 +48,9 @@ func NewFactory() component.ReceiverFactory { } // createDefaultConfig returns a default config for the receiver. -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -62,7 +62,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - baseCfg configmodels.Receiver, + baseCfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { ecsTaskMetadataEndpointV4 := os.Getenv(awsecscontainermetrics.EndpointEnvKey) diff --git a/receiver/awsecscontainermetricsreceiver/go.mod b/receiver/awsecscontainermetricsreceiver/go.mod index 9a520f7f50f37..90c83c758e892 100644 --- a/receiver/awsecscontainermetricsreceiver/go.mod +++ b/receiver/awsecscontainermetricsreceiver/go.mod @@ -13,7 +13,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/receiver/awsecscontainermetricsreceiver/go.sum b/receiver/awsecscontainermetricsreceiver/go.sum index 5f9d6b025d9e2..2c87324ecfe73 100644 --- a/receiver/awsecscontainermetricsreceiver/go.sum +++ b/receiver/awsecscontainermetricsreceiver/go.sum @@ -828,7 +828,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -995,7 +994,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1054,8 +1052,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/awsxrayreceiver/config.go b/receiver/awsxrayreceiver/config.go index 42bb8fedc7180..456547171556e 100644 --- a/receiver/awsxrayreceiver/config.go +++ b/receiver/awsxrayreceiver/config.go @@ -15,7 +15,7 @@ package awsxrayreceiver import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver/internal/proxy" @@ -23,7 +23,7 @@ import ( // Config defines the configurations for an AWS X-Ray receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` // The `NetAddr` represents the UDP address // and port on which this receiver listens for X-Ray segment documents // emitted by the X-Ray SDK. diff --git a/receiver/awsxrayreceiver/config_test.go b/receiver/awsxrayreceiver/config_test.go index e982be7e9ee9e..c88e2e10323f6 100644 --- a/receiver/awsxrayreceiver/config_test.go +++ b/receiver/awsxrayreceiver/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/config/configtls" @@ -35,7 +35,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(awsxray.TypeStr)] = factory + factories.Receivers[config.Type(awsxray.TypeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -54,8 +54,8 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers[awsxray.TypeStr+"/udp_endpoint"].(*Config) assert.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(awsxray.TypeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(awsxray.TypeStr), NameVal: awsxray.TypeStr + "/udp_endpoint", }, NetAddr: confignet.NetAddr{ @@ -82,8 +82,8 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Receivers[awsxray.TypeStr+"/proxy_server"].(*Config) assert.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(awsxray.TypeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(awsxray.TypeStr), NameVal: awsxray.TypeStr + "/proxy_server", }, NetAddr: confignet.NetAddr{ diff --git a/receiver/awsxrayreceiver/factory.go b/receiver/awsxrayreceiver/factory.go index 1d6c3a79f022f..f605e8c1b532a 100644 --- a/receiver/awsxrayreceiver/factory.go +++ b/receiver/awsxrayreceiver/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -36,13 +36,13 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithTraces(createTraceReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { // reference the existing default configurations provided // in the X-Ray daemon: // https://github.com/aws/aws-xray-daemon/blob/master/pkg/cfg/cfg.go#L99 return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(awsxray.TypeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(awsxray.TypeStr), NameVal: awsxray.TypeStr, // X-Ray daemon defaults to 127.0.0.1:2000 but // the default in OT is 0.0.0.0. @@ -58,7 +58,7 @@ func createDefaultConfig() configmodels.Receiver { func createTraceReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Traces) (component.TracesReceiver, error) { rcfg := cfg.(*Config) return newReceiver(rcfg, consumer, params.Logger) diff --git a/receiver/awsxrayreceiver/factory_test.go b/receiver/awsxrayreceiver/factory_test.go index 750afd27f3dc3..20f53ada3e7eb 100644 --- a/receiver/awsxrayreceiver/factory_test.go +++ b/receiver/awsxrayreceiver/factory_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" "go.opentelemetry.io/collector/config/configerror" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/consumer/pdata" @@ -49,7 +49,7 @@ func TestCreateDefaultConfig(t *testing.T) { assert.NotNil(t, cfg, "failed to create default config") assert.NoError(t, configcheck.ValidateConfig(cfg)) - assert.Equal(t, configmodels.Type(awsxray.TypeStr), factory.Type()) + assert.Equal(t, config.Type(awsxray.TypeStr), factory.Type()) } func TestCreateTracesReceiver(t *testing.T) { diff --git a/receiver/awsxrayreceiver/go.mod b/receiver/awsxrayreceiver/go.mod index 1173f4e37e86b..bf3813804be20 100644 --- a/receiver/awsxrayreceiver/go.mod +++ b/receiver/awsxrayreceiver/go.mod @@ -15,7 +15,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/awsxray v0.0.0-00010101000000-000000000000 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/receiver/awsxrayreceiver/go.sum b/receiver/awsxrayreceiver/go.sum index d24c2670af964..9b7498ff040fd 100644 --- a/receiver/awsxrayreceiver/go.sum +++ b/receiver/awsxrayreceiver/go.sum @@ -826,7 +826,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -992,7 +991,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1051,8 +1049,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/awsxrayreceiver/receiver_test.go b/receiver/awsxrayreceiver/receiver_test.go index f30c5b7df1687..847de23e2a220 100644 --- a/receiver/awsxrayreceiver/receiver_test.go +++ b/receiver/awsxrayreceiver/receiver_test.go @@ -31,7 +31,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenterror" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" @@ -402,7 +402,7 @@ func createAndOptionallyStartReceiver( logger, recorded := logSetup() rcvr, err := newReceiver( &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ NameVal: receiverName, }, NetAddr: confignet.NetAddr{ diff --git a/receiver/carbonreceiver/config.go b/receiver/carbonreceiver/config.go index 2147ce5cd761f..c07c046db67a9 100644 --- a/receiver/carbonreceiver/config.go +++ b/receiver/carbonreceiver/config.go @@ -17,7 +17,7 @@ package carbonreceiver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver/protocol" @@ -32,7 +32,7 @@ const ( // Config defines configuration for the Carbon receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` confignet.NetAddr `mapstructure:",squash"` diff --git a/receiver/carbonreceiver/config_test.go b/receiver/carbonreceiver/config_test.go index 78227500c53d2..5aab5c2cab58f 100644 --- a/receiver/carbonreceiver/config_test.go +++ b/receiver/carbonreceiver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtest" @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -50,8 +50,8 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers["carbon/receiver_settings"].(*Config) assert.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: "carbon/receiver_settings", }, NetAddr: confignet.NetAddr{ @@ -69,8 +69,8 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Receivers["carbon/regex"].(*Config) assert.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: "carbon/regex", }, NetAddr: confignet.NetAddr{ diff --git a/receiver/carbonreceiver/factory.go b/receiver/carbonreceiver/factory.go index ac351fd8ca855..4e501c08f88cc 100644 --- a/receiver/carbonreceiver/factory.go +++ b/receiver/carbonreceiver/factory.go @@ -20,7 +20,7 @@ import ( "github.com/spf13/viper" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -79,10 +79,10 @@ func customUnmarshaler(sourceViperSection *viper.Viper, intoCfg interface{}) err return nil } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, NetAddr: confignet.NetAddr{ @@ -100,7 +100,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { diff --git a/receiver/carbonreceiver/go.mod b/receiver/carbonreceiver/go.mod index 9a167e3d8edd2..9e5357b832b66 100644 --- a/receiver/carbonreceiver/go.mod +++ b/receiver/carbonreceiver/go.mod @@ -15,7 +15,7 @@ require ( github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/receiver/carbonreceiver/go.sum b/receiver/carbonreceiver/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/receiver/carbonreceiver/go.sum +++ b/receiver/carbonreceiver/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/carbonreceiver/receiver_test.go b/receiver/carbonreceiver/receiver_test.go index aefb02757d8a3..a58022c325044 100644 --- a/receiver/carbonreceiver/receiver_test.go +++ b/receiver/carbonreceiver/receiver_test.go @@ -27,7 +27,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenterror" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" @@ -83,7 +83,7 @@ func Test_carbonreceiver_New(t *testing.T) { name: "empty_endpoint", args: args{ config: Config{ - ReceiverSettings: configmodels.ReceiverSettings{}, + ReceiverSettings: config.ReceiverSettings{}, }, nextConsumer: consumertest.NewMetricsNop(), }, @@ -93,7 +93,7 @@ func Test_carbonreceiver_New(t *testing.T) { name: "invalid_transport", args: args{ config: Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ NameVal: "invalid_transport_rcv", }, NetAddr: confignet.NetAddr{ @@ -113,7 +113,7 @@ func Test_carbonreceiver_New(t *testing.T) { name: "regex_parser", args: args{ config: Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ NameVal: "regex_parser_rcv", }, NetAddr: confignet.NetAddr{ @@ -138,7 +138,7 @@ func Test_carbonreceiver_New(t *testing.T) { name: "negative_tcp_idle_timeout", args: args{ config: Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ NameVal: "negative_tcp_idle_timeout", }, NetAddr: confignet.NetAddr{ diff --git a/receiver/collectdreceiver/config.go b/receiver/collectdreceiver/config.go index 40fcb8f8174ba..395c963c51510 100644 --- a/receiver/collectdreceiver/config.go +++ b/receiver/collectdreceiver/config.go @@ -17,14 +17,14 @@ package collectdreceiver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" ) // Config defines configuration for Collectd receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - confignet.TCPAddr `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` + confignet.TCPAddr `mapstructure:",squash"` Timeout time.Duration `mapstructure:"timeout"` AttributesPrefix string `mapstructure:"attributes_prefix"` diff --git a/receiver/collectdreceiver/config_test.go b/receiver/collectdreceiver/config_test.go index 1cba36fb3f729..9fc17d9b47dbf 100644 --- a/receiver/collectdreceiver/config_test.go +++ b/receiver/collectdreceiver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtest" ) @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -48,8 +48,8 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers["collectd/one"].(*Config) assert.Equal(t, r1, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: "collectd/one", }, TCPAddr: confignet.TCPAddr{ diff --git a/receiver/collectdreceiver/factory.go b/receiver/collectdreceiver/factory.go index 8eb50cbc68b2b..692c8c2eb6283 100644 --- a/receiver/collectdreceiver/factory.go +++ b/receiver/collectdreceiver/factory.go @@ -21,7 +21,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -43,10 +43,10 @@ func NewFactory() component.ReceiverFactory { createDefaultConfig, receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, TCPAddr: confignet.TCPAddr{ @@ -60,7 +60,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, nextConsumer consumer.Metrics, ) (component.MetricsReceiver, error) { c := cfg.(*Config) diff --git a/receiver/collectdreceiver/go.mod b/receiver/collectdreceiver/go.mod index 56123041f4de3..04464605a5f81 100644 --- a/receiver/collectdreceiver/go.mod +++ b/receiver/collectdreceiver/go.mod @@ -14,7 +14,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/receiver/collectdreceiver/go.sum b/receiver/collectdreceiver/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/receiver/collectdreceiver/go.sum +++ b/receiver/collectdreceiver/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/dockerstatsreceiver/config.go b/receiver/dockerstatsreceiver/config.go index 07e57b8f35904..c117f2373e9d4 100644 --- a/receiver/dockerstatsreceiver/config.go +++ b/receiver/dockerstatsreceiver/config.go @@ -18,13 +18,13 @@ import ( "errors" "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) -var _ configmodels.Receiver = (*Config)(nil) +var _ config.Receiver = (*Config)(nil) type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` // The URL of the docker server. Default is "unix:///var/run/docker.sock" Endpoint string `mapstructure:"endpoint"` // The time between each collection event. Default is 10s. diff --git a/receiver/dockerstatsreceiver/config_test.go b/receiver/dockerstatsreceiver/config_test.go index 9aeff54c6029b..fe7ac65f133b9 100644 --- a/receiver/dockerstatsreceiver/config_test.go +++ b/receiver/dockerstatsreceiver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -31,7 +31,7 @@ func TestLoadConfig(t *testing.T) { assert.NoError(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory config, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) diff --git a/receiver/dockerstatsreceiver/factory.go b/receiver/dockerstatsreceiver/factory.go index dba93abaadd81..4b9ecbcfa5cd4 100644 --- a/receiver/dockerstatsreceiver/factory.go +++ b/receiver/dockerstatsreceiver/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -35,9 +35,9 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -50,7 +50,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - config configmodels.Receiver, + config config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { dockerConfig := config.(*Config) diff --git a/receiver/dockerstatsreceiver/go.mod b/receiver/dockerstatsreceiver/go.mod index 2e3498040c85d..50b90b5b0d92f 100644 --- a/receiver/dockerstatsreceiver/go.mod +++ b/receiver/dockerstatsreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 ) diff --git a/receiver/dockerstatsreceiver/go.sum b/receiver/dockerstatsreceiver/go.sum index f6ad0a20ebcf0..472714dc3fa40 100644 --- a/receiver/dockerstatsreceiver/go.sum +++ b/receiver/dockerstatsreceiver/go.sum @@ -821,7 +821,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -988,7 +987,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1046,8 +1044,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/dotnetdiagnosticsreceiver/config_test.go b/receiver/dotnetdiagnosticsreceiver/config_test.go index bab6ccbf1bd99..1b32d37dc75a8 100644 --- a/receiver/dotnetdiagnosticsreceiver/config_test.go +++ b/receiver/dotnetdiagnosticsreceiver/config_test.go @@ -22,14 +22,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) func TestLoadConfig(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) - factories.Receivers[configmodels.Type(typeStr)] = NewFactory() + factories.Receivers[config.Type(typeStr)] = NewFactory() collectorCfg, err := configtest.LoadConfigFile( t, path.Join("testdata", "config.yaml"), factories, ) diff --git a/receiver/dotnetdiagnosticsreceiver/factory.go b/receiver/dotnetdiagnosticsreceiver/factory.go index bf1169b8d1408..4b9c3687603a4 100644 --- a/receiver/dotnetdiagnosticsreceiver/factory.go +++ b/receiver/dotnetdiagnosticsreceiver/factory.go @@ -23,7 +23,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/scraperhelper" @@ -41,10 +41,10 @@ func NewFactory() component.ReceiverFactory { ) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -57,7 +57,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - baseConfig configmodels.Receiver, + baseConfig config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { cfg := baseConfig.(*Config) diff --git a/receiver/dotnetdiagnosticsreceiver/go.mod b/receiver/dotnetdiagnosticsreceiver/go.mod index dc4fcfa564c4e..f07ef661389a4 100644 --- a/receiver/dotnetdiagnosticsreceiver/go.mod +++ b/receiver/dotnetdiagnosticsreceiver/go.mod @@ -12,7 +12,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/receiver/dotnetdiagnosticsreceiver/go.sum b/receiver/dotnetdiagnosticsreceiver/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/receiver/dotnetdiagnosticsreceiver/go.sum +++ b/receiver/dotnetdiagnosticsreceiver/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/filelogreceiver/filelog.go b/receiver/filelogreceiver/filelog.go index c087c3fc36919..6cae79705bfb3 100644 --- a/receiver/filelogreceiver/filelog.go +++ b/receiver/filelogreceiver/filelog.go @@ -18,7 +18,7 @@ import ( "github.com/open-telemetry/opentelemetry-log-collection/operator" "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/input/file" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza" @@ -36,19 +36,19 @@ func NewFactory() component.ReceiverFactory { type ReceiverType struct{} // Type is the receiver type -func (f ReceiverType) Type() configmodels.Type { - return configmodels.Type(typeStr) +func (f ReceiverType) Type() config.Type { + return config.Type(typeStr) } // CreateDefaultConfig creates a config with type and version -func (f ReceiverType) CreateDefaultConfig() configmodels.Receiver { +func (f ReceiverType) CreateDefaultConfig() config.Receiver { return createDefaultConfig() } func createDefaultConfig() *FileLogConfig { return &FileLogConfig{ BaseConfig: stanza.BaseConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Operators: stanza.OperatorConfigs{}, @@ -58,7 +58,7 @@ func createDefaultConfig() *FileLogConfig { } // BaseConfig gets the base config from config, for now -func (f ReceiverType) BaseConfig(cfg configmodels.Receiver) stanza.BaseConfig { +func (f ReceiverType) BaseConfig(cfg config.Receiver) stanza.BaseConfig { return cfg.(*FileLogConfig).BaseConfig } @@ -69,7 +69,7 @@ type FileLogConfig struct { } // DecodeInputConfig unmarshals the input operator -func (f ReceiverType) DecodeInputConfig(cfg configmodels.Receiver) (*operator.Config, error) { +func (f ReceiverType) DecodeInputConfig(cfg config.Receiver) (*operator.Config, error) { logConfig := cfg.(*FileLogConfig) yamlBytes, _ := yaml.Marshal(logConfig.Input) inputCfg := file.NewInputConfig("file_input") diff --git a/receiver/filelogreceiver/filelog_test.go b/receiver/filelogreceiver/filelog_test.go index 8edeec2af99eb..3b8756c944756 100644 --- a/receiver/filelogreceiver/filelog_test.go +++ b/receiver/filelogreceiver/filelog_test.go @@ -31,8 +31,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/consumer/pdata" @@ -53,7 +53,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -254,7 +254,7 @@ func (h *testHost) ReportFatalError(err error) { func testdataConfigYamlAsMap() *FileLogConfig { return &FileLogConfig{ BaseConfig: stanza.BaseConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "filelog", NameVal: "filelog", }, @@ -284,7 +284,7 @@ func testdataConfigYamlAsMap() *FileLogConfig { func testdataRotateTestYamlAsMap(tempDir string) *FileLogConfig { return &FileLogConfig{ BaseConfig: stanza.BaseConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "filelog", NameVal: "filelog", }, diff --git a/receiver/filelogreceiver/go.mod b/receiver/filelogreceiver/go.mod index e8781ca0e5641..50a3481b4437c 100644 --- a/receiver/filelogreceiver/go.mod +++ b/receiver/filelogreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-log-collection v0.16.1-0.20210315170618-aa8d82509c31 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/receiver/filelogreceiver/go.sum b/receiver/filelogreceiver/go.sum index a71cd32e41329..60755469f4ce8 100644 --- a/receiver/filelogreceiver/go.sum +++ b/receiver/filelogreceiver/go.sum @@ -839,7 +839,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1010,7 +1009,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1072,8 +1070,8 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.22.0/go.mod h1:sBkAGYUQSh1f+owCK0aPV2uLcUB6rPHEOWjdvuE2SdQ= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/fluentforwardreceiver/collector.go b/receiver/fluentforwardreceiver/collector.go index 0644365054204..2107fe2650b3d 100644 --- a/receiver/fluentforwardreceiver/collector.go +++ b/receiver/fluentforwardreceiver/collector.go @@ -20,8 +20,9 @@ import ( "go.opencensus.io/stats" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/pdata" - "go.opentelemetry.io/collector/receiver/fluentforwardreceiver/observ" "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver/observ" ) // Collector acts as an aggregator of LogRecords so that we don't have to diff --git a/receiver/fluentforwardreceiver/config.go b/receiver/fluentforwardreceiver/config.go index d2fa8ee3e2269..afe02fe66391f 100644 --- a/receiver/fluentforwardreceiver/config.go +++ b/receiver/fluentforwardreceiver/config.go @@ -14,11 +14,11 @@ package fluentforwardreceiver -import "go.opentelemetry.io/collector/config/configmodels" +import "go.opentelemetry.io/collector/config" // Config defines configuration for the SignalFx receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct + config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct // The address to listen on for incoming Fluent Forward events. Should be // of the form `:` (TCP) or `unix://` (Unix diff --git a/receiver/fluentforwardreceiver/config_test.go b/receiver/fluentforwardreceiver/config_test.go index e422bc1a03aa0..967a57c46f2dd 100644 --- a/receiver/fluentforwardreceiver/config_test.go +++ b/receiver/fluentforwardreceiver/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" ) @@ -30,7 +30,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) diff --git a/receiver/fluentforwardreceiver/factory.go b/receiver/fluentforwardreceiver/factory.go index 965a5fa27a9a9..33b0757a422ab 100644 --- a/receiver/fluentforwardreceiver/factory.go +++ b/receiver/fluentforwardreceiver/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -36,9 +36,9 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithLogs(createLogsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -48,7 +48,7 @@ func createDefaultConfig() configmodels.Receiver { func createLogsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Logs, ) (component.LogsReceiver, error) { diff --git a/receiver/fluentforwardreceiver/factory_test.go b/receiver/fluentforwardreceiver/factory_test.go index 4853dc8af145f..e3019d1933e2d 100644 --- a/receiver/fluentforwardreceiver/factory_test.go +++ b/receiver/fluentforwardreceiver/factory_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer/consumertest" "go.uber.org/zap" ) @@ -39,7 +39,7 @@ func TestCreateReceiver(t *testing.T) { cfg := factory.CreateDefaultConfig().(*Config) cfg.ListenAddress = "localhost:0" // Endpoint is required, not going to be used here. - require.Equal(t, configmodels.Type("fluentforward"), factory.Type()) + require.Equal(t, config.Type("fluentforward"), factory.Type()) tReceiver, err := factory.CreateLogsReceiver(context.Background(), component.ReceiverCreateParams{Logger: zap.NewNop()}, cfg, consumertest.NewLogsNop()) assert.Nil(t, err, "receiver creation failed") diff --git a/receiver/fluentforwardreceiver/go.mod b/receiver/fluentforwardreceiver/go.mod index 3e1ab2cacc629..a78fd9b7e768e 100644 --- a/receiver/fluentforwardreceiver/go.mod +++ b/receiver/fluentforwardreceiver/go.mod @@ -6,6 +6,6 @@ require ( github.com/stretchr/testify v1.7.0 github.com/tinylib/msgp v1.1.5 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/receiver/fluentforwardreceiver/go.sum b/receiver/fluentforwardreceiver/go.sum index 26b9b46a9d8c6..d4cbeb68620ab 100644 --- a/receiver/fluentforwardreceiver/go.sum +++ b/receiver/fluentforwardreceiver/go.sum @@ -1030,8 +1030,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/fluentforwardreceiver/server.go b/receiver/fluentforwardreceiver/server.go index 9af0c7ac7ae9f..5eb5dea580fb8 100644 --- a/receiver/fluentforwardreceiver/server.go +++ b/receiver/fluentforwardreceiver/server.go @@ -25,8 +25,9 @@ import ( "github.com/tinylib/msgp/msgp" "go.opencensus.io/stats" - "go.opentelemetry.io/collector/receiver/fluentforwardreceiver/observ" "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver/observ" ) // The initial size of the read buffer. Messages can come in that are bigger diff --git a/receiver/jmxreceiver/config.go b/receiver/jmxreceiver/config.go index 37435d2379d3e..b493d66d1ef49 100644 --- a/receiver/jmxreceiver/config.go +++ b/receiver/jmxreceiver/config.go @@ -19,12 +19,12 @@ import ( "strings" "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" ) -type config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` +type Config struct { + config.ReceiverSettings `mapstructure:",squash"` // The path for the JMX Metric Gatherer uber JAR (/opt/opentelemetry-java-contrib-jmx-metrics.jar by default). JARPath string `mapstructure:"jar_path"` // The Service URL or host:port for the target coerced to one of form: service:jmx:rmi:///jndi/rmi://:/jmxrmi. @@ -70,7 +70,7 @@ type otlpExporterConfig struct { Headers map[string]string `mapstructure:"headers"` } -func (c *config) validate() error { +func (c *Config) validate() error { var missingFields []string if c.Endpoint == "" { missingFields = append(missingFields, "`endpoint`") diff --git a/receiver/jmxreceiver/config_test.go b/receiver/jmxreceiver/config_test.go index 52e1db0d5a3de..0db8eb273982d 100644 --- a/receiver/jmxreceiver/config_test.go +++ b/receiver/jmxreceiver/config_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/exporter/exporterhelper" ) @@ -33,7 +33,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -41,19 +41,19 @@ func TestLoadConfig(t *testing.T) { assert.Equal(t, len(cfg.Receivers), 6) - r0 := cfg.Receivers["jmx"].(*config) + r0 := cfg.Receivers["jmx"].(*Config) require.NoError(t, configcheck.ValidateConfig(r0)) assert.Equal(t, r0, factory.CreateDefaultConfig()) err = r0.validate() require.Error(t, err) assert.Equal(t, "jmx missing required fields: `endpoint`, `target_system` or `groovy_script`", err.Error()) - r1 := cfg.Receivers["jmx/all"].(*config) + r1 := cfg.Receivers["jmx/all"].(*Config) require.NoError(t, configcheck.ValidateConfig(r1)) require.NoError(t, r1.validate()) assert.Equal(t, - &config{ - ReceiverSettings: configmodels.ReceiverSettings{ + &Config{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "jmx", NameVal: "jmx/all", }, @@ -82,11 +82,11 @@ func TestLoadConfig(t *testing.T) { Realm: "myrealm", }, r1) - r2 := cfg.Receivers["jmx/missingendpoint"].(*config) + r2 := cfg.Receivers["jmx/missingendpoint"].(*Config) require.NoError(t, configcheck.ValidateConfig(r2)) assert.Equal(t, - &config{ - ReceiverSettings: configmodels.ReceiverSettings{ + &Config{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "jmx", NameVal: "jmx/missingendpoint", }, @@ -104,11 +104,11 @@ func TestLoadConfig(t *testing.T) { require.Error(t, err) assert.Equal(t, "jmx/missingendpoint missing required field: `endpoint`", err.Error()) - r3 := cfg.Receivers["jmx/missinggroovy"].(*config) + r3 := cfg.Receivers["jmx/missinggroovy"].(*Config) require.NoError(t, configcheck.ValidateConfig(r3)) assert.Equal(t, - &config{ - ReceiverSettings: configmodels.ReceiverSettings{ + &Config{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "jmx", NameVal: "jmx/missinggroovy", }, @@ -126,11 +126,11 @@ func TestLoadConfig(t *testing.T) { require.Error(t, err) assert.Equal(t, "jmx/missinggroovy missing required field: `target_system` or `groovy_script`", err.Error()) - r4 := cfg.Receivers["jmx/invalidinterval"].(*config) + r4 := cfg.Receivers["jmx/invalidinterval"].(*Config) require.NoError(t, configcheck.ValidateConfig(r4)) assert.Equal(t, - &config{ - ReceiverSettings: configmodels.ReceiverSettings{ + &Config{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "jmx", NameVal: "jmx/invalidinterval", }, @@ -149,11 +149,11 @@ func TestLoadConfig(t *testing.T) { require.Error(t, err) assert.Equal(t, "jmx/invalidinterval `interval` must be positive: -100ms", err.Error()) - r5 := cfg.Receivers["jmx/invalidotlptimeout"].(*config) + r5 := cfg.Receivers["jmx/invalidotlptimeout"].(*Config) require.NoError(t, configcheck.ValidateConfig(r5)) assert.Equal(t, - &config{ - ReceiverSettings: configmodels.ReceiverSettings{ + &Config{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "jmx", NameVal: "jmx/invalidotlptimeout", }, diff --git a/receiver/jmxreceiver/factory.go b/receiver/jmxreceiver/factory.go index b7602e193e27e..eb2b79864e4bb 100644 --- a/receiver/jmxreceiver/factory.go +++ b/receiver/jmxreceiver/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -37,9 +37,9 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createReceiver)) } -func createDefaultConfig() configmodels.Receiver { - return &config{ - ReceiverSettings: configmodels.ReceiverSettings{ +func createDefaultConfig() config.Receiver { + return &Config{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -57,10 +57,10 @@ func createDefaultConfig() configmodels.Receiver { func createReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { - jmxConfig := cfg.(*config) + jmxConfig := cfg.(*Config) if err := jmxConfig.validate(); err != nil { return nil, err } diff --git a/receiver/jmxreceiver/factory_test.go b/receiver/jmxreceiver/factory_test.go index 1b9cc8dbdba31..c53416dc7b804 100644 --- a/receiver/jmxreceiver/factory_test.go +++ b/receiver/jmxreceiver/factory_test.go @@ -21,14 +21,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumertest" "go.uber.org/zap" ) func TestWithInvalidConfig(t *testing.T) { f := NewFactory() - assert.Equal(t, configmodels.Type("jmx"), f.Type()) + assert.Equal(t, config.Type("jmx"), f.Type()) cfg := f.CreateDefaultConfig() require.NotNil(t, cfg) @@ -45,11 +45,11 @@ func TestWithInvalidConfig(t *testing.T) { func TestWithValidConfig(t *testing.T) { f := NewFactory() - assert.Equal(t, configmodels.Type("jmx"), f.Type()) + assert.Equal(t, config.Type("jmx"), f.Type()) cfg := f.CreateDefaultConfig() - cfg.(*config).Endpoint = "myendpoint:12345" - cfg.(*config).GroovyScript = "mygroovyscriptpath" + cfg.(*Config).Endpoint = "myendpoint:12345" + cfg.(*Config).GroovyScript = "mygroovyscriptpath" params := component.ReceiverCreateParams{Logger: zap.NewNop()} r, err := f.CreateMetricsReceiver(context.Background(), params, cfg, consumertest.NewMetricsNop()) diff --git a/receiver/jmxreceiver/go.mod b/receiver/jmxreceiver/go.mod index 19abd19b73ea7..bc67bf896d18a 100644 --- a/receiver/jmxreceiver/go.mod +++ b/receiver/jmxreceiver/go.mod @@ -14,7 +14,7 @@ require ( github.com/shirou/gopsutil v3.21.2+incompatible github.com/stretchr/testify v1.7.0 github.com/testcontainers/testcontainers-go v0.9.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/atomic v1.7.0 go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/receiver/jmxreceiver/go.sum b/receiver/jmxreceiver/go.sum index 28f6ec9e90064..ae6abc0de953e 100644 --- a/receiver/jmxreceiver/go.sum +++ b/receiver/jmxreceiver/go.sum @@ -846,7 +846,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1014,7 +1013,6 @@ github.com/testcontainers/testcontainers-go v0.9.0 h1:ZyftCfROjGrKlxk3MOUn2DAzWr github.com/testcontainers/testcontainers-go v0.9.0/go.mod h1:b22BFXhRbg4PJmeMVWh6ftqjyZHgiIl3w274e9r3C2E= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1075,8 +1073,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/jmxreceiver/integration_test.go b/receiver/jmxreceiver/integration_test.go index aa5e76a46d18c..15f72d0fdd946 100644 --- a/receiver/jmxreceiver/integration_test.go +++ b/receiver/jmxreceiver/integration_test.go @@ -137,7 +137,7 @@ func (suite *JMXIntegrationSuite) TestJMXReceiverHappyPath() { logger := zap.New(logCore) params := component.ReceiverCreateParams{Logger: logger} - config := &config{ + cfg := &Config{ CollectionInterval: 100 * time.Millisecond, Endpoint: fmt.Sprintf("%v:7199", hostname), JARPath: suite.JARPath, @@ -155,7 +155,7 @@ func (suite *JMXIntegrationSuite) TestJMXReceiverHappyPath() { consumer := new(consumertest.MetricsSink) require.NotNil(t, consumer) - receiver := newJMXMetricReceiver(params, config, consumer) + receiver := newJMXMetricReceiver(params, cfg, consumer) require.NotNil(t, receiver) defer func() { require.Nil(t, receiver.Shutdown(context.Background())) @@ -210,7 +210,7 @@ func (suite *JMXIntegrationSuite) TestJMXReceiverHappyPath() { func TestJMXReceiverInvalidOTLPEndpointIntegration(t *testing.T) { params := component.ReceiverCreateParams{Logger: zap.NewNop()} - config := &config{ + cfg := &Config{ CollectionInterval: 100 * time.Millisecond, Endpoint: fmt.Sprintf("service:jmx:rmi:///jndi/rmi://localhost:7199/jmxrmi"), JARPath: "/notavalidpath", @@ -222,7 +222,7 @@ func TestJMXReceiverInvalidOTLPEndpointIntegration(t *testing.T) { }, }, } - receiver := newJMXMetricReceiver(params, config, consumertest.NewMetricsNop()) + receiver := newJMXMetricReceiver(params, cfg, consumertest.NewMetricsNop()) require.NotNil(t, receiver) defer func() { require.EqualError(t, receiver.Shutdown(context.Background()), "no subprocess.cancel(). Has it been started properly?") diff --git a/receiver/jmxreceiver/receiver.go b/receiver/jmxreceiver/receiver.go index 279369f41a28b..06d7b5b13247c 100644 --- a/receiver/jmxreceiver/receiver.go +++ b/receiver/jmxreceiver/receiver.go @@ -35,7 +35,7 @@ var _ component.MetricsReceiver = (*jmxMetricReceiver)(nil) type jmxMetricReceiver struct { logger *zap.Logger - config *config + config *Config subprocess *subprocess.Subprocess params component.ReceiverCreateParams otlpReceiver component.MetricsReceiver @@ -44,7 +44,7 @@ type jmxMetricReceiver struct { func newJMXMetricReceiver( params component.ReceiverCreateParams, - config *config, + config *Config, nextConsumer consumer.Metrics, ) *jmxMetricReceiver { return &jmxMetricReceiver{ diff --git a/receiver/jmxreceiver/receiver_test.go b/receiver/jmxreceiver/receiver_test.go index e1628557e5cda..e168fb8a9990a 100644 --- a/receiver/jmxreceiver/receiver_test.go +++ b/receiver/jmxreceiver/receiver_test.go @@ -31,7 +31,7 @@ import ( func TestReceiver(t *testing.T) { params := component.ReceiverCreateParams{Logger: zap.NewNop()} - config := &config{ + config := &Config{ Endpoint: "service:jmx:protocol:sap", OTLPExporterConfig: otlpExporterConfig{ Endpoint: fmt.Sprintf("localhost:%d", testutil.GetAvailablePort(t)), @@ -50,13 +50,13 @@ func TestReceiver(t *testing.T) { func TestBuildJMXMetricGathererConfig(t *testing.T) { tests := []struct { name string - config config + config Config expectedConfig string expectedError string }{ { "uses target system", - config{ + Config{ Endpoint: "service:jmx:rmi///jndi/rmi://myservice:12345/jmxrmi/", TargetSystem: "mytargetsystem", GroovyScript: "mygroovyscript", @@ -78,7 +78,7 @@ otel.exporter.otlp.metric.timeout = 234000 }, { "uses groovy script", - config{ + Config{ Endpoint: "service:jmx:rmi///jndi/rmi://myservice:12345/jmxrmi/", GroovyScript: "mygroovyscript", CollectionInterval: 123 * time.Second, @@ -99,7 +99,7 @@ otel.exporter.otlp.metric.timeout = 234000 }, { "uses endpoint as service url", - config{ + Config{ Endpoint: "myhost:12345", TargetSystem: "mytargetsystem", GroovyScript: "mygroovyscript", @@ -121,7 +121,7 @@ otel.exporter.otlp.metric.timeout = 234000 }, { "errors on portless endpoint", - config{ + Config{ Endpoint: "myhostwithoutport", TargetSystem: "mytargetsystem", GroovyScript: "mygroovyscript", @@ -137,7 +137,7 @@ otel.exporter.otlp.metric.timeout = 234000 }, { "errors on invalid port in endpoint", - config{ + Config{ Endpoint: "myhost:withoutvalidport", TargetSystem: "mytargetsystem", GroovyScript: "mygroovyscript", @@ -153,7 +153,7 @@ otel.exporter.otlp.metric.timeout = 234000 }, { "errors on invalid endpoint", - config{ + Config{ Endpoint: ":::", TargetSystem: "mytargetsystem", GroovyScript: "mygroovyscript", @@ -188,17 +188,17 @@ otel.exporter.otlp.metric.timeout = 234000 func TestBuildOTLPReceiverInvalidEndpoints(t *testing.T) { tests := []struct { name string - config config + config Config expectedErr string }{ { "missing OTLPExporterConfig.Endpoint", - config{}, + Config{}, "failed to parse OTLPExporterConfig.Endpoint : missing port in address", }, { "invalid OTLPExporterConfig.Endpoint host with 0 port", - config{OTLPExporterConfig: otlpExporterConfig{Endpoint: ".:0"}}, + Config{OTLPExporterConfig: otlpExporterConfig{Endpoint: ".:0"}}, "failed determining desired port from OTLPExporterConfig.Endpoint .:0: listen tcp: lookup .:", }, } diff --git a/receiver/k8sclusterreceiver/config.go b/receiver/k8sclusterreceiver/config.go index 5391a3263adc0..3f3893a2d1c42 100644 --- a/receiver/k8sclusterreceiver/config.go +++ b/receiver/k8sclusterreceiver/config.go @@ -17,7 +17,7 @@ package k8sclusterreceiver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" k8s "k8s.io/client-go/kubernetes" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" @@ -25,8 +25,8 @@ import ( // Config defines configuration for kubernetes cluster receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - k8sconfig.APIConfig `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` + k8sconfig.APIConfig `mapstructure:",squash"` // Collection interval for metrics. CollectionInterval time.Duration `mapstructure:"collection_interval"` diff --git a/receiver/k8sclusterreceiver/config_test.go b/receiver/k8sclusterreceiver/config_test.go index f428b709072dd..86e50ce5c6bcd 100644 --- a/receiver/k8sclusterreceiver/config_test.go +++ b/receiver/k8sclusterreceiver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { factory := NewFactory() receiverType := "k8s_cluster" - factories.Receivers[configmodels.Type(receiverType)] = factory + factories.Receivers[config.Type(receiverType)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -50,8 +50,8 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Receivers["k8s_cluster/all_settings"].(*Config) assert.Equal(t, r2, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(receiverType), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(receiverType), NameVal: "k8s_cluster/all_settings", }, CollectionInterval: 30 * time.Second, @@ -65,8 +65,8 @@ func TestLoadConfig(t *testing.T) { r3 := cfg.Receivers["k8s_cluster/partial_settings"].(*Config) assert.Equal(t, r3, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(receiverType), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(receiverType), NameVal: "k8s_cluster/partial_settings", }, CollectionInterval: 30 * time.Second, diff --git a/receiver/k8sclusterreceiver/factory.go b/receiver/k8sclusterreceiver/factory.go index 2889ceb7d4449..dcdb6406669b2 100644 --- a/receiver/k8sclusterreceiver/factory.go +++ b/receiver/k8sclusterreceiver/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -36,9 +36,9 @@ const ( var defaultNodeConditionsToReport = []string{"Ready"} -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -51,7 +51,7 @@ func createDefaultConfig() configmodels.Receiver { } func createMetricsReceiver( - _ context.Context, params component.ReceiverCreateParams, cfg configmodels.Receiver, + _ context.Context, params component.ReceiverCreateParams, cfg config.Receiver, consumer consumer.Metrics) (component.MetricsReceiver, error) { rCfg := cfg.(*Config) diff --git a/receiver/k8sclusterreceiver/factory_test.go b/receiver/k8sclusterreceiver/factory_test.go index 2eec40719835d..efab91780cb10 100644 --- a/receiver/k8sclusterreceiver/factory_test.go +++ b/receiver/k8sclusterreceiver/factory_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/consumertest" "go.uber.org/zap" "k8s.io/client-go/kubernetes" @@ -31,14 +31,14 @@ import ( func TestFactory(t *testing.T) { f := NewFactory() - require.Equal(t, configmodels.Type("k8s_cluster"), f.Type()) + require.Equal(t, config.Type("k8s_cluster"), f.Type()) cfg := f.CreateDefaultConfig() rCfg, ok := cfg.(*Config) require.True(t, ok) require.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -51,7 +51,7 @@ func TestFactory(t *testing.T) { r, err := f.CreateTracesReceiver( context.Background(), component.ReceiverCreateParams{}, - &configmodels.ReceiverSettings{}, consumertest.NewTracesNop(), + &config.ReceiverSettings{}, consumertest.NewTracesNop(), ) require.Error(t, err) require.Nil(t, r) @@ -92,19 +92,19 @@ var _ component.Host = (*nopHostWithExporters)(nil) func (n nopHostWithExporters) ReportFatalError(error) { } -func (n nopHostWithExporters) GetFactory(component.Kind, configmodels.Type) component.Factory { +func (n nopHostWithExporters) GetFactory(component.Kind, config.Type) component.Factory { return nil } -func (n nopHostWithExporters) GetExtensions() map[configmodels.NamedEntity]component.Extension { +func (n nopHostWithExporters) GetExtensions() map[config.NamedEntity]component.Extension { return nil } -func (n nopHostWithExporters) GetExporters() map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter { - return map[configmodels.DataType]map[configmodels.NamedEntity]component.Exporter{ - configmodels.MetricsDataType: { - &configmodels.ExporterSettings{TypeVal: "nop", NameVal: "nop/withoutmetadata"}: MockExporter{}, - &configmodels.ExporterSettings{TypeVal: "nop", NameVal: "nop/withmetadata"}: mockExporterWithK8sMetadata{}, +func (n nopHostWithExporters) GetExporters() map[config.DataType]map[config.NamedEntity]component.Exporter { + return map[config.DataType]map[config.NamedEntity]component.Exporter{ + config.MetricsDataType: { + &config.ExporterSettings{TypeVal: "nop", NameVal: "nop/withoutmetadata"}: MockExporter{}, + &config.ExporterSettings{TypeVal: "nop", NameVal: "nop/withmetadata"}: mockExporterWithK8sMetadata{}, }, } } diff --git a/receiver/k8sclusterreceiver/go.mod b/receiver/k8sclusterreceiver/go.mod index 55827037e4a1a..a06f5297032ba 100644 --- a/receiver/k8sclusterreceiver/go.mod +++ b/receiver/k8sclusterreceiver/go.mod @@ -12,7 +12,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.0.0-00010101000000-000000000000 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/atomic v1.7.0 go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 diff --git a/receiver/k8sclusterreceiver/go.sum b/receiver/k8sclusterreceiver/go.sum index 0f343586a4ea5..0be8a6fa41c93 100644 --- a/receiver/k8sclusterreceiver/go.sum +++ b/receiver/k8sclusterreceiver/go.sum @@ -925,8 +925,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/k8sclusterreceiver/receiver.go b/receiver/k8sclusterreceiver/receiver.go index 025313b92b022..6f0c302f40b76 100644 --- a/receiver/k8sclusterreceiver/receiver.go +++ b/receiver/k8sclusterreceiver/receiver.go @@ -20,7 +20,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/obsreport" "go.opentelemetry.io/collector/translator/internaldata" @@ -51,7 +51,7 @@ func (kr *kubernetesReceiver) Start(ctx context.Context, host component.Host) er exporters := host.GetExporters() if err := kr.resourceWatcher.setupMetadataExporters( - exporters[configmodels.MetricsDataType], kr.config.MetadataExporters); err != nil { + exporters[config.MetricsDataType], kr.config.MetadataExporters); err != nil { return err } diff --git a/receiver/k8sclusterreceiver/watcher.go b/receiver/k8sclusterreceiver/watcher.go index 345ef97c1bc16..13612a60e3033 100644 --- a/receiver/k8sclusterreceiver/watcher.go +++ b/receiver/k8sclusterreceiver/watcher.go @@ -20,7 +20,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.uber.org/atomic" "go.uber.org/zap" appsv1 "k8s.io/api/apps/v1" @@ -172,7 +172,7 @@ func (rw *resourceWatcher) waitForInitialInformerSync() { } func (rw *resourceWatcher) setupMetadataExporters( - exporters map[configmodels.NamedEntity]component.Exporter, + exporters map[config.NamedEntity]component.Exporter, metadataExportersFromConfig []string, ) error { @@ -202,7 +202,7 @@ func (rw *resourceWatcher) setupMetadataExporters( } func validateMetadataExporters(metadataExporters map[string]bool, - exporters map[configmodels.NamedEntity]component.Exporter) error { + exporters map[config.NamedEntity]component.Exporter) error { configuredExporters := map[string]bool{} for cfg := range exporters { diff --git a/receiver/k8sclusterreceiver/watcher_test.go b/receiver/k8sclusterreceiver/watcher_test.go index 02046b18be14b..de6bb6d220b3f 100644 --- a/receiver/k8sclusterreceiver/watcher_test.go +++ b/receiver/k8sclusterreceiver/watcher_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.uber.org/zap" ) @@ -28,7 +28,7 @@ func TestSetupMetadataExporters(t *testing.T) { metadataConsumers []metadataConsumer } type args struct { - exporters map[configmodels.NamedEntity]component.Exporter + exporters map[config.NamedEntity]component.Exporter metadataExportersFromConfig []string } tests := []struct { @@ -41,8 +41,8 @@ func TestSetupMetadataExporters(t *testing.T) { "Unsupported exporter", fields{}, args{ - exporters: map[configmodels.NamedEntity]component.Exporter{ - &configmodels.ExporterSettings{TypeVal: "nop", NameVal: "nop"}: MockExporter{}, + exporters: map[config.NamedEntity]component.Exporter{ + &config.ExporterSettings{TypeVal: "nop", NameVal: "nop"}: MockExporter{}, }, metadataExportersFromConfig: []string{"nop"}, }, @@ -53,8 +53,8 @@ func TestSetupMetadataExporters(t *testing.T) { fields{ metadataConsumers: []metadataConsumer{(&mockExporterWithK8sMetadata{}).ConsumeMetadata}, }, - args{exporters: map[configmodels.NamedEntity]component.Exporter{ - &configmodels.ExporterSettings{TypeVal: "nop", NameVal: "nop"}: mockExporterWithK8sMetadata{}, + args{exporters: map[config.NamedEntity]component.Exporter{ + &config.ExporterSettings{TypeVal: "nop", NameVal: "nop"}: mockExporterWithK8sMetadata{}, }, metadataExportersFromConfig: []string{"nop"}, }, @@ -65,8 +65,8 @@ func TestSetupMetadataExporters(t *testing.T) { fields{ metadataConsumers: []metadataConsumer{}, }, - args{exporters: map[configmodels.NamedEntity]component.Exporter{ - &configmodels.ExporterSettings{TypeVal: "nop", NameVal: "nop"}: mockExporterWithK8sMetadata{}, + args{exporters: map[config.NamedEntity]component.Exporter{ + &config.ExporterSettings{TypeVal: "nop", NameVal: "nop"}: mockExporterWithK8sMetadata{}, }, metadataExportersFromConfig: []string{"nop/1"}, }, diff --git a/receiver/kafkametricsreceiver/factory.go b/receiver/kafkametricsreceiver/factory.go index 471df1b18229f..e3d998528d321 100644 --- a/receiver/kafkametricsreceiver/factory.go +++ b/receiver/kafkametricsreceiver/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/scraperhelper" @@ -40,7 +40,7 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ ScraperControllerSettings: scraperhelper.DefaultScraperControllerSettings(typeStr), Brokers: []string{defaultBroker}, @@ -53,7 +53,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, nextConsumer consumer.Metrics) (component.MetricsReceiver, error) { c := cfg.(*Config) r, err := newMetricsReceiver(ctx, *c, params, nextConsumer) diff --git a/receiver/kafkametricsreceiver/go.mod b/receiver/kafkametricsreceiver/go.mod index 543afbe37602b..9e438b335fca2 100644 --- a/receiver/kafkametricsreceiver/go.mod +++ b/receiver/kafkametricsreceiver/go.mod @@ -5,6 +5,6 @@ go 1.14 require ( github.com/Shopify/sarama v1.28.0 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/receiver/kafkametricsreceiver/go.sum b/receiver/kafkametricsreceiver/go.sum index 26b9b46a9d8c6..0a39deebe6c12 100644 --- a/receiver/kafkametricsreceiver/go.sum +++ b/receiver/kafkametricsreceiver/go.sum @@ -807,7 +807,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -972,7 +971,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1030,8 +1028,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/kafkametricsreceiver/internal/metadata/generated_metrics.go b/receiver/kafkametricsreceiver/internal/metadata/generated_metrics.go index 702a3dda3ffaa..a6075c73c1bdf 100644 --- a/receiver/kafkametricsreceiver/internal/metadata/generated_metrics.go +++ b/receiver/kafkametricsreceiver/internal/metadata/generated_metrics.go @@ -17,12 +17,12 @@ package metadata import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" ) // Type is the component type name. -const Type configmodels.Type = "kafkametricsreceiver" +const Type config.Type = "kafkametricsreceiver" // MetricIntf is an interface to generically interact with generated metric. type MetricIntf interface { diff --git a/receiver/kubeletstatsreceiver/config.go b/receiver/kubeletstatsreceiver/config.go index 2da4d512aa464..bb3409cde6f14 100644 --- a/receiver/kubeletstatsreceiver/config.go +++ b/receiver/kubeletstatsreceiver/config.go @@ -19,7 +19,7 @@ import ( "fmt" "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "k8s.io/client-go/kubernetes" @@ -27,13 +27,13 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kubeletstatsreceiver/kubelet" ) -var _ configmodels.Receiver = (*Config)(nil) +var _ config.Receiver = (*Config)(nil) type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - kubelet.ClientConfig `mapstructure:",squash"` - confignet.TCPAddr `mapstructure:",squash"` - CollectionInterval time.Duration `mapstructure:"collection_interval"` + config.ReceiverSettings `mapstructure:",squash"` + kubelet.ClientConfig `mapstructure:",squash"` + confignet.TCPAddr `mapstructure:",squash"` + CollectionInterval time.Duration `mapstructure:"collection_interval"` // ExtraMetadataLabels contains list of extra metadata that should be taken from /pods endpoint // and put as extra labels on metrics resource. diff --git a/receiver/kubeletstatsreceiver/config_test.go b/receiver/kubeletstatsreceiver/config_test.go index 401af3377ffa4..26d024d6b4788 100644 --- a/receiver/kubeletstatsreceiver/config_test.go +++ b/receiver/kubeletstatsreceiver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/config/configtls" @@ -35,7 +35,7 @@ func TestLoadConfig(t *testing.T) { factories, err := componenttest.NopFactories() require.NoError(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -45,7 +45,7 @@ func TestLoadConfig(t *testing.T) { duration := 10 * time.Second defaultCfg := cfg.Receivers["kubeletstats/default"].(*Config) require.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "kubeletstats", NameVal: "kubeletstats/default", }, @@ -64,7 +64,7 @@ func TestLoadConfig(t *testing.T) { tlsCfg := cfg.Receivers["kubeletstats/tls"].(*Config) require.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "kubeletstats", NameVal: "kubeletstats/tls", }, @@ -92,7 +92,7 @@ func TestLoadConfig(t *testing.T) { saCfg := cfg.Receivers["kubeletstats/sa"].(*Config) require.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "kubeletstats", NameVal: "kubeletstats/sa", }, @@ -112,7 +112,7 @@ func TestLoadConfig(t *testing.T) { metadataCfg := cfg.Receivers["kubeletstats/metadata"].(*Config) require.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "kubeletstats", NameVal: "kubeletstats/metadata", }, @@ -135,7 +135,7 @@ func TestLoadConfig(t *testing.T) { metricGroupsCfg := cfg.Receivers["kubeletstats/metric_groups"].(*Config) require.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "kubeletstats", NameVal: "kubeletstats/metric_groups", }, @@ -154,7 +154,7 @@ func TestLoadConfig(t *testing.T) { metadataWithK8sAPICfg := cfg.Receivers["kubeletstats/metadata_with_k8s_api"].(*Config) require.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "kubeletstats", NameVal: "kubeletstats/metadata_with_k8s_api", }, @@ -243,7 +243,7 @@ func TestGetReceiverOptions(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { cfg := &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ NameVal: typeStr, }, CollectionInterval: 10 * time.Second, diff --git a/receiver/kubeletstatsreceiver/factory.go b/receiver/kubeletstatsreceiver/factory.go index 386a3fea44348..e421bdbf33cc8 100644 --- a/receiver/kubeletstatsreceiver/factory.go +++ b/receiver/kubeletstatsreceiver/factory.go @@ -21,7 +21,7 @@ import ( "github.com/spf13/viper" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.uber.org/zap" @@ -51,9 +51,9 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, }, ClientConfig: kubelet.ClientConfig{ @@ -68,7 +68,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - baseCfg configmodels.Receiver, + baseCfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { cfg := baseCfg.(*Config) diff --git a/receiver/kubeletstatsreceiver/go.mod b/receiver/kubeletstatsreceiver/go.mod index 50b744bad58ad..89e1945b885e9 100644 --- a/receiver/kubeletstatsreceiver/go.mod +++ b/receiver/kubeletstatsreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.0.0-00010101000000-000000000000 github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 gopkg.in/yaml.v2 v2.4.0 diff --git a/receiver/kubeletstatsreceiver/go.sum b/receiver/kubeletstatsreceiver/go.sum index 4b966f530e55c..12fdb85f512ba 100644 --- a/receiver/kubeletstatsreceiver/go.sum +++ b/receiver/kubeletstatsreceiver/go.sum @@ -826,7 +826,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -994,7 +993,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1052,8 +1050,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/memcachedreceiver/factory.go b/receiver/memcachedreceiver/factory.go index 125d4f7de2aea..4c5f013c25db3 100644 --- a/receiver/memcachedreceiver/factory.go +++ b/receiver/memcachedreceiver/factory.go @@ -21,7 +21,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -40,10 +40,10 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -59,7 +59,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - rConf configmodels.Receiver, + rConf config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { cfg := rConf.(*Config) diff --git a/receiver/memcachedreceiver/go.mod b/receiver/memcachedreceiver/go.mod index 566daedc246d5..5c3b098967d52 100644 --- a/receiver/memcachedreceiver/go.mod +++ b/receiver/memcachedreceiver/go.mod @@ -14,7 +14,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.0.0-00010101000000-000000000000 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/receiver/memcachedreceiver/go.sum b/receiver/memcachedreceiver/go.sum index 91fcbc67b81b4..9fc910e01e02c 100644 --- a/receiver/memcachedreceiver/go.sum +++ b/receiver/memcachedreceiver/go.sum @@ -831,7 +831,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -999,7 +998,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1058,8 +1056,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/memcachedreceiver/internal/metadata/generated_metrics.go b/receiver/memcachedreceiver/internal/metadata/generated_metrics.go index 8ea07df68425a..5c343576a29d2 100644 --- a/receiver/memcachedreceiver/internal/metadata/generated_metrics.go +++ b/receiver/memcachedreceiver/internal/metadata/generated_metrics.go @@ -17,12 +17,12 @@ package metadata import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" ) // Type is the component type name. -const Type configmodels.Type = "memcachedreceiver" +const Type config.Type = "memcachedreceiver" // MetricIntf is an interface to generically interact with generated metric. type MetricIntf interface { diff --git a/receiver/nginxreceiver/config.go b/receiver/nginxreceiver/config.go index bfc3132ea0079..43f8b2ef3d8f5 100644 --- a/receiver/nginxreceiver/config.go +++ b/receiver/nginxreceiver/config.go @@ -19,7 +19,7 @@ import ( "go.opentelemetry.io/collector/receiver/scraperhelper" ) -type config struct { +type Config struct { scraperhelper.ScraperControllerSettings `mapstructure:",squash"` confighttp.HTTPClientSettings `mapstructure:",squash"` } diff --git a/receiver/nginxreceiver/factory.go b/receiver/nginxreceiver/factory.go index a314ac07a91c3..80ecd2be2d609 100644 --- a/receiver/nginxreceiver/factory.go +++ b/receiver/nginxreceiver/factory.go @@ -21,8 +21,8 @@ import ( "time" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/scraperhelper" @@ -40,10 +40,10 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { - return &config{ +func createDefaultConfig() config.Receiver { + return &Config{ ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -59,10 +59,10 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - rConf configmodels.Receiver, + rConf config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { - cfg := rConf.(*config) + cfg := rConf.(*Config) ns := newNginxScraper(params.Logger, cfg) scraper := scraperhelper.NewResourceMetricsScraper(typeStr, ns.scrape) diff --git a/receiver/nginxreceiver/factory_test.go b/receiver/nginxreceiver/factory_test.go index 9277210a8f787..ed3f14197024b 100644 --- a/receiver/nginxreceiver/factory_test.go +++ b/receiver/nginxreceiver/factory_test.go @@ -44,7 +44,7 @@ func TestCreateMetricsReceiver(t *testing.T) { metricsReceiver, err := factory.CreateMetricsReceiver( context.Background(), component.ReceiverCreateParams{Logger: zap.NewNop()}, - &config{ + &Config{ ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ CollectionInterval: 10 * time.Second, }, diff --git a/receiver/nginxreceiver/go.mod b/receiver/nginxreceiver/go.mod index c5cc1ce9344a0..49ebe12dc0c73 100644 --- a/receiver/nginxreceiver/go.mod +++ b/receiver/nginxreceiver/go.mod @@ -13,7 +13,7 @@ require ( github.com/onsi/gomega v1.10.2 // indirect github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/receiver/nginxreceiver/go.sum b/receiver/nginxreceiver/go.sum index 1a24f22f07f40..749ed3e49f3d7 100644 --- a/receiver/nginxreceiver/go.sum +++ b/receiver/nginxreceiver/go.sum @@ -831,7 +831,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -998,7 +997,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1057,8 +1055,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/nginxreceiver/internal/metadata/generated_metrics.go b/receiver/nginxreceiver/internal/metadata/generated_metrics.go index cd1cebb9130d0..8f473d85f5bf4 100644 --- a/receiver/nginxreceiver/internal/metadata/generated_metrics.go +++ b/receiver/nginxreceiver/internal/metadata/generated_metrics.go @@ -17,12 +17,12 @@ package metadata import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" ) // Type is the component type name. -const Type configmodels.Type = "nginxreceiver" +const Type config.Type = "nginxreceiver" // MetricIntf is an interface to generically interact with generated metric. type MetricIntf interface { diff --git a/receiver/nginxreceiver/scraper.go b/receiver/nginxreceiver/scraper.go index 2830d00730aa0..664561172f614 100644 --- a/receiver/nginxreceiver/scraper.go +++ b/receiver/nginxreceiver/scraper.go @@ -30,16 +30,16 @@ type nginxScraper struct { client *client.NginxClient logger *zap.Logger - config *config + cfg *Config } func newNginxScraper( logger *zap.Logger, - config *config, + cfg *Config, ) *nginxScraper { return &nginxScraper{ logger: logger, - config: config, + cfg: cfg, } } @@ -47,12 +47,12 @@ func (r *nginxScraper) scrape(ctx context.Context) (pdata.ResourceMetricsSlice, // Init client in scrape method in case there are transient errors in the // constructor. if r.client == nil { - httpClient, err := r.config.ToClient() + httpClient, err := r.cfg.ToClient() if err != nil { return pdata.ResourceMetricsSlice{}, err } - r.client, err = client.NewNginxClient(httpClient, r.config.HTTPClientSettings.Endpoint) + r.client, err = client.NewNginxClient(httpClient, r.cfg.HTTPClientSettings.Endpoint) if err != nil { r.client = nil return pdata.ResourceMetricsSlice{}, err diff --git a/receiver/nginxreceiver/scraper_test.go b/receiver/nginxreceiver/scraper_test.go index 1332e5875070c..7eed1973b0e2d 100644 --- a/receiver/nginxreceiver/scraper_test.go +++ b/receiver/nginxreceiver/scraper_test.go @@ -40,7 +40,7 @@ Reading: 6 Writing: 179 Waiting: 106 } rw.WriteHeader(404) })) - sc := newNginxScraper(zap.NewNop(), &config{ + sc := newNginxScraper(zap.NewNop(), &Config{ HTTPClientSettings: confighttp.HTTPClientSettings{ Endpoint: nginxMock.URL + "/status", }, @@ -99,7 +99,7 @@ func TestScraperError(t *testing.T) { rw.WriteHeader(404) })) t.Run("404", func(t *testing.T) { - sc := newNginxScraper(zap.NewNop(), &config{ + sc := newNginxScraper(zap.NewNop(), &Config{ HTTPClientSettings: confighttp.HTTPClientSettings{ Endpoint: nginxMock.URL + "/badpath", }, @@ -110,7 +110,7 @@ func TestScraperError(t *testing.T) { }) t.Run("parse error", func(t *testing.T) { - sc := newNginxScraper(zap.NewNop(), &config{ + sc := newNginxScraper(zap.NewNop(), &Config{ HTTPClientSettings: confighttp.HTTPClientSettings{ Endpoint: nginxMock.URL + "/status", }, diff --git a/receiver/prometheusexecreceiver/config.go b/receiver/prometheusexecreceiver/config.go index 04c0d756d2ac3..dd5342654eb33 100644 --- a/receiver/prometheusexecreceiver/config.go +++ b/receiver/prometheusexecreceiver/config.go @@ -17,7 +17,7 @@ package prometheusexecreceiver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusexecreceiver/subprocessmanager" ) @@ -25,7 +25,7 @@ import ( // Config definition for prometheus_exec configuration type Config struct { // Generic receiver config - configmodels.ReceiverSettings `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` // ScrapeInterval is the time between each scrape completed by the Receiver ScrapeInterval time.Duration `mapstructure:"scrape_interval,omitempty"` // Port is the port assigned to the Receiver, and to the {{port}} template variables diff --git a/receiver/prometheusexecreceiver/config_test.go b/receiver/prometheusexecreceiver/config_test.go index f719a242ac632..3db045331f622 100644 --- a/receiver/prometheusexecreceiver/config_test.go +++ b/receiver/prometheusexecreceiver/config_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusexecreceiver/subprocessmanager" @@ -29,8 +29,8 @@ import ( var ( wantReceiver2 = &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type("prometheus_exec"), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type("prometheus_exec"), NameVal: "prometheus_exec/test", }, ScrapeInterval: 60 * time.Second, @@ -42,8 +42,8 @@ var ( } wantReceiver3 = &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type("prometheus_exec"), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type("prometheus_exec"), NameVal: "prometheus_exec/test2", }, ScrapeInterval: 90 * time.Second, @@ -54,8 +54,8 @@ var ( } wantReceiver4 = &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type("prometheus_exec"), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type("prometheus_exec"), NameVal: "prometheus_exec/end_to_end_test/1", }, ScrapeInterval: 100 * time.Millisecond, @@ -76,8 +76,8 @@ var ( } wantReceiver5 = &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type("prometheus_exec"), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type("prometheus_exec"), NameVal: "prometheus_exec/end_to_end_test/2", }, ScrapeInterval: 100 * time.Millisecond, @@ -94,7 +94,7 @@ func TestLoadConfig(t *testing.T) { factory := NewFactory() receiverType := "prometheus_exec" - factories.Receivers[configmodels.Type(receiverType)] = factory + factories.Receivers[config.Type(receiverType)] = factory config, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) diff --git a/receiver/prometheusexecreceiver/factory.go b/receiver/prometheusexecreceiver/factory.go index 3a3a0b5ebcd24..601493640621b 100644 --- a/receiver/prometheusexecreceiver/factory.go +++ b/receiver/prometheusexecreceiver/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -43,9 +43,9 @@ func NewFactory() component.ReceiverFactory { } // createDefaultConfig returns a default config -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -60,7 +60,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, nextConsumer consumer.Metrics, ) (component.MetricsReceiver, error) { rCfg := cfg.(*Config) diff --git a/receiver/prometheusexecreceiver/factory_test.go b/receiver/prometheusexecreceiver/factory_test.go index da28bbb38c188..144e35a88c9fe 100644 --- a/receiver/prometheusexecreceiver/factory_test.go +++ b/receiver/prometheusexecreceiver/factory_test.go @@ -26,8 +26,8 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configerror" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/receiver/prometheusreceiver" "go.uber.org/zap" @@ -46,14 +46,14 @@ func TestCreateTraceAndMetricsReceiver(t *testing.T) { factory := NewFactory() receiverType := "prometheus_exec" - factories.Receivers[configmodels.Type(receiverType)] = factory + factories.Receivers[config.Type(receiverType)] = factory - config, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) + cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) assert.NoError(t, err) - assert.NotNil(t, config) + assert.NotNil(t, cfg) - receiver := config.Receivers[receiverType] + receiver := cfg.Receivers[receiverType] // Test CreateTracesReceiver traceReceiver, err = factory.CreateTracesReceiver(context.Background(), component.ReceiverCreateParams{Logger: zap.NewNop()}, receiver, nil) @@ -66,7 +66,7 @@ func TestCreateTraceAndMetricsReceiver(t *testing.T) { assert.NotNil(t, err) // Test CreateMetricsReceiver - receiver = config.Receivers["prometheus_exec/test"] + receiver = cfg.Receivers["prometheus_exec/test"] metricReceiver, err = factory.CreateMetricsReceiver(context.Background(), component.ReceiverCreateParams{Logger: zap.NewNop()}, receiver, nil) assert.Equal(t, nil, err) @@ -75,7 +75,7 @@ func TestCreateTraceAndMetricsReceiver(t *testing.T) { config: receiver.(*Config), consumer: nil, promReceiverConfig: &prometheusreceiver.Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "prometheus_exec", NameVal: "prometheus_exec/test", }, diff --git a/receiver/prometheusexecreceiver/go.mod b/receiver/prometheusexecreceiver/go.mod index cc58811cc2705..42be9576cd304 100644 --- a/receiver/prometheusexecreceiver/go.mod +++ b/receiver/prometheusexecreceiver/go.mod @@ -15,7 +15,7 @@ require ( github.com/prometheus/common v0.19.0 github.com/prometheus/prometheus v1.8.2-0.20210217141258-a6be548dbc17 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/receiver/prometheusexecreceiver/go.sum b/receiver/prometheusexecreceiver/go.sum index 50105060dfca9..ad5e9c4f499be 100644 --- a/receiver/prometheusexecreceiver/go.sum +++ b/receiver/prometheusexecreceiver/go.sum @@ -827,7 +827,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -993,7 +992,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1052,8 +1050,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/prometheusexecreceiver/receiver.go b/receiver/prometheusexecreceiver/receiver.go index 3d1ff3315634f..2c21b76ef0a41 100644 --- a/receiver/prometheusexecreceiver/receiver.go +++ b/receiver/prometheusexecreceiver/receiver.go @@ -25,10 +25,10 @@ import ( "time" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/config" + promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/prometheusreceiver" "go.uber.org/zap" @@ -97,7 +97,7 @@ func newPromExecReceiver(params component.ReceiverCreateParams, config *Config, // getPromReceiverConfig returns the Prometheus receiver config func getPromReceiverConfig(cfg *Config) *prometheusreceiver.Config { - scrapeConfig := &config.ScrapeConfig{} + scrapeConfig := &promconfig.ScrapeConfig{} scrapeConfig.ScrapeInterval = model.Duration(cfg.ScrapeInterval) scrapeConfig.ScrapeTimeout = model.Duration(defaultScrapeTimeout) @@ -118,15 +118,15 @@ func getPromReceiverConfig(cfg *Config) *prometheusreceiver.Config { }, } - receiverSettings := &configmodels.ReceiverSettings{ + receiverSettings := &config.ReceiverSettings{ TypeVal: typeStr, NameVal: cfg.Name(), } return &prometheusreceiver.Config{ ReceiverSettings: *receiverSettings, - PrometheusConfig: &config.Config{ - ScrapeConfigs: []*config.ScrapeConfig{scrapeConfig}, + PrometheusConfig: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{scrapeConfig}, }, } } diff --git a/receiver/prometheusexecreceiver/receiver_test.go b/receiver/prometheusexecreceiver/receiver_test.go index 544eae9ccbd57..7e96f1f307f62 100644 --- a/receiver/prometheusexecreceiver/receiver_test.go +++ b/receiver/prometheusexecreceiver/receiver_test.go @@ -21,13 +21,13 @@ import ( "time" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/config" + promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/consumer/pdata" @@ -39,7 +39,7 @@ import ( ) // loadConfigAssertNoError loads the test config and asserts there are no errors, and returns the receiver wanted -func loadConfigAssertNoError(t *testing.T, receiverConfigName string) configmodels.Receiver { +func loadConfigAssertNoError(t *testing.T, receiverConfigName string) config.Receiver { factories, err := componenttest.NopFactories() assert.NoError(t, err) @@ -62,7 +62,7 @@ func TestExecKeyMissing(t *testing.T) { } // assertErrorWhenExecKeyMissing makes sure the config passed throws an error, since it's missing the exec key -func assertErrorWhenExecKeyMissing(t *testing.T, errorReceiverConfig configmodels.Receiver) { +func assertErrorWhenExecKeyMissing(t *testing.T, errorReceiverConfig config.Receiver) { _, err := newPromExecReceiver(component.ReceiverCreateParams{Logger: zap.NewNop()}, errorReceiverConfig.(*Config), nil) assert.Error(t, err, "newPromExecReceiver() didn't return an error") } @@ -76,7 +76,7 @@ func TestEndToEnd(t *testing.T) { } // endToEndScrapeTest creates a receiver that invokes `go run test_prometheus_exporter.go` and waits until it has scraped the /metrics endpoint twice - the application will crash between each scrape -func endToEndScrapeTest(t *testing.T, receiverConfig configmodels.Receiver, testName string) { +func endToEndScrapeTest(t *testing.T, receiverConfig config.Receiver, testName string) { sink := new(consumertest.MetricsSink) wrapper, err := newPromExecReceiver(component.ReceiverCreateParams{Logger: zap.NewNop()}, receiverConfig.(*Config), sink) assert.NoError(t, err, "newPromExecReceiver() returned an error") @@ -124,7 +124,7 @@ func TestConfigBuilderFunctions(t *testing.T) { configTests := []struct { name string customName string - config *Config + cfg *Config wantReceiverConfig *prometheusreceiver.Config wantSubprocessConfig *subprocessmanager.SubprocessConfig wantErr bool @@ -132,7 +132,7 @@ func TestConfigBuilderFunctions(t *testing.T) { { name: "no command", customName: "prometheus_exec", - config: &Config{ + cfg: &Config{ ScrapeInterval: 60 * time.Second, Port: 9104, SubprocessConfig: subprocessmanager.SubprocessConfig{ @@ -141,12 +141,12 @@ func TestConfigBuilderFunctions(t *testing.T) { }, }, wantReceiverConfig: &prometheusreceiver.Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "prometheus_exec", NameVal: "prometheus_exec", }, - PrometheusConfig: &config.Config{ - ScrapeConfigs: []*config.ScrapeConfig{ + PrometheusConfig: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ { ScrapeInterval: model.Duration(60 * time.Second), ScrapeTimeout: model.Duration(10 * time.Second), @@ -176,7 +176,7 @@ func TestConfigBuilderFunctions(t *testing.T) { { name: "normal config", customName: "prometheus_exec/mysqld", - config: &Config{ + cfg: &Config{ ScrapeInterval: 90 * time.Second, Port: 9104, SubprocessConfig: subprocessmanager.SubprocessConfig{ @@ -190,12 +190,12 @@ func TestConfigBuilderFunctions(t *testing.T) { }, }, wantReceiverConfig: &prometheusreceiver.Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "prometheus_exec", NameVal: "prometheus_exec/mysqld", }, - PrometheusConfig: &config.Config{ - ScrapeConfigs: []*config.ScrapeConfig{ + PrometheusConfig: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ { ScrapeInterval: model.Duration(90 * time.Second), ScrapeTimeout: model.Duration(10 * time.Second), @@ -231,7 +231,7 @@ func TestConfigBuilderFunctions(t *testing.T) { { name: "lots of defaults", customName: "prometheus_exec/postgres/test", - config: &Config{ + cfg: &Config{ ScrapeInterval: 60 * time.Second, SubprocessConfig: subprocessmanager.SubprocessConfig{ Command: "postgres_exporter", @@ -244,12 +244,12 @@ func TestConfigBuilderFunctions(t *testing.T) { }, }, wantReceiverConfig: &prometheusreceiver.Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "prometheus_exec", NameVal: "prometheus_exec/postgres/test", }, - PrometheusConfig: &config.Config{ - ScrapeConfigs: []*config.ScrapeConfig{ + PrometheusConfig: &promconfig.Config{ + ScrapeConfigs: []*promconfig.ScrapeConfig{ { ScrapeInterval: model.Duration(60 * time.Second), ScrapeTimeout: model.Duration(10 * time.Second), @@ -286,15 +286,15 @@ func TestConfigBuilderFunctions(t *testing.T) { for _, test := range configTests { t.Run(test.name, func(t *testing.T) { - test.config.SetName(test.customName) - got := getPromReceiverConfig(test.config) + test.cfg.SetName(test.customName) + got := getPromReceiverConfig(test.cfg) assert.Equal(t, test.wantReceiverConfig, got) }) } for _, test := range configTests { t.Run(test.name, func(t *testing.T) { - got := getSubprocessConfig(test.config) + got := getSubprocessConfig(test.cfg) assert.Equal(t, test.wantSubprocessConfig, got) }) } @@ -309,7 +309,7 @@ func TestExtractName(t *testing.T) { { name: "no custom name", config: &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "prometheus_exec", NameVal: "prometheus_exec", }, @@ -319,7 +319,7 @@ func TestExtractName(t *testing.T) { { name: "no custom name, only trailing slash", config: &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "prometheus_exec", NameVal: "prometheus_exec/", }, @@ -329,7 +329,7 @@ func TestExtractName(t *testing.T) { { name: "custom name", config: &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "prometheus_exec", NameVal: "prometheus_exec/custom", }, @@ -339,7 +339,7 @@ func TestExtractName(t *testing.T) { { name: "custom name with slashes inside", config: &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "prometheus_exec", NameVal: "prometheus_exec/custom/name", }, diff --git a/receiver/receivercreator/config.go b/receiver/receivercreator/config.go index a561bef0f1d46..e585df1f1af35 100644 --- a/receiver/receivercreator/config.go +++ b/receiver/receivercreator/config.go @@ -15,7 +15,7 @@ package receivercreator import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configparser" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer" @@ -35,7 +35,7 @@ type receiverConfig struct { // fullName is the full subreceiver name (ie /). fullName string // typeStr is set based on the configured receiver name. - typeStr configmodels.Type + typeStr config.Type // config is the map configured by the user in the config file. It is the contents of the map from // the "config" section. The keys and values are arbitrarily configured by the user. config userConfigMap @@ -76,10 +76,10 @@ func newReceiverTemplate(name string, config userConfigMap) (receiverTemplate, e // Config defines configuration for receiver_creator. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - receiverTemplates map[string]receiverTemplate + config.ReceiverSettings `mapstructure:",squash"` + receiverTemplates map[string]receiverTemplate // WatchObservers are the extensions to listen to endpoints from. - WatchObservers []configmodels.Type `mapstructure:"watch_observers"` + WatchObservers []config.Type `mapstructure:"watch_observers"` // ResourceAttributes is a map of default resource attributes to add to each resource // object received by this receiver from dynamically created receivers. ResourceAttributes resourceAttributes `mapstructure:"resource_attributes"` diff --git a/receiver/receivercreator/config_test.go b/receiver/receivercreator/config_test.go index d7e921486bc2f..e735c00614a19 100644 --- a/receiver/receivercreator/config_test.go +++ b/receiver/receivercreator/config_test.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenthelper" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/consumer" ) @@ -32,11 +32,11 @@ import ( type mockHostFactories struct { component.Host factories component.Factories - extensions map[configmodels.NamedEntity]component.Extension + extensions map[config.NamedEntity]component.Extension } // GetFactory of the specified kind. Returns the factory for a component type. -func (mh *mockHostFactories) GetFactory(kind component.Kind, componentType configmodels.Type) component.Factory { +func (mh *mockHostFactories) GetFactory(kind component.Kind, componentType config.Type) component.Factory { switch kind { case component.KindReceiver: return mh.factories.Receivers[componentType] @@ -50,18 +50,18 @@ func (mh *mockHostFactories) GetFactory(kind component.Kind, componentType confi return nil } -func (mh *mockHostFactories) GetExtensions() map[configmodels.NamedEntity]component.Extension { +func (mh *mockHostFactories) GetExtensions() map[config.NamedEntity]component.Extension { return mh.extensions } -func exampleCreatorFactory(t *testing.T) (*mockHostFactories, *configmodels.Config) { +func exampleCreatorFactory(t *testing.T) (*mockHostFactories, *config.Config) { factories, err := componenttest.NopFactories() require.Nil(t, err) - factories.Receivers[configmodels.Type("nop")] = &nopWithEndpointFactory{ReceiverFactory: componenttest.NewNopReceiverFactory()} + factories.Receivers[config.Type("nop")] = &nopWithEndpointFactory{ReceiverFactory: componenttest.NewNopReceiverFactory()} factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -92,12 +92,12 @@ func TestLoadConfig(t *testing.T) { assert.Equal(t, userConfigMap{ endpointConfigKey: "localhost:12345", }, r1.receiverTemplates["nop/1"].config) - assert.Equal(t, []configmodels.Type{"mock_observer"}, r1.WatchObservers) + assert.Equal(t, []config.Type{"mock_observer"}, r1.WatchObservers) } type nopWithEndpointConfig struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - Endpoint string `mapstructure:"endpoint"` + config.ReceiverSettings `mapstructure:",squash"` + Endpoint string `mapstructure:"endpoint"` } type nopWithEndpointFactory struct { @@ -109,9 +109,9 @@ type nopWithEndpointReceiver struct { consumer.Metrics } -func (*nopWithEndpointFactory) CreateDefaultConfig() configmodels.Receiver { +func (*nopWithEndpointFactory) CreateDefaultConfig() config.Receiver { return &nopWithEndpointConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "nop", }, } @@ -120,7 +120,7 @@ func (*nopWithEndpointFactory) CreateDefaultConfig() configmodels.Receiver { func (*nopWithEndpointFactory) CreateMetricsReceiver( ctx context.Context, _ component.ReceiverCreateParams, - _ configmodels.Receiver, + _ config.Receiver, nextConsumer consumer.Metrics) (component.MetricsReceiver, error) { return &nopWithEndpointReceiver{ Component: componenthelper.New(), diff --git a/receiver/receivercreator/factory.go b/receiver/receivercreator/factory.go index a5acd3e4cfbe7..fbca9d331bacf 100644 --- a/receiver/receivercreator/factory.go +++ b/receiver/receivercreator/factory.go @@ -22,7 +22,6 @@ import ( "github.com/spf13/viper" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/translator/conventions" @@ -45,10 +44,10 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, ResourceAttributes: resourceAttributes{ @@ -70,7 +69,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { return newReceiverCreator(params, cfg.(*Config), consumer) diff --git a/receiver/receivercreator/go.mod b/receiver/receivercreator/go.mod index dbbcc8d57251c..1ebe2635f23f6 100644 --- a/receiver/receivercreator/go.mod +++ b/receiver/receivercreator/go.mod @@ -17,7 +17,7 @@ require ( github.com/spf13/cast v1.3.1 github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/receiver/receivercreator/go.sum b/receiver/receivercreator/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/receiver/receivercreator/go.sum +++ b/receiver/receivercreator/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/receivercreator/observerhandler_test.go b/receiver/receivercreator/observerhandler_test.go index 36c2738a691e2..2d1a8b1c002ed 100644 --- a/receiver/receivercreator/observerhandler_test.go +++ b/receiver/receivercreator/observerhandler_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.uber.org/zap" @@ -49,7 +49,7 @@ var _ runner = (*mockRunner)(nil) func TestOnAdd(t *testing.T) { runner := &mockRunner{} - rcvrCfg := receiverConfig{typeStr: configmodels.Type("name"), config: userConfigMap{"foo": "bar"}, fullName: "name/1"} + rcvrCfg := receiverConfig{typeStr: config.Type("name"), config: userConfigMap{"foo": "bar"}, fullName: "name/1"} cfg := createDefaultConfig().(*Config) cfg.receiverTemplates = map[string]receiverTemplate{ "name/1": {rcvrCfg, "", newRuleOrPanic(`type == "port"`)}, @@ -99,7 +99,7 @@ func TestOnRemove(t *testing.T) { func TestOnChange(t *testing.T) { runner := &mockRunner{} - rcvrCfg := receiverConfig{typeStr: configmodels.Type("name"), config: userConfigMap{"foo": "bar"}, fullName: "name/1"} + rcvrCfg := receiverConfig{typeStr: config.Type("name"), config: userConfigMap{"foo": "bar"}, fullName: "name/1"} oldRcvr := &nopWithEndpointReceiver{} newRcvr := &nopWithEndpointReceiver{} cfg := createDefaultConfig().(*Config) @@ -135,7 +135,7 @@ func TestDynamicConfig(t *testing.T) { cfg := createDefaultConfig().(*Config) cfg.receiverTemplates = map[string]receiverTemplate{ "name/1": { - receiverConfig: receiverConfig{typeStr: configmodels.Type("name"), config: userConfigMap{"endpoint": "`endpoint`:6379"}, fullName: "name/1"}, + receiverConfig: receiverConfig{typeStr: config.Type("name"), config: userConfigMap{"endpoint": "`endpoint`:6379"}, fullName: "name/1"}, Rule: `type == "pod"`, rule: newRuleOrPanic("type == \"pod\""), }, diff --git a/receiver/receivercreator/receiver.go b/receiver/receivercreator/receiver.go index 7f9e4393552ba..a0e49b311c448 100644 --- a/receiver/receivercreator/receiver.go +++ b/receiver/receivercreator/receiver.go @@ -20,7 +20,7 @@ import ( "fmt" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.uber.org/zap" @@ -81,7 +81,7 @@ func (rc *receiverCreator) Start(_ context.Context, host component.Host) error { host: &loggingHost{host, rc.params.Logger}, }} - observers := map[configmodels.Type]observer.Observable{} + observers := map[config.Type]observer.Observable{} // Match all configured observers to the extensions that are running. for _, watchObserver := range rc.cfg.WatchObservers { diff --git a/receiver/receivercreator/receiver_test.go b/receiver/receivercreator/receiver_test.go index 568d247ba4bfc..96645c5dab6a4 100644 --- a/receiver/receivercreator/receiver_test.go +++ b/receiver/receivercreator/receiver_test.go @@ -28,8 +28,8 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/pdata" "go.opentelemetry.io/collector/translator/internaldata" @@ -80,8 +80,8 @@ var _ observer.Observable = (*mockObserver)(nil) func TestMockedEndToEnd(t *testing.T) { host, cfg := exampleCreatorFactory(t) - host.extensions = map[configmodels.NamedEntity]component.Extension{ - &configmodels.ExtensionSettings{ + host.extensions = map[config.NamedEntity]component.Extension{ + &config.ExtensionSettings{ TypeVal: "mock_observer", NameVal: "mock_observer", }: &mockObserver{}, diff --git a/receiver/receivercreator/runner.go b/receiver/receivercreator/runner.go index a93587130f0cb..264a90d9b4c9c 100644 --- a/receiver/receivercreator/runner.go +++ b/receiver/receivercreator/runner.go @@ -20,7 +20,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configparser" "go.opentelemetry.io/collector/consumer" ) @@ -83,7 +82,7 @@ func (run *receiverRunner) loadRuntimeReceiverConfig( factory component.ReceiverFactory, receiver receiverConfig, discoveredConfig userConfigMap, -) (configmodels.Receiver, error) { +) (config.Receiver, error) { mergedConfig := config.NewViper() // Merge in the config values specified in the config file. @@ -109,7 +108,7 @@ func (run *receiverRunner) loadRuntimeReceiverConfig( // createRuntimeReceiver creates a receiver that is discovered at runtime. func (run *receiverRunner) createRuntimeReceiver( factory component.ReceiverFactory, - cfg configmodels.Receiver, + cfg config.Receiver, nextConsumer consumer.Metrics, ) (component.MetricsReceiver, error) { return factory.CreateMetricsReceiver(context.Background(), run.params, cfg, nextConsumer) diff --git a/receiver/redisreceiver/config.go b/receiver/redisreceiver/config.go index 7acd3a96bb221..4c1c2c8def650 100644 --- a/receiver/redisreceiver/config.go +++ b/receiver/redisreceiver/config.go @@ -17,11 +17,11 @@ package redisreceiver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" ) -type config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` +type Config struct { + config.ReceiverSettings `mapstructure:",squash"` // TODO: Use one of the configs from core. // The target endpoint. Endpoint string `mapstructure:"endpoint"` diff --git a/receiver/redisreceiver/factory.go b/receiver/redisreceiver/factory.go index 4bc873e6ca02d..a86636abe2618 100644 --- a/receiver/redisreceiver/factory.go +++ b/receiver/redisreceiver/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -36,9 +36,9 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { - return &config{ - ReceiverSettings: configmodels.ReceiverSettings{ +func createDefaultConfig() config.Receiver { + return &Config{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -49,10 +49,10 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { - oCfg := cfg.(*config) + oCfg := cfg.(*Config) return newRedisReceiver(params.Logger, oCfg, consumer), nil } diff --git a/receiver/redisreceiver/go.mod b/receiver/redisreceiver/go.mod index 06de13d2bfd84..dee2180514973 100644 --- a/receiver/redisreceiver/go.mod +++ b/receiver/redisreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.0.0-00010101000000-000000000000 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/receiver/redisreceiver/go.sum b/receiver/redisreceiver/go.sum index 1b47a1b87162e..a7396d6041005 100644 --- a/receiver/redisreceiver/go.sum +++ b/receiver/redisreceiver/go.sum @@ -922,8 +922,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/redisreceiver/receiver.go b/receiver/redisreceiver/receiver.go index d693d0697163b..dde49704368ab 100644 --- a/receiver/redisreceiver/receiver.go +++ b/receiver/redisreceiver/receiver.go @@ -27,14 +27,14 @@ import ( type redisReceiver struct { logger *zap.Logger - config *config + config *Config consumer consumer.Metrics intervalRunner *interval.Runner } func newRedisReceiver( logger *zap.Logger, - config *config, + config *Config, consumer consumer.Metrics, ) *redisReceiver { return &redisReceiver{ diff --git a/receiver/redisreceiver/redis_e2e_test.go b/receiver/redisreceiver/redis_e2e_test.go index 265c2e3b1648d..45680834c5656 100644 --- a/receiver/redisreceiver/redis_e2e_test.go +++ b/receiver/redisreceiver/redis_e2e_test.go @@ -47,7 +47,7 @@ func TestIntegration(t *testing.T) { c := d.StartImage("docker.io/library/redis:6.0.3", container.WithPortReady(6379)) f := NewFactory() - cfg := f.CreateDefaultConfig().(*config) + cfg := f.CreateDefaultConfig().(*Config) cfg.Endpoint = c.AddrForPort(6379) consumer := new(consumertest.MetricsSink) diff --git a/receiver/sapmreceiver/config.go b/receiver/sapmreceiver/config.go index cb19136f246e6..79c0af8cbd756 100644 --- a/receiver/sapmreceiver/config.go +++ b/receiver/sapmreceiver/config.go @@ -15,15 +15,15 @@ package sapmreceiver import ( + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" ) // Config defines configuration for SAPM receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct + config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct confighttp.HTTPServerSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct splunk.AccessTokenPassthroughConfig `mapstructure:",squash"` diff --git a/receiver/sapmreceiver/config_test.go b/receiver/sapmreceiver/config_test.go index 8af36628576f9..716226cb9eb9b 100644 --- a/receiver/sapmreceiver/config_test.go +++ b/receiver/sapmreceiver/config_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/config/configtls" @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories) require.NoError(t, err) @@ -50,7 +50,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers["sapm/customname"].(*Config) assert.Equal(t, r1, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: "sapm/customname", }, @@ -62,7 +62,7 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Receivers["sapm/tls"].(*Config) assert.Equal(t, r2, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: "sapm/tls", }, @@ -80,7 +80,7 @@ func TestLoadConfig(t *testing.T) { r3 := cfg.Receivers["sapm/passthrough"].(*Config) assert.Equal(t, r3, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: "sapm/passthrough", }, diff --git a/receiver/sapmreceiver/factory.go b/receiver/sapmreceiver/factory.go index 723d2ea6bd0c2..6928a8dc96add 100644 --- a/receiver/sapmreceiver/factory.go +++ b/receiver/sapmreceiver/factory.go @@ -23,8 +23,8 @@ import ( "strconv" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -45,9 +45,9 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithTraces(createTraceReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -88,7 +88,7 @@ func (rCfg *Config) validate() error { func createTraceReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, nextConsumer consumer.Traces, ) (component.TracesReceiver, error) { // assert config is SAPM config diff --git a/receiver/sapmreceiver/go.mod b/receiver/sapmreceiver/go.mod index 7ae9c76df93dc..2e630d740c0d9 100644 --- a/receiver/sapmreceiver/go.mod +++ b/receiver/sapmreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/signalfx/sapm-proto v0.7.0 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/receiver/sapmreceiver/go.sum b/receiver/sapmreceiver/go.sum index d148a842439d7..362db3a44c1a6 100644 --- a/receiver/sapmreceiver/go.sum +++ b/receiver/sapmreceiver/go.sum @@ -902,7 +902,6 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1094,7 +1093,6 @@ github.com/tetafro/godot v1.4.4/go.mod h1:FVDd4JuKliW3UgjswZfJfHq4vAx0bD/Jd5brJj github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1161,8 +1159,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/signalfxreceiver/config.go b/receiver/signalfxreceiver/config.go index 461b60fdadc35..d3f8353f72141 100644 --- a/receiver/signalfxreceiver/config.go +++ b/receiver/signalfxreceiver/config.go @@ -15,15 +15,15 @@ package signalfxreceiver import ( + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" ) // Config defines configuration for the SignalFx receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct + config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct confighttp.HTTPServerSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct splunk.AccessTokenPassthroughConfig `mapstructure:",squash"` diff --git a/receiver/signalfxreceiver/config_test.go b/receiver/signalfxreceiver/config_test.go index fa95e6323f63d..52bcd4c437dbe 100644 --- a/receiver/signalfxreceiver/config_test.go +++ b/receiver/signalfxreceiver/config_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/config/configtls" @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -50,7 +50,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers["signalfx/allsettings"].(*Config) assert.Equal(t, r1, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: "signalfx/allsettings", }, @@ -65,7 +65,7 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Receivers["signalfx/tls"].(*Config) assert.Equal(t, r2, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: "signalfx/tls", }, diff --git a/receiver/signalfxreceiver/factory.go b/receiver/signalfxreceiver/factory.go index 77f766c60e9cd..3a85c78c73038 100644 --- a/receiver/signalfxreceiver/factory.go +++ b/receiver/signalfxreceiver/factory.go @@ -22,8 +22,8 @@ import ( "sync" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -47,9 +47,9 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithLogs(createLogsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -93,7 +93,7 @@ func (rCfg *Config) validate() error { func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { rCfg := cfg.(*Config) @@ -120,7 +120,7 @@ func createMetricsReceiver( func createLogsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Logs, ) (component.LogsReceiver, error) { rCfg := cfg.(*Config) diff --git a/receiver/signalfxreceiver/go.mod b/receiver/signalfxreceiver/go.mod index d898089905777..9d48b5ab6f9cc 100644 --- a/receiver/signalfxreceiver/go.mod +++ b/receiver/signalfxreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/signalfx/com_signalfx_metrics_protobuf v0.0.2 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/receiver/signalfxreceiver/go.sum b/receiver/signalfxreceiver/go.sum index 4a1c503144356..423101c3ec96f 100644 --- a/receiver/signalfxreceiver/go.sum +++ b/receiver/signalfxreceiver/go.sum @@ -832,7 +832,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1015,7 +1014,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1075,8 +1073,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/simpleprometheusreceiver/config.go b/receiver/simpleprometheusreceiver/config.go index d7b94567fc27e..931777cdf1434 100644 --- a/receiver/simpleprometheusreceiver/config.go +++ b/receiver/simpleprometheusreceiver/config.go @@ -18,15 +18,15 @@ import ( "net/url" "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" ) // Config defines configuration for simple prometheus receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - httpConfig `mapstructure:",squash"` - confignet.TCPAddr `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` + httpConfig `mapstructure:",squash"` + confignet.TCPAddr `mapstructure:",squash"` // CollectionInterval is the interval at which metrics should be collected CollectionInterval time.Duration `mapstructure:"collection_interval"` // MetricsPath the path to the metrics endpoint. diff --git a/receiver/simpleprometheusreceiver/config_test.go b/receiver/simpleprometheusreceiver/config_test.go index 2785c4e6d6adb..bc77beddc8a8f 100644 --- a/receiver/simpleprometheusreceiver/config_test.go +++ b/receiver/simpleprometheusreceiver/config_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtest" ) @@ -34,7 +34,7 @@ func TestLoadConfig(t *testing.T) { factory := NewFactory() receiverType := "prometheus_simple" - factories.Receivers[configmodels.Type(receiverType)] = factory + factories.Receivers[config.Type(receiverType)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -50,8 +50,8 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Receivers["prometheus_simple/all_settings"].(*Config) assert.Equal(t, r2, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(receiverType), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(receiverType), NameVal: "prometheus_simple/all_settings", }, TCPAddr: confignet.TCPAddr{ @@ -75,8 +75,8 @@ func TestLoadConfig(t *testing.T) { r3 := cfg.Receivers["prometheus_simple/partial_settings"].(*Config) assert.Equal(t, r3, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(receiverType), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(receiverType), NameVal: "prometheus_simple/partial_settings", }, TCPAddr: confignet.TCPAddr{ @@ -89,8 +89,8 @@ func TestLoadConfig(t *testing.T) { r4 := cfg.Receivers["prometheus_simple/partial_tls_settings"].(*Config) assert.Equal(t, r4, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(receiverType), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(receiverType), NameVal: "prometheus_simple/partial_tls_settings", }, TCPAddr: confignet.TCPAddr{ diff --git a/receiver/simpleprometheusreceiver/factory.go b/receiver/simpleprometheusreceiver/factory.go index 0118f1215a291..e32c8f8462a4f 100644 --- a/receiver/simpleprometheusreceiver/factory.go +++ b/receiver/simpleprometheusreceiver/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -44,9 +44,9 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -61,7 +61,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, nextConsumer consumer.Metrics, ) (component.MetricsReceiver, error) { rCfg := cfg.(*Config) diff --git a/receiver/simpleprometheusreceiver/go.mod b/receiver/simpleprometheusreceiver/go.mod index cba1474325ca5..b2b2d648643e2 100644 --- a/receiver/simpleprometheusreceiver/go.mod +++ b/receiver/simpleprometheusreceiver/go.mod @@ -14,7 +14,7 @@ require ( github.com/prometheus/common v0.20.0 github.com/prometheus/prometheus v1.8.2-0.20210217141258-a6be548dbc17 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect k8s.io/client-go v0.20.5 diff --git a/receiver/simpleprometheusreceiver/go.sum b/receiver/simpleprometheusreceiver/go.sum index 47bf1663a2c87..4bed7b50863c3 100644 --- a/receiver/simpleprometheusreceiver/go.sum +++ b/receiver/simpleprometheusreceiver/go.sum @@ -828,7 +828,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -996,7 +995,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1055,8 +1053,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/splunkhecreceiver/config.go b/receiver/splunkhecreceiver/config.go index 62fe8aadff84e..d5f3d875c1a44 100644 --- a/receiver/splunkhecreceiver/config.go +++ b/receiver/splunkhecreceiver/config.go @@ -20,15 +20,15 @@ import ( "strconv" "github.com/gobwas/glob" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" ) // Config defines configuration for the SignalFx receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct + config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct confighttp.HTTPServerSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct splunk.AccessTokenPassthroughConfig `mapstructure:",squash"` diff --git a/receiver/splunkhecreceiver/config_test.go b/receiver/splunkhecreceiver/config_test.go index 25e303a8a550e..4141b69b9886f 100644 --- a/receiver/splunkhecreceiver/config_test.go +++ b/receiver/splunkhecreceiver/config_test.go @@ -21,8 +21,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/config/configtls" @@ -106,7 +106,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -122,7 +122,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers["splunk_hec/allsettings"].(*Config) assert.Equal(t, r1, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: "splunk_hec/allsettings", }, @@ -138,7 +138,7 @@ func TestLoadConfig(t *testing.T) { r2 := cfg.Receivers["splunk_hec/tls"].(*Config) assert.Equal(t, r2, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: "splunk_hec/tls", }, diff --git a/receiver/splunkhecreceiver/factory.go b/receiver/splunkhecreceiver/factory.go index 183abf66c9cb4..e6f0df4f2f946 100644 --- a/receiver/splunkhecreceiver/factory.go +++ b/receiver/splunkhecreceiver/factory.go @@ -18,9 +18,9 @@ import ( "context" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configerror" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -48,9 +48,9 @@ func NewFactory() component.ReceiverFactory { } // CreateDefaultConfig creates the default configuration for Splunk HEC receiver. -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -66,7 +66,7 @@ func createDefaultConfig() configmodels.Receiver { func createTraceReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Traces, ) (component.TracesReceiver, error) { @@ -77,7 +77,7 @@ func createTraceReceiver( func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { @@ -95,7 +95,7 @@ func createMetricsReceiver( func createLogsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Logs, ) (component.LogsReceiver, error) { diff --git a/receiver/splunkhecreceiver/factory_test.go b/receiver/splunkhecreceiver/factory_test.go index b9a24d6dd68f6..512d39ee6e1d9 100644 --- a/receiver/splunkhecreceiver/factory_test.go +++ b/receiver/splunkhecreceiver/factory_test.go @@ -20,9 +20,9 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configcheck" "go.opentelemetry.io/collector/config/configerror" - "go.opentelemetry.io/collector/config/configmodels" "go.opentelemetry.io/collector/consumer/consumertest" "go.uber.org/zap" ) @@ -54,7 +54,7 @@ func TestCreateReceiver(t *testing.T) { } func TestFactoryType(t *testing.T) { - assert.Equal(t, configmodels.Type("splunk_hec"), NewFactory().Type()) + assert.Equal(t, config.Type("splunk_hec"), NewFactory().Type()) } func TestValidate(t *testing.T) { diff --git a/receiver/splunkhecreceiver/go.mod b/receiver/splunkhecreceiver/go.mod index 941ad99229f28..4a6575b7eea7d 100644 --- a/receiver/splunkhecreceiver/go.mod +++ b/receiver/splunkhecreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/receiver/splunkhecreceiver/go.sum b/receiver/splunkhecreceiver/go.sum index 579950cb2304c..0c3963d848d8a 100644 --- a/receiver/splunkhecreceiver/go.sum +++ b/receiver/splunkhecreceiver/go.sum @@ -810,7 +810,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -975,7 +974,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1033,8 +1031,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/statsdreceiver/config.go b/receiver/statsdreceiver/config.go index fe615ab387c51..8e2a7521a5625 100644 --- a/receiver/statsdreceiver/config.go +++ b/receiver/statsdreceiver/config.go @@ -17,14 +17,14 @@ package statsdreceiver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" ) // Config defines configuration for StatsD receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - NetAddr confignet.NetAddr `mapstructure:",squash"` - AggregationInterval time.Duration `mapstructure:"aggregation_interval"` - EnableMetricType bool `mapstructure:"enable_metric_type"` + config.ReceiverSettings `mapstructure:",squash"` + NetAddr confignet.NetAddr `mapstructure:",squash"` + AggregationInterval time.Duration `mapstructure:"aggregation_interval"` + EnableMetricType bool `mapstructure:"enable_metric_type"` } diff --git a/receiver/statsdreceiver/config_test.go b/receiver/statsdreceiver/config_test.go index 0ab80da14962d..93ad844cd3389 100644 --- a/receiver/statsdreceiver/config_test.go +++ b/receiver/statsdreceiver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtest" ) @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -47,8 +47,8 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers["statsd/receiver_settings"] assert.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: "statsd/receiver_settings", }, NetAddr: confignet.NetAddr{ diff --git a/receiver/statsdreceiver/factory.go b/receiver/statsdreceiver/factory.go index 32d1950a07ed3..8530fcd51d4b1 100644 --- a/receiver/statsdreceiver/factory.go +++ b/receiver/statsdreceiver/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -43,10 +43,10 @@ func NewFactory() component.ReceiverFactory { ) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, NetAddr: confignet.NetAddr{ @@ -61,7 +61,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { c := cfg.(*Config) diff --git a/receiver/statsdreceiver/go.mod b/receiver/statsdreceiver/go.mod index 83216d17ea23a..30755468adc39 100644 --- a/receiver/statsdreceiver/go.mod +++ b/receiver/statsdreceiver/go.mod @@ -13,7 +13,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.opentelemetry.io/otel v0.19.0 go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/receiver/statsdreceiver/go.sum b/receiver/statsdreceiver/go.sum index 5992524550d2a..50502d7f286f4 100644 --- a/receiver/statsdreceiver/go.sum +++ b/receiver/statsdreceiver/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.opentelemetry.io/otel v0.19.0 h1:Lenfy7QHRXPZVsw/12CWpxX6d/JkrX8wrx2vO8G80Ng= go.opentelemetry.io/otel v0.19.0/go.mod h1:j9bF567N9EfomkSidSfmMwIwIBuP37AMAIzVW85OxSg= go.opentelemetry.io/otel/metric v0.19.0/go.mod h1:8f9fglJPRnXuskQmKpnad31lcLJ2VmNNqIsx/uIwBSc= diff --git a/receiver/statsdreceiver/receiver_test.go b/receiver/statsdreceiver/receiver_test.go index a4dacd7a649e7..ce81a0712b044 100644 --- a/receiver/statsdreceiver/receiver_test.go +++ b/receiver/statsdreceiver/receiver_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenterror" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" @@ -109,8 +109,8 @@ func Test_statsdreceiver_EndToEnd(t *testing.T) { name: "default_config with 9s interval", configFn: func() *Config { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, NetAddr: confignet.NetAddr{ diff --git a/receiver/syslogreceiver/go.mod b/receiver/syslogreceiver/go.mod index 6b556eb642bec..024e037a3d03d 100644 --- a/receiver/syslogreceiver/go.mod +++ b/receiver/syslogreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-log-collection v0.16.1-0.20210315170618-aa8d82509c31 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/receiver/syslogreceiver/go.sum b/receiver/syslogreceiver/go.sum index dbc8727224f06..24ebdb2a9c435 100644 --- a/receiver/syslogreceiver/go.sum +++ b/receiver/syslogreceiver/go.sum @@ -943,8 +943,8 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.22.0/go.mod h1:sBkAGYUQSh1f+owCK0aPV2uLcUB6rPHEOWjdvuE2SdQ= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/syslogreceiver/syslog.go b/receiver/syslogreceiver/syslog.go index 8012317dd74a7..ec0dd6f7bf538 100644 --- a/receiver/syslogreceiver/syslog.go +++ b/receiver/syslogreceiver/syslog.go @@ -21,7 +21,7 @@ import ( "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/input/udp" syslogparser "github.com/open-telemetry/opentelemetry-log-collection/operator/builtin/parser/syslog" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/stanza" @@ -39,16 +39,16 @@ func NewFactory() component.ReceiverFactory { type ReceiverType struct{} // Type is the receiver type -func (f ReceiverType) Type() configmodels.Type { - return configmodels.Type(typeStr) +func (f ReceiverType) Type() config.Type { + return config.Type(typeStr) } // CreateDefaultConfig creates a config with type and version -func (f ReceiverType) CreateDefaultConfig() configmodels.Receiver { +func (f ReceiverType) CreateDefaultConfig() config.Receiver { return &SysLogConfig{ BaseConfig: stanza.BaseConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, Operators: stanza.OperatorConfigs{}, @@ -58,7 +58,7 @@ func (f ReceiverType) CreateDefaultConfig() configmodels.Receiver { } // BaseConfig gets the base config from config, for now -func (f ReceiverType) BaseConfig(cfg configmodels.Receiver) stanza.BaseConfig { +func (f ReceiverType) BaseConfig(cfg config.Receiver) stanza.BaseConfig { return cfg.(*SysLogConfig).BaseConfig } @@ -69,7 +69,7 @@ type SysLogConfig struct { } // DecodeInputConfig unmarshals the input operator -func (f ReceiverType) DecodeInputConfig(cfg configmodels.Receiver) (*operator.Config, error) { +func (f ReceiverType) DecodeInputConfig(cfg config.Receiver) (*operator.Config, error) { logConfig := cfg.(*SysLogConfig) yamlBytes, _ := yaml.Marshal(logConfig.Input) inputCfg := syslog.NewSyslogInputConfig("syslog_input") diff --git a/receiver/syslogreceiver/syslog_test.go b/receiver/syslogreceiver/syslog_test.go index fec47958d465a..ababfb6904528 100644 --- a/receiver/syslogreceiver/syslog_test.go +++ b/receiver/syslogreceiver/syslog_test.go @@ -26,7 +26,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/consumer/pdata" @@ -88,7 +88,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -102,7 +102,7 @@ func TestLoadConfig(t *testing.T) { func testdataConfigYamlAsMap() *SysLogConfig { return &SysLogConfig{ BaseConfig: stanza.BaseConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "syslog", NameVal: "syslog", }, @@ -120,7 +120,7 @@ func testdataConfigYamlAsMap() *SysLogConfig { func testdataUDPConfig() *SysLogConfig { return &SysLogConfig{ BaseConfig: stanza.BaseConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "syslog", NameVal: "syslog", }, @@ -143,7 +143,7 @@ func TestDecodeInputConfigFailure(t *testing.T) { factory := NewFactory() badCfg := &SysLogConfig{ BaseConfig: stanza.BaseConfig{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: "syslog", NameVal: "syslog", }, diff --git a/receiver/wavefrontreceiver/config.go b/receiver/wavefrontreceiver/config.go index 61dc9430ca59f..9be861d957cb1 100644 --- a/receiver/wavefrontreceiver/config.go +++ b/receiver/wavefrontreceiver/config.go @@ -17,14 +17,14 @@ package wavefrontreceiver import ( "time" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" ) // Config defines configuration for the Wavefront receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` - confignet.TCPAddr `mapstructure:",squash"` + config.ReceiverSettings `mapstructure:",squash"` + confignet.TCPAddr `mapstructure:",squash"` // TCPIdleTimeout is the timout for idle TCP connections. TCPIdleTimeout time.Duration `mapstructure:"tcp_idle_timeout"` diff --git a/receiver/wavefrontreceiver/config_test.go b/receiver/wavefrontreceiver/config_test.go index 2fb5f765a55e0..ca546bbc069cc 100644 --- a/receiver/wavefrontreceiver/config_test.go +++ b/receiver/wavefrontreceiver/config_test.go @@ -22,7 +22,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configtest" ) @@ -32,7 +32,7 @@ func TestLoadConfig(t *testing.T) { assert.Nil(t, err) factory := NewFactory() - factories.Receivers[configmodels.Type(typeStr)] = factory + factories.Receivers[config.Type(typeStr)] = factory cfg, err := configtest.LoadConfigFile( t, path.Join(".", "testdata", "config.yaml"), factories, ) @@ -48,8 +48,8 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers["wavefront/allsettings"].(*Config) assert.Equal(t, &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: "wavefront/allsettings", }, TCPAddr: confignet.TCPAddr{ diff --git a/receiver/wavefrontreceiver/factory.go b/receiver/wavefrontreceiver/factory.go index 5044ba76ed7f3..db6b9db29bf59 100644 --- a/receiver/wavefrontreceiver/factory.go +++ b/receiver/wavefrontreceiver/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -43,10 +43,10 @@ func NewFactory() component.ReceiverFactory { receiverhelper.WithMetrics(createMetricsReceiver)) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ - TypeVal: configmodels.Type(typeStr), + ReceiverSettings: config.ReceiverSettings{ + TypeVal: config.Type(typeStr), NameVal: typeStr, }, TCPAddr: confignet.TCPAddr{ @@ -59,7 +59,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { diff --git a/receiver/wavefrontreceiver/go.mod b/receiver/wavefrontreceiver/go.mod index b4952fd0bd9ef..f7d271b1d5cdb 100644 --- a/receiver/wavefrontreceiver/go.mod +++ b/receiver/wavefrontreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 google.golang.org/protobuf v1.26.0 ) diff --git a/receiver/wavefrontreceiver/go.sum b/receiver/wavefrontreceiver/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/receiver/wavefrontreceiver/go.sum +++ b/receiver/wavefrontreceiver/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/windowsperfcountersreceiver/config_test.go b/receiver/windowsperfcountersreceiver/config_test.go index 0e2ff9abcd04e..a7addcaa55d69 100644 --- a/receiver/windowsperfcountersreceiver/config_test.go +++ b/receiver/windowsperfcountersreceiver/config_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtest" "go.opentelemetry.io/collector/receiver/scraperhelper" ) @@ -50,7 +50,7 @@ func TestLoadConfig(t *testing.T) { r1 := cfg.Receivers["windowsperfcounters/customname"].(*Config) expectedConfig := &Config{ ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: "windowsperfcounters/customname", }, diff --git a/receiver/windowsperfcountersreceiver/factory.go b/receiver/windowsperfcountersreceiver/factory.go index d58b4fba43a09..21d532895ba1f 100644 --- a/receiver/windowsperfcountersreceiver/factory.go +++ b/receiver/windowsperfcountersreceiver/factory.go @@ -19,7 +19,7 @@ import ( "github.com/spf13/viper" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/scraperhelper" ) @@ -49,10 +49,10 @@ func customUnmarshaler(componentViperSection *viper.Viper, intoCfg interface{}) } // createDefaultConfig creates the default configuration for receiver. -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, diff --git a/receiver/windowsperfcountersreceiver/factory_others.go b/receiver/windowsperfcountersreceiver/factory_others.go index ed01a0ab02672..7f87644e9856c 100644 --- a/receiver/windowsperfcountersreceiver/factory_others.go +++ b/receiver/windowsperfcountersreceiver/factory_others.go @@ -21,7 +21,7 @@ import ( "errors" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" ) @@ -29,7 +29,7 @@ import ( func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { return nil, errors.New("the windows perf counters receiver is only supported on Windows") diff --git a/receiver/windowsperfcountersreceiver/factory_windows.go b/receiver/windowsperfcountersreceiver/factory_windows.go index 6265d83bb22f6..9bf94c990d022 100644 --- a/receiver/windowsperfcountersreceiver/factory_windows.go +++ b/receiver/windowsperfcountersreceiver/factory_windows.go @@ -20,7 +20,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/scraperhelper" ) @@ -29,7 +29,7 @@ import ( func createMetricsReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { oCfg := cfg.(*Config) diff --git a/receiver/windowsperfcountersreceiver/go.mod b/receiver/windowsperfcountersreceiver/go.mod index 95ba6f4ac9a97..7d2597fb18c49 100644 --- a/receiver/windowsperfcountersreceiver/go.mod +++ b/receiver/windowsperfcountersreceiver/go.mod @@ -13,7 +13,7 @@ require ( github.com/pelletier/go-toml v1.8.0 // indirect github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 gopkg.in/ini.v1 v1.57.0 // indirect diff --git a/receiver/windowsperfcountersreceiver/go.sum b/receiver/windowsperfcountersreceiver/go.sum index 8a05162dfef21..2cad10763a45d 100644 --- a/receiver/windowsperfcountersreceiver/go.sum +++ b/receiver/windowsperfcountersreceiver/go.sum @@ -825,7 +825,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -991,7 +990,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1050,8 +1048,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/zookeeperreceiver/factory.go b/receiver/zookeeperreceiver/factory.go index 752c12468b0df..c1a1b8b5a143f 100644 --- a/receiver/zookeeperreceiver/factory.go +++ b/receiver/zookeeperreceiver/factory.go @@ -19,7 +19,7 @@ import ( "time" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" @@ -41,10 +41,10 @@ func NewFactory() component.ReceiverFactory { ) } -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -61,7 +61,7 @@ func createDefaultConfig() configmodels.Receiver { func createMetricsReceiver( _ context.Context, params component.ReceiverCreateParams, - config configmodels.Receiver, + config config.Receiver, consumer consumer.Metrics, ) (component.MetricsReceiver, error) { rConfig := config.(*Config) diff --git a/receiver/zookeeperreceiver/factory_test.go b/receiver/zookeeperreceiver/factory_test.go index bc23e386e5c71..c2ab5fb8c040d 100644 --- a/receiver/zookeeperreceiver/factory_test.go +++ b/receiver/zookeeperreceiver/factory_test.go @@ -22,14 +22,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/testbed/testbed" ) func TestFactory(t *testing.T) { f := NewFactory() - require.Equal(t, configmodels.Type("zookeeper"), f.Type()) + require.Equal(t, config.Type("zookeeper"), f.Type()) cfg := f.CreateDefaultConfig() rCfg := cfg.(*Config) @@ -41,7 +41,7 @@ func TestFactory(t *testing.T) { tests := []struct { name string - config configmodels.Receiver + config config.Receiver wantErr bool }{ { diff --git a/receiver/zookeeperreceiver/go.mod b/receiver/zookeeperreceiver/go.mod index 1fa8c82ae70b7..4af3c4456477c 100644 --- a/receiver/zookeeperreceiver/go.mod +++ b/receiver/zookeeperreceiver/go.mod @@ -13,7 +13,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.0.0-00010101000000-000000000000 github.com/pelletier/go-toml v1.8.0 // indirect github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/receiver/zookeeperreceiver/go.sum b/receiver/zookeeperreceiver/go.sum index 46b79153afd76..c8a9ed1a91076 100644 --- a/receiver/zookeeperreceiver/go.sum +++ b/receiver/zookeeperreceiver/go.sum @@ -829,7 +829,6 @@ github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9 github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -997,7 +996,6 @@ github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1056,8 +1054,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/receiver/zookeeperreceiver/internal/metadata/generated_metrics.go b/receiver/zookeeperreceiver/internal/metadata/generated_metrics.go index fbd1a307faddd..1d7d71923c106 100644 --- a/receiver/zookeeperreceiver/internal/metadata/generated_metrics.go +++ b/receiver/zookeeperreceiver/internal/metadata/generated_metrics.go @@ -17,12 +17,12 @@ package metadata import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer/pdata" ) // Type is the component type name. -const Type configmodels.Type = "zookeeperreceiver" +const Type config.Type = "zookeeperreceiver" // MetricIntf is an interface to generically interact with generated metric. type MetricIntf interface { diff --git a/testbed/go.mod b/testbed/go.mod index c5715228efd9f..3f5deed985f09 100644 --- a/testbed/go.mod +++ b/testbed/go.mod @@ -11,7 +11,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatareceivers/mockawsxrayreceiver v0.0.0-00010101000000-000000000000 - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 ) diff --git a/testbed/go.sum b/testbed/go.sum index dcbe284be8fec..2978d6f33e360 100644 --- a/testbed/go.sum +++ b/testbed/go.sum @@ -939,7 +939,6 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= @@ -1150,7 +1149,6 @@ github.com/tetafro/godot v1.4.4/go.mod h1:FVDd4JuKliW3UgjswZfJfHq4vAx0bD/Jd5brJj github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= @@ -1220,8 +1218,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/config.go b/testbed/mockdatareceivers/mockawsxrayreceiver/config.go index b2c31f6a376a4..d88d7c61151e0 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/config.go +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/config.go @@ -15,13 +15,13 @@ package mockawsxrayreceiver import ( - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/configtls" ) // Config defines configuration for xray receiver. type Config struct { - configmodels.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct + config.ReceiverSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct // The target endpoint. Endpoint string `mapstructure:"endpoint"` diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/factory.go b/testbed/mockdatareceivers/mockawsxrayreceiver/factory.go index acaf3a24a9714..04ef77616b463 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/factory.go +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/factory.go @@ -18,7 +18,7 @@ import ( "context" "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/config/configmodels" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver/receiverhelper" ) @@ -42,9 +42,9 @@ func NewFactory() component.ReceiverFactory { } // CreateDefaultConfig creates the default configuration for Jaeger receiver. -func createDefaultConfig() configmodels.Receiver { +func createDefaultConfig() config.Receiver { return &Config{ - ReceiverSettings: configmodels.ReceiverSettings{ + ReceiverSettings: config.ReceiverSettings{ TypeVal: typeStr, NameVal: typeStr, }, @@ -56,7 +56,7 @@ func createDefaultConfig() configmodels.Receiver { func createTraceReceiver( ctx context.Context, params component.ReceiverCreateParams, - cfg configmodels.Receiver, + cfg config.Receiver, nextConsumer consumer.Traces, ) (component.TracesReceiver, error) { rCfg := cfg.(*Config) diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod b/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod index eabb914cc0920..4c990c71fc479 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/gorilla/mux v1.8.0 github.com/pelletier/go-toml v1.8.0 // indirect - go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae + go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be go.uber.org/zap v1.16.0 gopkg.in/ini.v1 v1.57.0 // indirect ) diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum b/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum index f1f82a0982d5c..283b90ec7cf6e 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum @@ -893,8 +893,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae h1:rjGCn6ZBMKYePsmTKN9hCmQeyGEoxLOSptblqygB9AA= -go.opentelemetry.io/collector v0.23.1-0.20210326174743-acb3ae141cae/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be h1:e9f6dxCQ7Q0yoaR9ygg9QBxE+FjVCj2kuZk1Oi4I+vA= +go.opentelemetry.io/collector v0.23.1-0.20210326203202-f5bfc3c516be/go.mod h1:wMTwy0/4xrFRZj/XX1UH5VAd0WAVts9Rq7ZKQldCIkU= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=