Skip to content

Commit

Permalink
Update core dependency (#503)
Browse files Browse the repository at this point in the history
* Update core dependency

* go mod tidy

* make gotidy

* Fix ExampleComponents package

* Fix splunkhecexporter

* Fix protobuf usage

* Fix receivercreator

* Switch to pointers for passing OpenCensus protos in tests

* Replace golang/protobuf with gogo/protobuf to fix lint errors

* Bump RAM limit
  • Loading branch information
nilebox committed Jul 24, 2020
1 parent 2f9ac2b commit 12be564
Show file tree
Hide file tree
Showing 118 changed files with 1,230 additions and 13,530 deletions.
5 changes: 2 additions & 3 deletions cmd/otelcontribcol/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package main
import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenterror"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/service/defaultcomponents"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter"
Expand Down Expand Up @@ -50,11 +49,11 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/wavefrontreceiver"
)

func components() (config.Factories, error) {
func components() (component.Factories, error) {
errs := []error{}
factories, err := defaultcomponents.Components()
if err != nil {
return config.Factories{}, err
return component.Factories{}, err
}

extensions := []component.ExtensionFactory{
Expand Down
7 changes: 4 additions & 3 deletions exporter/alibabacloudlogserviceexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config/configmodels"
"go.opentelemetry.io/collector/config/configtest"
"go.uber.org/zap"
)

func TestLoadConfig(t *testing.T) {
factories, err := config.ExampleComponents()
factories, err := componenttest.ExampleComponents()
assert.Nil(t, err)

factory := &Factory{}
factories.Exporters[configmodels.Type(typeStr)] = factory
cfg, err := config.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories)
cfg, err := configtest.LoadConfigFile(t, path.Join(".", "testdata", "config.yaml"), factories)

require.NoError(t, err)
require.NotNil(t, cfg)
Expand Down
6 changes: 3 additions & 3 deletions exporter/alibabacloudlogserviceexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.13

require (
github.com/aliyun/aliyun-log-go-sdk v0.1.10
github.com/census-instrumentation/opencensus-proto v0.2.1
github.com/census-instrumentation/opencensus-proto v0.3.0
github.com/gogo/protobuf v1.3.1
github.com/golang/protobuf v1.3.5
github.com/golang/protobuf v1.4.2
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/collector v0.5.1-0.20200722180048-c0b3cf61a63a
go.opentelemetry.io/collector v0.5.1-0.20200723232356-d4053cc823a0
go.uber.org/zap v1.15.0
)
497 changes: 22 additions & 475 deletions exporter/alibabacloudlogserviceexporter/go.sum

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions exporter/awsxrayexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config/configmodels"
"go.opentelemetry.io/collector/config/configtest"
)

func TestLoadConfig(t *testing.T) {
factories, err := config.ExampleComponents()
factories, err := componenttest.ExampleComponents()
assert.Nil(t, err)

factory := NewFactory()
factories.Exporters[configmodels.Type(typeStr)] = factory
cfg, err := config.LoadConfigFile(
cfg, err := configtest.LoadConfigFile(
t, path.Join(".", "testdata", "config.yaml"), factories,
)

Expand Down
7 changes: 4 additions & 3 deletions exporter/awsxrayexporter/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import (
"github.com/aws/aws-sdk-go/aws/session"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config/configtest"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -85,11 +86,11 @@ func TestRegionEnv(t *testing.T) {
}

func loadExporterConfig(t *testing.T) *Config {
factories, err := config.ExampleComponents()
factories, err := componenttest.ExampleComponents()
assert.Nil(t, err)
factory := NewFactory()
factories.Exporters[factory.Type()] = factory
otelcfg, _ := config.LoadConfigFile(
otelcfg, _ := configtest.LoadConfigFile(
t, path.Join(".", "testdata", "config.yaml"), factories,
)
xrayExporterCfg := otelcfg.Exporters["awsxray"].(*Config)
Expand Down
11 changes: 6 additions & 5 deletions exporter/awsxrayexporter/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ 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/component/componenttest"
"go.opentelemetry.io/collector/config/configcheck"
"go.opentelemetry.io/collector/config/configmodels"
"go.opentelemetry.io/collector/config/configtest"
"go.uber.org/zap"
)

Expand Down Expand Up @@ -53,11 +54,11 @@ func TestCreateDefaultConfig(t *testing.T) {
func TestCreateTraceExporter(t *testing.T) {
logger := zap.NewNop()

factories, err := config.ExampleComponents()
factories, err := componenttest.ExampleComponents()
require.NoError(t, err)
factory := NewFactory()
factories.Exporters[configmodels.Type(typeStr)] = factory
cfg, err := config.LoadConfigFile(
cfg, err := configtest.LoadConfigFile(
t, path.Join(".", "testdata", "config.yaml"), factories,
)
require.NoError(t, err)
Expand All @@ -71,11 +72,11 @@ func TestCreateTraceExporter(t *testing.T) {
func TestCreateMetricsExporter(t *testing.T) {
logger := zap.NewNop()

factories, err := config.ExampleComponents()
factories, err := componenttest.ExampleComponents()
require.NoError(t, err)
factory := NewFactory()
factories.Exporters[configmodels.Type(typeStr)] = factory
cfg, err := config.LoadConfigFile(
cfg, err := configtest.LoadConfigFile(
t, path.Join(".", "testdata", "config.yaml"), factories,
)
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion exporter/awsxrayexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/open-telemetry/opentelemetry-proto v0.4.0
github.com/shirou/gopsutil v2.20.4+incompatible // indirect
github.com/stretchr/testify v1.6.1
go.opentelemetry.io/collector v0.5.1-0.20200722180048-c0b3cf61a63a
go.opentelemetry.io/collector v0.5.1-0.20200723232356-d4053cc823a0
go.uber.org/zap v1.15.0
golang.org/x/net v0.0.0-20200625001655-4c5254603344
)
Loading

0 comments on commit 12be564

Please sign in to comment.