diff --git a/processor/awsapplicationsignalsprocessor/Makefile b/processor/awsapplicationsignalsprocessor/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/processor/awsapplicationsignalsprocessor/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/processor/awsapplicationsignalsprocessor/config/config.go b/processor/awsapplicationsignalsprocessor/config/config.go index e79a0a49603e..55091487c371 100644 --- a/processor/awsapplicationsignalsprocessor/config/config.go +++ b/processor/awsapplicationsignalsprocessor/config/config.go @@ -8,7 +8,7 @@ import ( "errors" "time" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/rules" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/rules" ) type Config struct { diff --git a/processor/awsapplicationsignalsprocessor/factory.go b/processor/awsapplicationsignalsprocessor/factory.go index 18b5cb5a541b..5cef58512c56 100644 --- a/processor/awsapplicationsignalsprocessor/factory.go +++ b/processor/awsapplicationsignalsprocessor/factory.go @@ -1,7 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT -package awsapplicationsignals +package awsapplicationsignalsprocessor import ( "context" @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processorhelper" - appsignalsconfig "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" + appsignalsconfig "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" ) const ( diff --git a/processor/awsapplicationsignalsprocessor/factory_test.go b/processor/awsapplicationsignalsprocessor/factory_test.go index bdce68c2d74e..0d12b04cf1af 100644 --- a/processor/awsapplicationsignalsprocessor/factory_test.go +++ b/processor/awsapplicationsignalsprocessor/factory_test.go @@ -1,7 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT -package awsapplicationsignals +package awsapplicationsignalsprocessor import ( "path/filepath" @@ -12,8 +12,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap/confmaptest" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/rules" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/rules" ) var expectedRules = []rules.Rule{ diff --git a/processor/awsapplicationsignalsprocessor/go.mod b/processor/awsapplicationsignalsprocessor/go.mod new file mode 100644 index 000000000000..4b9ab11a4482 --- /dev/null +++ b/processor/awsapplicationsignalsprocessor/go.mod @@ -0,0 +1,78 @@ +module github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor + +go 1.22.5 + +require ( + github.com/deckarep/golang-set/v2 v2.6.0 + github.com/gobwas/glob v0.2.3 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.103.0 + go.opentelemetry.io/collector/confmap v0.103.0 + go.opentelemetry.io/collector/consumer v0.103.0 + go.opentelemetry.io/collector/pdata v1.10.0 + go.opentelemetry.io/collector/processor v0.103.0 + go.opentelemetry.io/collector/semconv v0.103.0 + go.uber.org/zap v1.27.0 + golang.org/x/text v0.19.0 + k8s.io/api v0.30.0 + k8s.io/apimachinery v0.30.0 + k8s.io/client-go v0.30.0 +) + +require ( + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect + github.com/imdario/mergo v0.3.6 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.5.2 // indirect + go.opentelemetry.io/collector v0.103.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.103.0 // indirect + go.opentelemetry.io/collector/featuregate v1.17.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/time v0.3.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect +) diff --git a/processor/awsapplicationsignalsprocessor/go.sum b/processor/awsapplicationsignalsprocessor/go.sum new file mode 100644 index 000000000000..4867b9206ab9 --- /dev/null +++ b/processor/awsapplicationsignalsprocessor/go.sum @@ -0,0 +1,230 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= +github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= +github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= +github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/collector v0.103.0 h1:mssWo1y31p1F/SRsSBnVUX6YocgawCqM1blpE+hkWog= +go.opentelemetry.io/collector v0.103.0/go.mod h1:mgqdTFB7QCYiOeEdJSSEktovPqy+2fw4oTKJzyeSB0U= +go.opentelemetry.io/collector/component v0.103.0 h1:j52YAsp8EmqYUotVUwhovkqFZGuxArEkk65V4TI46NE= +go.opentelemetry.io/collector/component v0.103.0/go.mod h1:jKs19tGtCO8Hr5/YM0F+PoFcl8SVe/p4Ge30R6srkbc= +go.opentelemetry.io/collector/config/configtelemetry v0.103.0 h1:KLbhkFqdw9D31t0IhJ/rnhMRvz/s14eie0fKfm5xWns= +go.opentelemetry.io/collector/config/configtelemetry v0.103.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/confmap v0.103.0 h1:qKKZyWzropSKfgtGv12JzADOXNgThqH1Vx6qzblBE24= +go.opentelemetry.io/collector/confmap v0.103.0/go.mod h1:TlOmqe/Km3K6WgxyhEAdCb/V1Yp6eSU76fCoiluEa88= +go.opentelemetry.io/collector/consumer v0.103.0 h1:L/7SA/U2ua5L4yTLChnI9I+IFGKYU5ufNQ76QKYcPYs= +go.opentelemetry.io/collector/consumer v0.103.0/go.mod h1:7jdYb9kSSOsu2R618VRX0VJ+Jt3OrDvvUsDToHTEOLI= +go.opentelemetry.io/collector/featuregate v1.17.0 h1:vpfXyWe7DFqCsDArsR9rAKKtVpt72PKjzjeqPegViws= +go.opentelemetry.io/collector/featuregate v1.17.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= +go.opentelemetry.io/collector/pdata v1.10.0 h1:oLyPLGvPTQrcRT64ZVruwvmH/u3SHTfNo01pteS4WOE= +go.opentelemetry.io/collector/pdata v1.10.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= +go.opentelemetry.io/collector/pdata/testdata v0.103.0 h1:iI6NOE0L2je/bxlWzAWHQ/yCtnGupgv42Hl9Al1q/g4= +go.opentelemetry.io/collector/pdata/testdata v0.103.0/go.mod h1:tLzRhb/h37/9wFRQVr+CxjKi5qmhSRpCAiOlhwRkeEk= +go.opentelemetry.io/collector/processor v0.103.0 h1:YZ+LRuHKtOam7SCeLkJAP6bS1d6XxeYP22OyMN3VP0s= +go.opentelemetry.io/collector/processor v0.103.0/go.mod h1:/mxyh0NpJgpZycm7iHDpM7i5PdtWvKKdCZf0cyADJfU= +go.opentelemetry.io/collector/semconv v0.103.0 h1:5tlVoZlo9USHAU2Bz4YrEste0Vm5AMufXkYJhAVve1Q= +go.opentelemetry.io/collector/semconv v0.103.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= +go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= +go.opentelemetry.io/otel/sdk/metric v1.27.0 h1:5uGNOlpXi+Hbo/DRoI31BSb1v+OGcpv2NemcCrOL8gI= +go.opentelemetry.io/otel/sdk/metric v1.27.0/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA= +k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE= +k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA= +k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ= +k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol/metrics_limiter.go b/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol/metrics_limiter.go index b32171041b75..d22001e90c8d 100644 --- a/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol/metrics_limiter.go +++ b/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol/metrics_limiter.go @@ -13,8 +13,8 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.uber.org/zap" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" ) const ( diff --git a/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol/metrics_limiter_test.go b/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol/metrics_limiter_test.go index 3e08c7f3fd0b..af96c615bd4f 100644 --- a/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol/metrics_limiter_test.go +++ b/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol/metrics_limiter_test.go @@ -15,8 +15,8 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.uber.org/zap" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - awsapplicationsignalsconfig "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + awsapplicationsignalsconfig "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" ) var emptyResourceAttributes = pcommon.NewMap() diff --git a/processor/awsapplicationsignalsprocessor/internal/ecsutil/ecsutil.go b/processor/awsapplicationsignalsprocessor/internal/ecsutil/ecsutil.go new file mode 100644 index 000000000000..d2b1fe973b58 --- /dev/null +++ b/processor/awsapplicationsignalsprocessor/internal/ecsutil/ecsutil.go @@ -0,0 +1,126 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT + +package ecsutil + +import ( + "encoding/json" + "log" + "os" + "strings" + "sync" + + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/httpclient" +) + +const ( + v2MetadataEndpoint = "http://169.254.170.2/v2/metadata" + v3MetadataEndpointEnv = "ECS_CONTAINER_METADATA_URI" + v4MetadataEndpointEnv = "ECS_CONTAINER_METADATA_URI_V4" +) + +// The following values are borrowed from: +// - https://github.com/aws/amazon-cloudwatch-agent/blob/bde3bd9775ae1d4e4f8a2fdb92d7b6fdd5186fba/cfg/envconfig/envconfig.go +const ( + RunInContainer = "RUN_IN_CONTAINER" + TrueValue = "True" +) + +type ecsMetadataResponse struct { + Cluster string + TaskARN string +} + +type ecsUtil struct { + Cluster string + Region string + TaskARN string + httpClient *httpclient.HttpClient +} + +var ecsUtilInstance *ecsUtil + +var ecsUtilOnce sync.Once + +func GetECSUtilSingleton() *ecsUtil { + ecsUtilOnce.Do(func() { + ecsUtilInstance = initECSUtilSingleton() + }) + return ecsUtilInstance +} + +func initECSUtilSingleton() (newInstance *ecsUtil) { + newInstance = &ecsUtil{httpClient: httpclient.New()} + if os.Getenv(RunInContainer) != TrueValue { + return + } + log.Println("I! attempt to access ECS task metadata to determine whether I'm running in ECS.") + ecsMetadataResponse, err := newInstance.getECSMetadata() + + if err != nil { + log.Printf("I! access ECS task metadata fail with response %v, assuming I'm not running in ECS.\n", err) + return + } + + newInstance.parseRegion(ecsMetadataResponse) + newInstance.parseClusterName(ecsMetadataResponse) + newInstance.TaskARN = ecsMetadataResponse.TaskARN + return + +} + +func (e *ecsUtil) IsECS() bool { + return e.Region != "" +} + +func (e *ecsUtil) getECSMetadata() (em *ecsMetadataResponse, err error) { + // Based on endpoint to get ECS metadata, for more information on the respond, https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-metadata-endpoint.html + if v4MetadataEndpoint, ok := os.LookupEnv(v4MetadataEndpointEnv); ok { + em, err = e.getMetadataResponse(v4MetadataEndpoint + "/task") + } else if v3MetadataEndpoint, ok := os.LookupEnv(v3MetadataEndpointEnv); ok { + em, err = e.getMetadataResponse(v3MetadataEndpoint + "/task") + } else { + em, err = e.getMetadataResponse(v2MetadataEndpoint) + } + return +} + +func (e *ecsUtil) getMetadataResponse(endpoint string) (em *ecsMetadataResponse, err error) { + em = &ecsMetadataResponse{} + resp, err := e.httpClient.Request(endpoint) + + if err != nil { + return + } + + err = json.Unmarshal(resp, em) + if err != nil { + log.Printf("E! Unable to parse response from ecsmetadata endpoint, error: %v", err) + log.Printf("D! Content is %s", string(resp)) + } + return +} + +// There are two formats of Task ARN (https://docs.aws.amazon.com/AmazonECS/latest/userguide/ecs-account-settings.html#ecs-resource-ids) +// arn:aws:ecs:region:aws_account_id:task/task-id +// arn:aws:ecs:region:aws_account_id:task/cluster-name/task-id +// This function will return region extracted from Task ARN +func (e *ecsUtil) parseRegion(em *ecsMetadataResponse) { + splitedContent := strings.Split(em.TaskARN, ":") + // When splitting the ARN with ":", the 4th segment is the region + if len(splitedContent) < 4 { + log.Printf("E! Invalid ecs task arn: %s", em.TaskARN) + } + e.Region = splitedContent[3] +} + +// There is only one format for ClusterArn (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Cluster.html) +// arn:aws:ecs:region:aws_account_id:cluster/cluster-name +func (e *ecsUtil) parseClusterName(em *ecsMetadataResponse) { + splitedContent := strings.Split(em.Cluster, "/") + // When splitting the ClusterName with /, the last is always the cluster name + if len(splitedContent) == 0 { + log.Printf("E! Invalid cluster arn: %s", em.Cluster) + } + e.Cluster = splitedContent[len(splitedContent)-1] +} diff --git a/processor/awsapplicationsignalsprocessor/internal/httpclient/httpclient.go b/processor/awsapplicationsignalsprocessor/internal/httpclient/httpclient.go new file mode 100644 index 000000000000..08df1ca8838b --- /dev/null +++ b/processor/awsapplicationsignalsprocessor/internal/httpclient/httpclient.go @@ -0,0 +1,72 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: MIT + +package httpclient + +import ( + "fmt" + "io" + "log" + "math" + "net/http" + "time" +) + +const ( + defaultMaxRetries = 3 + defaultTimeout = 1 * time.Second + defaultBackoffRetryBaseInMills = 200 +) + +type HttpClient struct { + maxRetries int + backoffRetryBaseInMills int + client *http.Client +} + +func New() *HttpClient { + return &HttpClient{ + maxRetries: defaultMaxRetries, + backoffRetryBaseInMills: defaultBackoffRetryBaseInMills, + client: &http.Client{Timeout: defaultTimeout}, + } +} + +func (h *HttpClient) backoffSleep(currentRetryCount int) { + backoffInMillis := int64(float64(h.backoffRetryBaseInMills) * math.Pow(2, float64(currentRetryCount))) + sleepDuration := time.Millisecond * time.Duration(backoffInMillis) + if sleepDuration > 60*1000 { + sleepDuration = 60 * 1000 + } + time.Sleep(sleepDuration) +} + +func (h *HttpClient) Request(endpoint string) (body []byte, err error) { + for i := 0; i < h.maxRetries; i++ { + body, err = h.request(endpoint) + if err != nil { + log.Printf("W! retry [%d/%d], unable to get http response from %s, error: %v", i, h.maxRetries, endpoint, err) + h.backoffSleep(i) + } + } + return +} + +func (h *HttpClient) request(endpoint string) ([]byte, error) { + resp, err := h.client.Get(endpoint) + if err != nil { + return nil, fmt.Errorf("unable to get response from %s, error: %v", endpoint, err) + } + + if resp.StatusCode != http.StatusOK { + return nil, fmt.Errorf("unable to get response from %s, status code: %d", endpoint, resp.StatusCode) + } + + defer resp.Body.Close() + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("unable to read response body from %s, error: %v", endpoint, err) + } + + return body, nil +} diff --git a/processor/awsapplicationsignalsprocessor/internal/normalizer/attributesnormalizer.go b/processor/awsapplicationsignalsprocessor/internal/normalizer/attributesnormalizer.go index 561961752dec..59d34f053378 100644 --- a/processor/awsapplicationsignalsprocessor/internal/normalizer/attributesnormalizer.go +++ b/processor/awsapplicationsignalsprocessor/internal/normalizer/attributesnormalizer.go @@ -12,9 +12,9 @@ import ( semconv "go.opentelemetry.io/collector/semconv/v1.22.0" "go.uber.org/zap" - "github.com/aws/amazon-cloudwatch-agent/internal/version" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" + // "github.com/aws/amazon-cloudwatch-agent/internal/version" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" ) const ( @@ -176,7 +176,8 @@ func (n *attributesNormalizer) normalizeTelemetryAttributes(attributes, resource mode = instrumentationModeAuto } attributes.PutStr(common.MetricAttributeTelemetrySDK, fmt.Sprintf("%s,%s,%s,%s", sdkName, sdkVersion, sdkLang, mode)) - attributes.PutStr(common.MetricAttributeTelemetryAgent, fmt.Sprintf("CWAgent/%s", version.Number())) + // NOTE: In CWAgent, `opentelemetry-collector` is replaced by `CWAgent` + attributes.PutStr(common.MetricAttributeTelemetryAgent, fmt.Sprintf("opentelemetry-collector/%s", GetCollectorVersion())) var telemetrySource string if val, ok := attributes.Get(attr.AWSSpanKind); ok { diff --git a/processor/awsapplicationsignalsprocessor/internal/normalizer/attributesnormalizer_test.go b/processor/awsapplicationsignalsprocessor/internal/normalizer/attributesnormalizer_test.go index d51e0fcc06b9..96cd3afb9dc1 100644 --- a/processor/awsapplicationsignalsprocessor/internal/normalizer/attributesnormalizer_test.go +++ b/processor/awsapplicationsignalsprocessor/internal/normalizer/attributesnormalizer_test.go @@ -12,7 +12,7 @@ import ( semconv "go.opentelemetry.io/collector/semconv/v1.22.0" "go.uber.org/zap" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" ) func TestRenameAttributes_for_metric(t *testing.T) { diff --git a/processor/awsapplicationsignalsprocessor/internal/normalizer/version_info.go b/processor/awsapplicationsignalsprocessor/internal/normalizer/version_info.go new file mode 100644 index 000000000000..770c84386d45 --- /dev/null +++ b/processor/awsapplicationsignalsprocessor/internal/normalizer/version_info.go @@ -0,0 +1,35 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package normalizer + +import ( + "runtime/debug" + "sync" +) + +var ( + once sync.Once + cachedVersion string +) + +func GetCollectorVersion() string { + once.Do(func() { + info, ok := debug.ReadBuildInfo() + if !ok { + cachedVersion = "UNKNOWN" + return + } + + for _, mod := range info.Deps { + if mod.Path == "go.opentelemetry.io/collector" { + cachedVersion = mod.Version + return + } + } + + cachedVersion = "UNKNOWN" + }) + + return cachedVersion +} diff --git a/processor/awsapplicationsignalsprocessor/internal/prune/metric_pruner.go b/processor/awsapplicationsignalsprocessor/internal/prune/metric_pruner.go index 31e5d5a04816..c492a5d4ec30 100644 --- a/processor/awsapplicationsignalsprocessor/internal/prune/metric_pruner.go +++ b/processor/awsapplicationsignalsprocessor/internal/prune/metric_pruner.go @@ -9,7 +9,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" ) type MetricPruner struct { diff --git a/processor/awsapplicationsignalsprocessor/internal/prune/metric_pruner_test.go b/processor/awsapplicationsignalsprocessor/internal/prune/metric_pruner_test.go index 3f715b4e8715..da1ca82828e1 100644 --- a/processor/awsapplicationsignalsprocessor/internal/prune/metric_pruner_test.go +++ b/processor/awsapplicationsignalsprocessor/internal/prune/metric_pruner_test.go @@ -8,7 +8,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" ) func TestMetricPrunerWithIndexableAttribute(t *testing.T) { diff --git a/processor/awsapplicationsignalsprocessor/internal/resolver/attributesresolver.go b/processor/awsapplicationsignalsprocessor/internal/resolver/attributesresolver.go index 7e57a2c388f2..3b858767fbc4 100644 --- a/processor/awsapplicationsignalsprocessor/internal/resolver/attributesresolver.go +++ b/processor/awsapplicationsignalsprocessor/internal/resolver/attributesresolver.go @@ -12,9 +12,9 @@ import ( semconv "go.opentelemetry.io/collector/semconv/v1.22.0" "go.uber.org/zap" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - appsignalsconfig "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + appsignalsconfig "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" ) const ( diff --git a/processor/awsapplicationsignalsprocessor/internal/resolver/attributesresolver_test.go b/processor/awsapplicationsignalsprocessor/internal/resolver/attributesresolver_test.go index fd055f1489a8..0161c82bf2d1 100644 --- a/processor/awsapplicationsignalsprocessor/internal/resolver/attributesresolver_test.go +++ b/processor/awsapplicationsignalsprocessor/internal/resolver/attributesresolver_test.go @@ -14,9 +14,9 @@ import ( semconv "go.opentelemetry.io/collector/semconv/v1.22.0" "go.uber.org/zap" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" ) type MockSubResolver struct { diff --git a/processor/awsapplicationsignalsprocessor/internal/resolver/ecs.go b/processor/awsapplicationsignalsprocessor/internal/resolver/ecs.go index 845d7ca4087a..644aa647312d 100644 --- a/processor/awsapplicationsignalsprocessor/internal/resolver/ecs.go +++ b/processor/awsapplicationsignalsprocessor/internal/resolver/ecs.go @@ -10,9 +10,9 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" semconv "go.opentelemetry.io/collector/semconv/v1.22.0" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" - "github.com/aws/amazon-cloudwatch-agent/translator/util/ecsutil" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/ecsutil" ) type ecsResourceAttributesResolver struct { diff --git a/processor/awsapplicationsignalsprocessor/internal/resolver/ecs_test.go b/processor/awsapplicationsignalsprocessor/internal/resolver/ecs_test.go index 6deac1ded2d9..7f81cbe42c41 100644 --- a/processor/awsapplicationsignalsprocessor/internal/resolver/ecs_test.go +++ b/processor/awsapplicationsignalsprocessor/internal/resolver/ecs_test.go @@ -10,10 +10,10 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" semconv "go.opentelemetry.io/collector/semconv/v1.22.0" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - appsignalsconfig "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" - "github.com/aws/amazon-cloudwatch-agent/translator/util/ecsutil" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + appsignalsconfig "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/ecsutil" ) func TestResourceAttributesResolverWithECSClusterName(t *testing.T) { diff --git a/processor/awsapplicationsignalsprocessor/internal/resolver/kubernetes.go b/processor/awsapplicationsignalsprocessor/internal/resolver/kubernetes.go index 753af4e60ef8..0dbc812b43f9 100644 --- a/processor/awsapplicationsignalsprocessor/internal/resolver/kubernetes.go +++ b/processor/awsapplicationsignalsprocessor/internal/resolver/kubernetes.go @@ -21,9 +21,9 @@ import ( "k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/clientcmd" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" ) const ( diff --git a/processor/awsapplicationsignalsprocessor/internal/resolver/kubernetes_test.go b/processor/awsapplicationsignalsprocessor/internal/resolver/kubernetes_test.go index 254a02c14c26..f8e909afe890 100644 --- a/processor/awsapplicationsignalsprocessor/internal/resolver/kubernetes_test.go +++ b/processor/awsapplicationsignalsprocessor/internal/resolver/kubernetes_test.go @@ -19,10 +19,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" - "github.com/aws/amazon-cloudwatch-agent/translator/util/eksdetector" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" ) // MockDeleter deletes a key immediately, useful for testing. @@ -835,8 +834,6 @@ func TestEksResolver(t *testing.T) { } func TestK8sResourceAttributesResolverOnEKS(t *testing.T) { - eksdetector.NewDetector = eksdetector.TestEKSDetector - eksdetector.IsEKS = eksdetector.TestIsEKSCacheEKS // helper function to get string values from the attributes getStrAttr := func(attributes pcommon.Map, key string, t *testing.T) string { if value, ok := attributes.Get(key); ok { @@ -912,8 +909,6 @@ func TestK8sResourceAttributesResolverOnEKS(t *testing.T) { } func TestK8sResourceAttributesResolverOnK8S(t *testing.T) { - eksdetector.NewDetector = eksdetector.TestK8sDetector - eksdetector.IsEKS = eksdetector.TestIsEKSCacheK8s // helper function to get string values from the attributes getStrAttr := func(attributes pcommon.Map, key string, t *testing.T) string { if value, ok := attributes.Get(key); ok { @@ -989,7 +984,6 @@ func TestK8sResourceAttributesResolverOnK8S(t *testing.T) { } func TestK8sResourceAttributesResolverOnK8SOnPrem(t *testing.T) { - eksdetector.NewDetector = eksdetector.TestK8sDetector // helper function to get string values from the attributes getStrAttr := func(attributes pcommon.Map, key string, t *testing.T) string { if value, ok := attributes.Get(key); ok { diff --git a/processor/awsapplicationsignalsprocessor/processor.go b/processor/awsapplicationsignalsprocessor/processor.go index 784ee9dd9635..30a83a779f40 100644 --- a/processor/awsapplicationsignalsprocessor/processor.go +++ b/processor/awsapplicationsignalsprocessor/processor.go @@ -1,7 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT -package awsapplicationsignals +package awsapplicationsignalsprocessor import ( "context" @@ -15,12 +15,12 @@ import ( "golang.org/x/text/cases" "golang.org/x/text/language" - appsignalsconfig "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/cardinalitycontrol" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/normalizer" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/prune" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/resolver" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/rules" + appsignalsconfig "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/cardinalitycontrol" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/normalizer" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/prune" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/resolver" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/rules" ) const ( diff --git a/processor/awsapplicationsignalsprocessor/processor_test.go b/processor/awsapplicationsignalsprocessor/processor_test.go index 3e90f4181fa2..4b01206960bb 100644 --- a/processor/awsapplicationsignalsprocessor/processor_test.go +++ b/processor/awsapplicationsignalsprocessor/processor_test.go @@ -1,7 +1,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT -package awsapplicationsignals +package awsapplicationsignalsprocessor import ( "context" @@ -12,8 +12,8 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" "go.uber.org/zap" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/config" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/rules" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/config" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/rules" ) var testRules = []rules.Rule{ diff --git a/processor/awsapplicationsignalsprocessor/rules/common.go b/processor/awsapplicationsignalsprocessor/rules/common.go index 0eba48173fec..af85c47d01ee 100644 --- a/processor/awsapplicationsignalsprocessor/rules/common.go +++ b/processor/awsapplicationsignalsprocessor/rules/common.go @@ -9,8 +9,8 @@ import ( "github.com/gobwas/glob" "go.opentelemetry.io/collector/pdata/pcommon" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" ) type AllowListAction string diff --git a/processor/awsapplicationsignalsprocessor/rules/common_test.go b/processor/awsapplicationsignalsprocessor/rules/common_test.go index 5a9d5262cea0..c1761f7a867f 100644 --- a/processor/awsapplicationsignalsprocessor/rules/common_test.go +++ b/processor/awsapplicationsignalsprocessor/rules/common_test.go @@ -6,8 +6,8 @@ package rules import ( "go.opentelemetry.io/collector/pdata/pcommon" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" - attr "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/internal/attributes" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" + attr "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/internal/attributes" ) func generateTestAttributes(service string, operation string, remoteService string, remoteOperation string, diff --git a/processor/awsapplicationsignalsprocessor/rules/keeper.go b/processor/awsapplicationsignalsprocessor/rules/keeper.go index c4b65e999c72..fa386001eda4 100644 --- a/processor/awsapplicationsignalsprocessor/rules/keeper.go +++ b/processor/awsapplicationsignalsprocessor/rules/keeper.go @@ -6,7 +6,7 @@ package rules import ( "go.opentelemetry.io/collector/pdata/pcommon" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" ) type KeepActions struct { diff --git a/processor/awsapplicationsignalsprocessor/rules/replacer.go b/processor/awsapplicationsignalsprocessor/rules/replacer.go index fdae4ef3e1b4..b67dd77fcab2 100644 --- a/processor/awsapplicationsignalsprocessor/rules/replacer.go +++ b/processor/awsapplicationsignalsprocessor/rules/replacer.go @@ -6,7 +6,7 @@ package rules import ( "go.opentelemetry.io/collector/pdata/pcommon" - "github.com/aws/amazon-cloudwatch-agent/plugins/processors/awsapplicationsignals/common" + "github.com/amazon-contributing/opentelemetry-collector-contrib/processor/awsapplicationsignalsprocessor/common" ) type ReplaceActions struct {