diff --git a/CHANGELOG.md b/CHANGELOG.md index d3d1fa10f715..9d67434292f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ### 💡 Enhancements 💡 - `transformprocessor`: Add transformation of metrics (#10100) +- `transformprocessor`: Include transform processor in components (#10134) - `kubeletstatsreceiver`: Update receiver to use new Metrics Builder. All emitted metrics remain the same. (#9744) ### 🧰 Bug fixes 🧰 diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index c5f6db4fc97e..09f63aad238e 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -55,6 +55,7 @@ require ( github.com/Shopify/sarama v1.33.0 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/StackExchange/wmi v1.2.1 // indirect + github.com/alecthomas/participle/v2 v2.0.0-alpha8 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/aliyun/aliyun-log-go-sdk v0.1.35 // indirect github.com/antonmedv/expr v1.9.0 // indirect @@ -328,6 +329,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.51.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.51.0 // indirect @@ -722,6 +724,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/span replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor => ../../processor/tailsamplingprocessor +replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor => ../../processor/transformprocessor + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver => ../../receiver/activedirectorydsreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver => ../../receiver/apachereceiver diff --git a/cmd/configschema/go.sum b/cmd/configschema/go.sum index 33d7073fa92e..d357861b0a9b 100644 --- a/cmd/configschema/go.sum +++ b/cmd/configschema/go.sum @@ -241,6 +241,10 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/participle/v2 v2.0.0-alpha8 h1:X6nuChfgfQXNTE+ZdjTFSfnSNr8E07LSVLAqIIjtsGI= +github.com/alecthomas/participle/v2 v2.0.0-alpha8/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= +github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E= +github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= diff --git a/go.mod b/go.mod index e688c1361c78..6f0625353d53 100644 --- a/go.mod +++ b/go.mod @@ -77,6 +77,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.51.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.51.0 @@ -183,6 +184,7 @@ require ( github.com/Shopify/sarama v1.33.0 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/StackExchange/wmi v1.2.1 // indirect + github.com/alecthomas/participle/v2 v2.0.0-alpha8 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/aliyun/aliyun-log-go-sdk v0.1.35 // indirect github.com/antonmedv/expr v1.9.0 // indirect diff --git a/go.sum b/go.sum index d27355a881f2..11cc178c6430 100644 --- a/go.sum +++ b/go.sum @@ -241,6 +241,10 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/alecthomas/participle/v2 v2.0.0-alpha8 h1:X6nuChfgfQXNTE+ZdjTFSfnSNr8E07LSVLAqIIjtsGI= +github.com/alecthomas/participle/v2 v2.0.0-alpha8/go.mod h1:NumScqsC42o9x+dGj8/YqsIfhrIQjFEOFovxotbBirA= +github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1 h1:GDQdwm/gAcJcLAKQQZGOJ4knlw+7rfEQQcmwTbt4p5E= +github.com/alecthomas/repr v0.0.0-20181024024818-d37bc2a10ba1/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= diff --git a/internal/components/components.go b/internal/components/components.go index 25568e2e842f..d03942d12ed2 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -97,6 +97,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver" @@ -321,6 +322,7 @@ func Components() (component.Factories, error) { spanprocessor.NewFactory(), cumulativetodeltaprocessor.NewFactory(), deltatorateprocessor.NewFactory(), + transformprocessor.NewFactory(), } factories.Processors, err = component.MakeProcessorFactoryMap(processors...) if err != nil { diff --git a/internal/components/processors_test.go b/internal/components/processors_test.go index a86c9f1ef978..eef004179f82 100644 --- a/internal/components/processors_test.go +++ b/internal/components/processors_test.go @@ -128,6 +128,9 @@ func TestDefaultProcessors(t *testing.T) { { processor: "tail_sampling", }, + { + processor: "transform", + }, } assert.Len(t, tests, len(procFactories), "All processors MUST be added to lifecycle tests")