Skip to content

Commit

Permalink
ecssd: Import local ecssd extension failed to compile
Browse files Browse the repository at this point in the history
Version mismatch ...
  • Loading branch information
pingleig committed Jun 12, 2021
1 parent 0134db7 commit d30c480
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/newrelicexporter v0.28.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter v0.28.0
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.28.0
github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.28.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor v0.28.0
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.28.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.28.0
Expand Down Expand Up @@ -42,3 +43,5 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/commo
replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr => github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.28.0

replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata => github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.28.0

replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver => ../../open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,9 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec=
go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
Expand Down
16 changes: 16 additions & 0 deletions pkg/defaultcomponents/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/newrelicexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sapmexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver"
Expand Down Expand Up @@ -52,6 +53,21 @@ func Components() (component.Factories, error) {
return component.Factories{}, err
}

// enable extensions
extensions := []component.ExtensionFactory{
ecsobserver.NewFactory(),
}

for _, ext := range factories.Extensions {
extensions = append(extensions, ext)
}

factories.Extensions, err = component.MakeExtensionFactoryMap(extensions...)
if err != nil {
errs = append(errs, err)
}


// enable the selected receivers
factories.Receivers, err = component.MakeReceiverFactoryMap(
prometheusreceiver.NewFactory(),
Expand Down

0 comments on commit d30c480

Please sign in to comment.