diff --git a/.chloggen/remove-exporterhelperprofiles.yaml b/.chloggen/remove-exporterhelperprofiles.yaml new file mode 100644 index 00000000000..5d9c7b5d62d --- /dev/null +++ b/.chloggen/remove-exporterhelperprofiles.yaml @@ -0,0 +1,18 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: exporterhelper + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove deprecated exporterhelperprofiles module, use xexporterhelper instead. + +# One or more tracking issues or pull requests related to the change +issues: [11778] + +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [api] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c09ff1a0d93..c18cd76eead 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -28,16 +28,15 @@ service/internal/graph @open-telemetry/collector-approvers @djaglowski extension/experimental/storage @open-telemetry/collector-approvers @swiatekm # Profiling-related modules -pdata/pprofile @open-telemetry/collector-approvers @mx-psi @dmathieu -consumer/consumerprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu -consumer/xconsumer @open-telemetry/collector-approvers @mx-psi @dmathieu -connector/connectorprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu -connector/xconnector @open-telemetry/collector-approvers @mx-psi @dmathieu -exporter/exporterhelper/exporterhelperprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu -exporter/exporterhelper/xexporterhelper @open-telemetry/collector-approvers @mx-psi @dmathieu -exporter/exporterprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu -exporter/xexporter @open-telemetry/collector-approvers @mx-psi @dmathieu -processor/processorprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu -processor/xprocessor @open-telemetry/collector-approvers @mx-psi @dmathieu -receiver/receiverprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu -receiver/xreceiver @open-telemetry/collector-approvers @mx-psi @dmathieu +pdata/pprofile @open-telemetry/collector-approvers @mx-psi @dmathieu +consumer/consumerprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu +consumer/xconsumer @open-telemetry/collector-approvers @mx-psi @dmathieu +connector/connectorprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu +connector/xconnector @open-telemetry/collector-approvers @mx-psi @dmathieu +exporter/exporterhelper/xexporterhelper @open-telemetry/collector-approvers @mx-psi @dmathieu +exporter/exporterprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu +exporter/xexporter @open-telemetry/collector-approvers @mx-psi @dmathieu +processor/processorprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu +processor/xprocessor @open-telemetry/collector-approvers @mx-psi @dmathieu +receiver/receiverprofiles @open-telemetry/collector-approvers @mx-psi @dmathieu +receiver/xreceiver @open-telemetry/collector-approvers @mx-psi @dmathieu diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 6dcb251d090..7c95eb9014e 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -50,7 +50,6 @@ replaces: - go.opentelemetry.io/collector/exporter/exporterprofiles => ${WORKSPACE_DIR}/exporter/exporterprofiles - go.opentelemetry.io/collector/exporter/xexporter => ${WORKSPACE_DIR}/exporter/xexporter - go.opentelemetry.io/collector/exporter/exportertest => ${WORKSPACE_DIR}/exporter/exportertest - - go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles => ${WORKSPACE_DIR}/exporter/exporterhelper/exporterhelperprofiles - go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper => ${WORKSPACE_DIR}/exporter/exporterhelper/xexporterhelper - go.opentelemetry.io/collector/extension => ${WORKSPACE_DIR}/extension - go.opentelemetry.io/collector/extension/auth => ${WORKSPACE_DIR}/extension/auth diff --git a/exporter/exporterhelper/exporterhelperprofiles/Makefile b/exporter/exporterhelper/exporterhelperprofiles/Makefile deleted file mode 100644 index bdd863a203b..00000000000 --- a/exporter/exporterhelper/exporterhelperprofiles/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../../Makefile.Common diff --git a/exporter/exporterhelper/exporterhelperprofiles/go.mod b/exporter/exporterhelper/exporterhelperprofiles/go.mod deleted file mode 100644 index 40ae6449837..00000000000 --- a/exporter/exporterhelper/exporterhelperprofiles/go.mod +++ /dev/null @@ -1,111 +0,0 @@ -module go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles - -go 1.22.0 - -require ( - github.com/stretchr/testify v1.10.0 - go.opentelemetry.io/collector/component v0.116.0 - go.opentelemetry.io/collector/component/componenttest v0.116.0 - go.opentelemetry.io/collector/config/configretry v1.22.0 - go.opentelemetry.io/collector/consumer v1.22.0 - go.opentelemetry.io/collector/consumer/consumererror v0.116.0 - go.opentelemetry.io/collector/consumer/consumertest v0.116.0 - go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 - go.opentelemetry.io/collector/exporter v0.116.0 - go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.116.0 - go.opentelemetry.io/collector/exporter/exportertest v0.116.0 - go.opentelemetry.io/collector/exporter/xexporter v0.116.0 - go.opentelemetry.io/collector/pdata/pprofile v0.116.0 - go.opentelemetry.io/collector/pdata/testdata v0.116.0 - go.opentelemetry.io/otel v1.32.0 - go.opentelemetry.io/otel/sdk v1.32.0 - go.opentelemetry.io/otel/trace v1.32.0 -) - -require ( - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/hashicorp/go-version v1.7.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.116.0 // indirect - go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.116.0 // indirect - go.opentelemetry.io/collector/extension v0.116.0 // indirect - go.opentelemetry.io/collector/extension/experimental/storage v0.116.0 // indirect - go.opentelemetry.io/collector/featuregate v1.22.0 // indirect - go.opentelemetry.io/collector/pdata v1.22.0 // indirect - go.opentelemetry.io/collector/pipeline v0.116.0 // indirect - go.opentelemetry.io/collector/pipeline/xpipeline v0.116.0 // indirect - go.opentelemetry.io/collector/receiver v0.116.0 // indirect - go.opentelemetry.io/collector/receiver/receivertest v0.116.0 // indirect - go.opentelemetry.io/collector/receiver/xreceiver v0.116.0 // indirect - go.opentelemetry.io/otel/metric v1.32.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.27.0 // indirect - golang.org/x/net v0.29.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/text v0.18.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.68.1 // indirect - google.golang.org/protobuf v1.35.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -replace go.opentelemetry.io/collector/consumer/consumertest => ../../../consumer/consumertest - -replace go.opentelemetry.io/collector/pdata/pprofile => ../../../pdata/pprofile - -replace go.opentelemetry.io/collector/pdata/testdata => ../../../pdata/testdata - -replace go.opentelemetry.io/collector/exporter => ../../ - -replace go.opentelemetry.io/collector/consumer => ../../../consumer - -replace go.opentelemetry.io/collector/consumer/consumererror/xconsumererror => ../../../consumer/consumererror/xconsumererror - -replace go.opentelemetry.io/collector/receiver => ../../../receiver - -replace go.opentelemetry.io/collector/consumer/xconsumer => ../../../consumer/xconsumer - -replace go.opentelemetry.io/collector/component => ../../../component - -replace go.opentelemetry.io/collector/component/componenttest => ../../../component/componenttest - -replace go.opentelemetry.io/collector/receiver/xreceiver => ../../../receiver/xreceiver - -replace go.opentelemetry.io/collector/receiver/receivertest => ../../../receiver/receivertest - -replace go.opentelemetry.io/collector/extension => ../../../extension - -replace go.opentelemetry.io/collector/pdata => ../../../pdata - -replace go.opentelemetry.io/collector/exporter/xexporter => ../../xexporter - -replace go.opentelemetry.io/collector/config/configtelemetry => ../../../config/configtelemetry - -replace go.opentelemetry.io/collector/config/configretry => ../../../config/configretry - -replace go.opentelemetry.io/collector/pipeline/xpipeline => ../../../pipeline/xpipeline - -replace go.opentelemetry.io/collector/extension/experimental/storage => ../../../extension/experimental/storage - -replace go.opentelemetry.io/collector/pipeline => ../../../pipeline - -replace go.opentelemetry.io/collector/exporter/exportertest => ../../exportertest - -replace go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper => ../xexporterhelper - -replace go.opentelemetry.io/collector/consumer/consumererror => ../../../consumer/consumererror - -replace go.opentelemetry.io/collector/extension/extensiontest => ../../../extension/extensiontest - -replace go.opentelemetry.io/collector/scraper => ../../../scraper - -replace go.opentelemetry.io/collector/featuregate => ../../../featuregate diff --git a/exporter/exporterhelper/exporterhelperprofiles/go.sum b/exporter/exporterhelper/exporterhelperprofiles/go.sum deleted file mode 100644 index bd214092d6d..00000000000 --- a/exporter/exporterhelper/exporterhelperprofiles/go.sum +++ /dev/null @@ -1,102 +0,0 @@ -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -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/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/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/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/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/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.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/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= -go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= -go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= -go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= -go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= -go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= -go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= -go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= -go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= -go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= -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.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= -golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -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.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -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.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -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/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-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= -google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/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/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/exporter/exporterhelper/exporterhelperprofiles/profiles.go b/exporter/exporterhelper/exporterhelperprofiles/profiles.go deleted file mode 100644 index 62d3c736a72..00000000000 --- a/exporter/exporterhelper/exporterhelperprofiles/profiles.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Deprecated: [0.116.0] Use go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper instead. -package exporterhelperprofiles // import "go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles" - -import "go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper" - -// NewProfilesExporter creates an xexporter.Profiles that records observability metrics and wraps every request with a Span. -// Deprecated: [0.116.0] Use xexporterhelper.NewProfilesExporter instead. -var NewProfilesExporter = xexporterhelper.NewProfilesExporter - -// RequestFromProfilesFunc converts pprofile.Profiles into a user-defined Request. -// Deprecated: [0.116.0] Use xexporterhelper.RequestFromProfilesFunc instead. -type RequestFromProfilesFunc = xexporterhelper.RequestFromProfilesFunc - -// NewProfilesRequestExporter creates a new profiles exporter based on a custom ProfilesConverter and RequestSender. -// Deprecated: [0.116.0] Use xexporterhelper.NewProfilesRequestExporter instead. -var NewProfilesRequestExporter = xexporterhelper.NewProfilesRequestExporter diff --git a/exporter/exporterhelper/exporterhelperprofiles/profiles_test.go b/exporter/exporterhelper/exporterhelperprofiles/profiles_test.go deleted file mode 100644 index ace145c8ced..00000000000 --- a/exporter/exporterhelper/exporterhelperprofiles/profiles_test.go +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package exporterhelperprofiles - -import ( - "context" - "errors" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - sdktrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/sdk/trace/tracetest" - "go.opentelemetry.io/otel/trace" - nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configretry" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumererror" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/consumer/xconsumer" - "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/exporter/exporterhelper/internal" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/exporter/internal/queue" - "go.opentelemetry.io/collector/exporter/xexporter" - "go.opentelemetry.io/collector/pdata/pprofile" - "go.opentelemetry.io/collector/pdata/testdata" -) - -const ( - fakeProfilesParentSpanName = "fake_profiles_parent_span_name" -) - -var fakeProfilesExporterConfig = struct{}{} - -func TestProfilesExporter_Default(t *testing.T) { - ld := pprofile.NewProfiles() - le, err := NewProfilesExporter(context.Background(), exportertest.NewNopSettings(), &fakeProfilesExporterConfig, newPushProfilesData(nil)) - assert.NotNil(t, le) - require.NoError(t, err) - - assert.Equal(t, consumer.Capabilities{MutatesData: false}, le.Capabilities()) - require.NoError(t, le.Start(context.Background(), componenttest.NewNopHost())) - require.NoError(t, le.ConsumeProfiles(context.Background(), ld)) - require.NoError(t, le.Shutdown(context.Background())) -} - -func TestProfilesRequestExporter_Default(t *testing.T) { - ld := pprofile.NewProfiles() - le, err := NewProfilesRequestExporter(context.Background(), exportertest.NewNopSettings(), - internal.RequestFromProfilesFunc(nil)) - assert.NotNil(t, le) - require.NoError(t, err) - - assert.Equal(t, consumer.Capabilities{MutatesData: false}, le.Capabilities()) - require.NoError(t, le.Start(context.Background(), componenttest.NewNopHost())) - require.NoError(t, le.ConsumeProfiles(context.Background(), ld)) - require.NoError(t, le.Shutdown(context.Background())) -} - -func TestProfilesExporter_WithCapabilities(t *testing.T) { - capabilities := consumer.Capabilities{MutatesData: true} - le, err := NewProfilesExporter(context.Background(), exportertest.NewNopSettings(), &fakeProfilesExporterConfig, newPushProfilesData(nil), exporterhelper.WithCapabilities(capabilities)) - require.NoError(t, err) - require.NotNil(t, le) - - assert.Equal(t, capabilities, le.Capabilities()) -} - -func TestProfilesRequestExporter_WithCapabilities(t *testing.T) { - capabilities := consumer.Capabilities{MutatesData: true} - le, err := NewProfilesRequestExporter(context.Background(), exportertest.NewNopSettings(), - internal.RequestFromProfilesFunc(nil), exporterhelper.WithCapabilities(capabilities)) - require.NoError(t, err) - require.NotNil(t, le) - - assert.Equal(t, capabilities, le.Capabilities()) -} - -func TestProfilesExporter_Default_ReturnError(t *testing.T) { - ld := pprofile.NewProfiles() - want := errors.New("my_error") - le, err := NewProfilesExporter(context.Background(), exportertest.NewNopSettings(), &fakeProfilesExporterConfig, newPushProfilesData(want)) - require.NoError(t, err) - require.NotNil(t, le) - require.Equal(t, want, le.ConsumeProfiles(context.Background(), ld)) -} - -func TestProfilesRequestExporter_Default_ConvertError(t *testing.T) { - ld := pprofile.NewProfiles() - want := errors.New("convert_error") - le, err := NewProfilesRequestExporter(context.Background(), exportertest.NewNopSettings(), - func(context.Context, pprofile.Profiles) (exporterhelper.Request, error) { - return nil, want - }) - require.NoError(t, err) - require.NotNil(t, le) - require.Equal(t, consumererror.NewPermanent(want), le.ConsumeProfiles(context.Background(), ld)) -} - -func TestProfilesRequestExporter_Default_ExportError(t *testing.T) { - ld := pprofile.NewProfiles() - want := errors.New("export_error") - le, err := NewProfilesRequestExporter(context.Background(), exportertest.NewNopSettings(), - internal.RequestFromProfilesFunc(want)) - require.NoError(t, err) - require.NotNil(t, le) - require.Equal(t, want, le.ConsumeProfiles(context.Background(), ld)) -} - -func TestProfilesExporter_WithPersistentQueue(t *testing.T) { - qCfg := exporterhelper.NewDefaultQueueConfig() - storageID := component.MustNewIDWithName("file_storage", "storage") - qCfg.StorageID = &storageID - rCfg := configretry.NewDefaultBackOffConfig() - ts := consumertest.ProfilesSink{} - set := exportertest.NewNopSettings() - set.ID = component.MustNewIDWithName("test_profiles", "with_persistent_queue") - te, err := NewProfilesExporter(context.Background(), set, &fakeProfilesExporterConfig, ts.ConsumeProfiles, exporterhelper.WithRetry(rCfg), exporterhelper.WithQueue(qCfg)) - require.NoError(t, err) - - host := &internal.MockHost{Ext: map[component.ID]component.Component{ - storageID: queue.NewMockStorageExtension(nil), - }} - require.NoError(t, te.Start(context.Background(), host)) - t.Cleanup(func() { require.NoError(t, te.Shutdown(context.Background())) }) - - traces := testdata.GenerateProfiles(2) - require.NoError(t, te.ConsumeProfiles(context.Background(), traces)) - require.Eventually(t, func() bool { - return len(ts.AllProfiles()) == 1 && ts.SampleCount() == 2 - }, 500*time.Millisecond, 10*time.Millisecond) -} - -func TestProfilesExporter_WithSpan(t *testing.T) { - set := exportertest.NewNopSettings() - sr := new(tracetest.SpanRecorder) - set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) - otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) - - le, err := NewProfilesExporter(context.Background(), set, &fakeProfilesExporterConfig, newPushProfilesData(nil)) - require.NoError(t, err) - require.NotNil(t, le) - checkWrapSpanForProfilesExporter(t, sr, set.TracerProvider.Tracer("test"), le, nil, 1) -} - -func TestProfilesRequestExporter_WithSpan(t *testing.T) { - set := exportertest.NewNopSettings() - sr := new(tracetest.SpanRecorder) - set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) - otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) - - le, err := NewProfilesRequestExporter(context.Background(), set, internal.RequestFromProfilesFunc(nil)) - require.NoError(t, err) - require.NotNil(t, le) - checkWrapSpanForProfilesExporter(t, sr, set.TracerProvider.Tracer("test"), le, nil, 1) -} - -func TestProfilesExporter_WithSpan_ReturnError(t *testing.T) { - set := exportertest.NewNopSettings() - sr := new(tracetest.SpanRecorder) - set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) - otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) - - want := errors.New("my_error") - le, err := NewProfilesExporter(context.Background(), set, &fakeProfilesExporterConfig, newPushProfilesData(want)) - require.NoError(t, err) - require.NotNil(t, le) - checkWrapSpanForProfilesExporter(t, sr, set.TracerProvider.Tracer("test"), le, want, 1) -} - -func TestProfilesRequestExporter_WithSpan_ReturnError(t *testing.T) { - set := exportertest.NewNopSettings() - sr := new(tracetest.SpanRecorder) - set.TracerProvider = sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr)) - otel.SetTracerProvider(set.TracerProvider) - defer otel.SetTracerProvider(nooptrace.NewTracerProvider()) - - want := errors.New("my_error") - le, err := NewProfilesRequestExporter(context.Background(), set, internal.RequestFromProfilesFunc(want)) - require.NoError(t, err) - require.NotNil(t, le) - checkWrapSpanForProfilesExporter(t, sr, set.TracerProvider.Tracer("test"), le, want, 1) -} - -func TestProfilesExporter_WithShutdown(t *testing.T) { - shutdownCalled := false - shutdown := func(context.Context) error { shutdownCalled = true; return nil } - - le, err := NewProfilesExporter(context.Background(), exportertest.NewNopSettings(), &fakeProfilesExporterConfig, newPushProfilesData(nil), exporterhelper.WithShutdown(shutdown)) - assert.NotNil(t, le) - require.NoError(t, err) - - require.NoError(t, le.Shutdown(context.Background())) - assert.True(t, shutdownCalled) -} - -func TestProfilesRequestExporter_WithShutdown(t *testing.T) { - shutdownCalled := false - shutdown := func(context.Context) error { shutdownCalled = true; return nil } - - le, err := NewProfilesRequestExporter(context.Background(), exportertest.NewNopSettings(), - internal.RequestFromProfilesFunc(nil), exporterhelper.WithShutdown(shutdown)) - assert.NotNil(t, le) - require.NoError(t, err) - - require.NoError(t, le.Shutdown(context.Background())) - assert.True(t, shutdownCalled) -} - -func TestProfilesExporter_WithShutdown_ReturnError(t *testing.T) { - want := errors.New("my_error") - shutdownErr := func(context.Context) error { return want } - - le, err := NewProfilesExporter(context.Background(), exportertest.NewNopSettings(), &fakeProfilesExporterConfig, newPushProfilesData(nil), exporterhelper.WithShutdown(shutdownErr)) - assert.NotNil(t, le) - require.NoError(t, err) - - assert.Equal(t, want, le.Shutdown(context.Background())) -} - -func TestProfilesRequestExporter_WithShutdown_ReturnError(t *testing.T) { - want := errors.New("my_error") - shutdownErr := func(context.Context) error { return want } - - le, err := NewProfilesRequestExporter(context.Background(), exportertest.NewNopSettings(), - internal.RequestFromProfilesFunc(nil), exporterhelper.WithShutdown(shutdownErr)) - assert.NotNil(t, le) - require.NoError(t, err) - - assert.Equal(t, want, le.Shutdown(context.Background())) -} - -func newPushProfilesData(retError error) xconsumer.ConsumeProfilesFunc { - return func(_ context.Context, _ pprofile.Profiles) error { - return retError - } -} - -func generateProfilesTraffic(t *testing.T, tracer trace.Tracer, le xexporter.Profiles, numRequests int, wantError error) { - ld := testdata.GenerateProfiles(1) - ctx, span := tracer.Start(context.Background(), fakeProfilesParentSpanName) - defer span.End() - for i := 0; i < numRequests; i++ { - require.Equal(t, wantError, le.ConsumeProfiles(ctx, ld)) - } -} - -// nolint: unparam -func checkWrapSpanForProfilesExporter(t *testing.T, sr *tracetest.SpanRecorder, tracer trace.Tracer, le xexporter.Profiles, - wantError error, numSampleRecords int64, -) { - const numRequests = 5 - generateProfilesTraffic(t, tracer, le, numRequests, wantError) - - // Inspection time! - gotSpanData := sr.Ended() - require.Len(t, gotSpanData, numRequests+1) - - parentSpan := gotSpanData[numRequests] - require.Equalf(t, fakeProfilesParentSpanName, parentSpan.Name(), "SpanData %v", parentSpan) - for _, sd := range gotSpanData[:numRequests] { - require.Equalf(t, parentSpan.SpanContext(), sd.Parent(), "Exporter span not a child\nSpanData %v", sd) - internal.CheckStatus(t, sd, wantError) - - sentSampleRecords := numSampleRecords - var failedToSendSampleRecords int64 - if wantError != nil { - sentSampleRecords = 0 - failedToSendSampleRecords = numSampleRecords - } - require.Containsf(t, sd.Attributes(), attribute.KeyValue{Key: internal.SentSamplesKey, Value: attribute.Int64Value(sentSampleRecords)}, "SpanData %v", sd) - require.Containsf(t, sd.Attributes(), attribute.KeyValue{Key: internal.FailedToSendSamplesKey, Value: attribute.Int64Value(failedToSendSampleRecords)}, "SpanData %v", sd) - } -} diff --git a/versions.yaml b/versions.yaml index dc027e80506..aba39c3b380 100644 --- a/versions.yaml +++ b/versions.yaml @@ -52,7 +52,6 @@ module-sets: - go.opentelemetry.io/collector/exporter - go.opentelemetry.io/collector/exporter/debugexporter - go.opentelemetry.io/collector/exporter/exporterprofiles - - go.opentelemetry.io/collector/exporter/exporterhelper/exporterhelperprofiles - go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper - go.opentelemetry.io/collector/exporter/exportertest - go.opentelemetry.io/collector/exporter/nopexporter