diff --git a/.chloggen/profiles-consumertest.yaml b/.chloggen/profiles-consumertest.yaml new file mode 100644 index 00000000000..b211551f461 --- /dev/null +++ b/.chloggen/profiles-consumertest.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: consumer/consumertest + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Allow testing profiles with consumertest. + +# One or more tracking issues or pull requests related to the change +issues: [10692] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# 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/Makefile b/Makefile index 46b5cffb5dc..a89ad8e23f4 100644 --- a/Makefile +++ b/Makefile @@ -278,6 +278,8 @@ check-contrib: -replace go.opentelemetry.io/collector/connector=$(CURDIR)/connector \ -replace go.opentelemetry.io/collector/connector/forwardconnector=$(CURDIR)/connector/forwardconnector \ -replace go.opentelemetry.io/collector/consumer=$(CURDIR)/consumer \ + -replace go.opentelemetry.io/collector/consumer/consumerprofiles=$(CURDIR)/consumer/consumerprofiles \ + -replace go.opentelemetry.io/collector/consumer/consumertest=$(CURDIR)/consumer/consumertest \ -replace go.opentelemetry.io/collector/exporter=$(CURDIR)/exporter \ -replace go.opentelemetry.io/collector/exporter/debugexporter=$(CURDIR)/exporter/debugexporter \ -replace go.opentelemetry.io/collector/exporter/loggingexporter=$(CURDIR)/exporter/loggingexporter \ @@ -337,6 +339,8 @@ restore-contrib: -dropreplace go.opentelemetry.io/collector/connector \ -dropreplace go.opentelemetry.io/collector/connector/forwardconnector \ -dropreplace go.opentelemetry.io/collector/consumer \ + -dropreplace go.opentelemetry.io/collector/consumer/consumerprofiles \ + -dropreplace go.opentelemetry.io/collector/consumer/consumertest \ -dropreplace go.opentelemetry.io/collector/exporter \ -dropreplace go.opentelemetry.io/collector/exporter/debugexporter \ -dropreplace go.opentelemetry.io/collector/exporter/loggingexporter \ diff --git a/cmd/builder/internal/builder/main_test.go b/cmd/builder/internal/builder/main_test.go index d2c06279eb1..44e1b37513e 100644 --- a/cmd/builder/internal/builder/main_test.go +++ b/cmd/builder/internal/builder/main_test.go @@ -59,6 +59,8 @@ var ( "/confmap/provider/httpsprovider", "/confmap/provider/yamlprovider", "/consumer", + "/consumer/consumerprofiles", + "/consumer/consumertest", "/connector", "/exporter", "/exporter/debugexporter", diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 03311f9c3fe..1b2ba855916 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -38,6 +38,7 @@ replaces: - go.opentelemetry.io/collector/confmap/provider/httpsprovider => ${WORKSPACE_DIR}/confmap/provider/httpsprovider - go.opentelemetry.io/collector/confmap/provider/yamlprovider => ${WORKSPACE_DIR}/confmap/provider/yamlprovider - go.opentelemetry.io/collector/consumer => ${WORKSPACE_DIR}/consumer + - go.opentelemetry.io/collector/consumer/consumertest => ${WORKSPACE_DIR}/consumer/consumertest - go.opentelemetry.io/collector/connector => ${WORKSPACE_DIR}/connector - go.opentelemetry.io/collector/exporter => ${WORKSPACE_DIR}/exporter - go.opentelemetry.io/collector/exporter/debugexporter => ${WORKSPACE_DIR}/exporter/debugexporter diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index 61486b04514..2b5b1144b15 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -10,6 +10,7 @@ require ( go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/confmap/provider/fileprovider v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/filter v0.105.0 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/receiver v0.105.0 @@ -46,8 +47,10 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect @@ -93,3 +96,7 @@ retract ( replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index 5c9055848f0..e63f908086e 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -62,6 +62,8 @@ replaces: - go.opentelemetry.io/collector/confmap/provider/httpsprovider => ../../confmap/provider/httpsprovider - go.opentelemetry.io/collector/confmap/provider/yamlprovider => ../../confmap/provider/yamlprovider - go.opentelemetry.io/collector/consumer => ../../consumer + - go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + - go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest - go.opentelemetry.io/collector/connector => ../../connector - go.opentelemetry.io/collector/connector/forwardconnector => ../../connector/forwardconnector - go.opentelemetry.io/collector/exporter => ../../exporter diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index acda68e7df2..aa3bc0d100e 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -92,10 +92,13 @@ require ( go.opentelemetry.io/collector/config/configtls v1.12.0 // indirect go.opentelemetry.io/collector/config/internal v0.105.0 // indirect go.opentelemetry.io/collector/consumer v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/extension/auth v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect go.opentelemetry.io/collector/pdata v1.12.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/collector/semconv v0.105.0 // indirect go.opentelemetry.io/collector/service v0.105.0 // indirect go.opentelemetry.io/contrib/config v0.8.0 // indirect @@ -178,6 +181,10 @@ replace go.opentelemetry.io/collector/confmap/provider/yamlprovider => ../../con replace go.opentelemetry.io/collector/consumer => ../../consumer +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest + replace go.opentelemetry.io/collector/connector => ../../connector replace go.opentelemetry.io/collector/connector/forwardconnector => ../../connector/forwardconnector diff --git a/config/configgrpc/go.mod b/config/configgrpc/go.mod index 6db35d3bebc..99db60086ae 100644 --- a/config/configgrpc/go.mod +++ b/config/configgrpc/go.mod @@ -105,3 +105,7 @@ replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/config/confighttp/go.mod b/config/confighttp/go.mod index f8ea2713bef..ca5d8ac8b63 100644 --- a/config/confighttp/go.mod +++ b/config/confighttp/go.mod @@ -98,3 +98,7 @@ replace go.opentelemetry.io/collector/consumer => ../../consumer replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/config/internal/go.mod b/config/internal/go.mod index 048cc57e806..757d6fff8ff 100644 --- a/config/internal/go.mod +++ b/config/internal/go.mod @@ -37,3 +37,7 @@ replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index f42d7423b3a..2cfc1134b72 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -8,6 +8,7 @@ require ( go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/connector v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/pdata v1.12.0 go.uber.org/goleak v1.3.0 ) @@ -38,8 +39,10 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector v0.105.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -83,3 +86,7 @@ retract ( replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/connector/go.mod b/connector/go.mod index 877268cf09b..2894329f0ce 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -8,6 +8,7 @@ require ( go.opentelemetry.io/collector v0.105.0 go.opentelemetry.io/collector/component v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/pdata/testdata v0.105.0 go.uber.org/goleak v1.3.0 @@ -32,6 +33,7 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -67,3 +69,7 @@ replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest diff --git a/consumer/consumertest/Makefile b/consumer/consumertest/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/consumer/consumertest/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/consumer/consumertest/consumer.go b/consumer/consumertest/consumer.go index 147ed55c7ed..4b699b9449a 100644 --- a/consumer/consumertest/consumer.go +++ b/consumer/consumertest/consumer.go @@ -7,8 +7,10 @@ import ( "context" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumerprofiles" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" ) @@ -29,12 +31,16 @@ type Consumer interface { // ConsumeLogs to implement the consumer.Logs. ConsumeLogs(context.Context, plog.Logs) error + // ConsumeProfiles to implement the consumerprofiles.Profiles. + ConsumeProfiles(context.Context, pprofile.Profiles) error + unexported() } var _ consumer.Logs = (Consumer)(nil) var _ consumer.Metrics = (Consumer)(nil) var _ consumer.Traces = (Consumer)(nil) +var _ consumerprofiles.Profiles = (Consumer)(nil) type nonMutatingConsumer struct{} @@ -48,6 +54,7 @@ type baseConsumer struct { consumer.ConsumeTracesFunc consumer.ConsumeMetricsFunc consumer.ConsumeLogsFunc + consumerprofiles.ConsumeProfilesFunc } func (bc baseConsumer) unexported() {} diff --git a/consumer/consumertest/err.go b/consumer/consumertest/err.go index d147453aaf7..fdc54ae2452 100644 --- a/consumer/consumertest/err.go +++ b/consumer/consumertest/err.go @@ -7,14 +7,16 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" ) // NewErr returns a Consumer that just drops all received data and returns the specified error to Consume* callers. func NewErr(err error) Consumer { return &baseConsumer{ - ConsumeTracesFunc: func(context.Context, ptrace.Traces) error { return err }, - ConsumeMetricsFunc: func(context.Context, pmetric.Metrics) error { return err }, - ConsumeLogsFunc: func(context.Context, plog.Logs) error { return err }, + ConsumeTracesFunc: func(context.Context, ptrace.Traces) error { return err }, + ConsumeMetricsFunc: func(context.Context, pmetric.Metrics) error { return err }, + ConsumeLogsFunc: func(context.Context, plog.Logs) error { return err }, + ConsumeProfilesFunc: func(context.Context, pprofile.Profiles) error { return err }, } } diff --git a/consumer/consumertest/err_test.go b/consumer/consumertest/err_test.go index 692347becfb..3d88ecf18aa 100644 --- a/consumer/consumertest/err_test.go +++ b/consumer/consumertest/err_test.go @@ -13,6 +13,7 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" ) @@ -24,4 +25,5 @@ func TestErr(t *testing.T) { assert.Equal(t, err, ec.ConsumeLogs(context.Background(), plog.NewLogs())) assert.Equal(t, err, ec.ConsumeMetrics(context.Background(), pmetric.NewMetrics())) assert.Equal(t, err, ec.ConsumeTraces(context.Background(), ptrace.NewTraces())) + assert.Equal(t, err, ec.ConsumeProfiles(context.Background(), pprofile.NewProfiles())) } diff --git a/consumer/consumertest/go.mod b/consumer/consumertest/go.mod new file mode 100644 index 00000000000..24f5ecec4a0 --- /dev/null +++ b/consumer/consumertest/go.mod @@ -0,0 +1,40 @@ +module go.opentelemetry.io/collector/consumer/consumertest + +go 1.21.0 + +replace go.opentelemetry.io/collector/consumer => ../ + +require ( + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 + go.opentelemetry.io/collector/pdata v1.12.0 + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 + go.opentelemetry.io/collector/pdata/testdata v0.105.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gogo/protobuf v1.3.2 // 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.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/pdata => ../../pdata + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumerprofiles + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/consumer/consumertest/go.sum b/consumer/consumertest/go.sum new file mode 100644 index 00000000000..528166b78c0 --- /dev/null +++ b/consumer/consumertest/go.sum @@ -0,0 +1,77 @@ +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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +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/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.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.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= +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.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +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.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +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-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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/consumer/consumertest/nop.go b/consumer/consumertest/nop.go index fbb01e3bb98..25b898a7751 100644 --- a/consumer/consumertest/nop.go +++ b/consumer/consumertest/nop.go @@ -8,14 +8,16 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" ) // NewNop returns a Consumer that just drops all received data and returns no error. func NewNop() Consumer { return &baseConsumer{ - ConsumeTracesFunc: func(context.Context, ptrace.Traces) error { return nil }, - ConsumeMetricsFunc: func(context.Context, pmetric.Metrics) error { return nil }, - ConsumeLogsFunc: func(context.Context, plog.Logs) error { return nil }, + ConsumeTracesFunc: func(context.Context, ptrace.Traces) error { return nil }, + ConsumeMetricsFunc: func(context.Context, pmetric.Metrics) error { return nil }, + ConsumeLogsFunc: func(context.Context, plog.Logs) error { return nil }, + ConsumeProfilesFunc: func(context.Context, pprofile.Profiles) error { return nil }, } } diff --git a/consumer/consumertest/nop_test.go b/consumer/consumertest/nop_test.go index 21f4f90c9d6..21b9c43240a 100644 --- a/consumer/consumertest/nop_test.go +++ b/consumer/consumertest/nop_test.go @@ -12,6 +12,7 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" ) @@ -22,4 +23,5 @@ func TestNop(t *testing.T) { assert.NoError(t, nc.ConsumeLogs(context.Background(), plog.NewLogs())) assert.NoError(t, nc.ConsumeMetrics(context.Background(), pmetric.NewMetrics())) assert.NoError(t, nc.ConsumeTraces(context.Background(), ptrace.NewTraces())) + assert.NoError(t, nc.ConsumeProfiles(context.Background(), pprofile.NewProfiles())) } diff --git a/consumer/consumertest/sink.go b/consumer/consumertest/sink.go index be7195af18f..ec35e717ae0 100644 --- a/consumer/consumertest/sink.go +++ b/consumer/consumertest/sink.go @@ -8,8 +8,10 @@ import ( "sync" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumerprofiles" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" ) @@ -156,3 +158,41 @@ func (sle *LogsSink) Reset() { sle.logs = nil sle.logRecordCount = 0 } + +// ProfilesSink is a consumerprofiles.Profiles that acts like a sink that +// stores all profiles and allows querying them for testing. +type ProfilesSink struct { + nonMutatingConsumer + mu sync.Mutex + profiles []pprofile.Profiles +} + +var _ consumerprofiles.Profiles = (*ProfilesSink)(nil) + +// ConsumeProfiles stores profiles to this sink. +func (ste *ProfilesSink) ConsumeProfiles(_ context.Context, td pprofile.Profiles) error { + ste.mu.Lock() + defer ste.mu.Unlock() + + ste.profiles = append(ste.profiles, td) + + return nil +} + +// AllProfiles returns the profiles stored by this sink since last Reset. +func (ste *ProfilesSink) AllProfiles() []pprofile.Profiles { + ste.mu.Lock() + defer ste.mu.Unlock() + + copyProfiles := make([]pprofile.Profiles, len(ste.profiles)) + copy(copyProfiles, ste.profiles) + return copyProfiles +} + +// Reset deletes any stored data. +func (ste *ProfilesSink) Reset() { + ste.mu.Lock() + defer ste.mu.Unlock() + + ste.profiles = nil +} diff --git a/consumer/consumertest/sink_test.go b/consumer/consumertest/sink_test.go index bd29ebc6aef..3c813cf2f71 100644 --- a/consumer/consumertest/sink_test.go +++ b/consumer/consumertest/sink_test.go @@ -12,6 +12,7 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/testdata" ) @@ -60,3 +61,16 @@ func TestLogsSink(t *testing.T) { assert.Equal(t, 0, len(sink.AllLogs())) assert.Equal(t, 0, sink.LogRecordCount()) } + +func TestProfilesSink(t *testing.T) { + sink := new(ProfilesSink) + td := testdata.GenerateProfiles(1) + want := make([]pprofile.Profiles, 0, 7) + for i := 0; i < 7; i++ { + require.NoError(t, sink.ConsumeProfiles(context.Background(), td)) + want = append(want, td) + } + assert.Equal(t, want, sink.AllProfiles()) + sink.Reset() + assert.Equal(t, 0, len(sink.AllProfiles())) +} diff --git a/exporter/debugexporter/go.mod b/exporter/debugexporter/go.mod index 959b20a8763..dbc075c7e7d 100644 --- a/exporter/debugexporter/go.mod +++ b/exporter/debugexporter/go.mod @@ -42,6 +42,8 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector v0.105.0 // indirect go.opentelemetry.io/collector/config/configretry v1.12.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/extension v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect @@ -90,3 +92,7 @@ replace go.opentelemetry.io/collector/extension => ../../extension replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/exporter/go.mod b/exporter/go.mod index 26f7e2514de..cc015d170b5 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -11,6 +11,7 @@ require ( go.opentelemetry.io/collector/config/configretry v1.12.0 go.opentelemetry.io/collector/config/configtelemetry v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/extension v0.105.0 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/pdata/testdata v0.105.0 @@ -51,6 +52,7 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/confmap v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect @@ -89,3 +91,7 @@ retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module replace go.opentelemetry.io/collector/config/configretry => ../config/configretry replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index b4d7de699d1..161c690c456 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -42,9 +42,12 @@ require ( go.opentelemetry.io/collector v0.105.0 // indirect go.opentelemetry.io/collector/config/configretry v1.12.0 // indirect go.opentelemetry.io/collector/consumer v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/extension v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/collector/receiver v0.105.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -94,3 +97,7 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/exporter/nopexporter/go.mod b/exporter/nopexporter/go.mod index 757e0eb0719..96ef2deccf2 100644 --- a/exporter/nopexporter/go.mod +++ b/exporter/nopexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.105.0 go.opentelemetry.io/collector/confmap v0.105.0 - go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/exporter v0.105.0 go.opentelemetry.io/collector/pdata v1.12.0 go.uber.org/goleak v1.3.0 @@ -37,8 +37,11 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect + go.opentelemetry.io/collector/consumer v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/collector/receiver v0.105.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect @@ -84,3 +87,7 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con replace go.opentelemetry.io/collector/extension => ../../extension replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index f837c8b0065..b34cadf9638 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -57,6 +57,8 @@ require ( go.opentelemetry.io/collector/config/confignet v0.105.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect go.opentelemetry.io/collector/config/internal v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/extension v0.105.0 // indirect go.opentelemetry.io/collector/extension/auth v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect @@ -138,3 +140,7 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 59ba2cc3c42..d604ae0949b 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -56,10 +56,13 @@ require ( go.opentelemetry.io/collector/config/configauth v0.105.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect go.opentelemetry.io/collector/config/internal v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/extension v0.105.0 // indirect go.opentelemetry.io/collector/extension/auth v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/collector/receiver v0.105.0 // indirect go.opentelemetry.io/contrib/config v0.8.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect @@ -134,3 +137,7 @@ retract ( replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index 15a7d2d51d7..054f7cd7c10 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -87,3 +87,7 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/extension/memorylimiterextension/go.mod b/extension/memorylimiterextension/go.mod index df7cf0f39b5..09baf6c125f 100644 --- a/extension/memorylimiterextension/go.mod +++ b/extension/memorylimiterextension/go.mod @@ -81,3 +81,7 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 3e9a20d71ed..08d18b0c05e 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -122,3 +122,7 @@ replace go.opentelemetry.io/collector/config/confighttp => ../../config/confight replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/go.mod b/go.mod index d440896095b..5d40205df66 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( go.opentelemetry.io/collector/component v0.105.0 go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/featuregate v1.12.0 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/pdata/testdata v0.105.0 @@ -59,6 +60,7 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect @@ -95,6 +97,10 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ./config/configt replace go.opentelemetry.io/collector/consumer => ./consumer +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ./consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ./consumer/consumertest + replace go.opentelemetry.io/collector/featuregate => ./featuregate replace go.opentelemetry.io/collector/pdata => ./pdata diff --git a/internal/e2e/go.mod b/internal/e2e/go.mod index 5792d76c2d0..2a992bf6cd0 100644 --- a/internal/e2e/go.mod +++ b/internal/e2e/go.mod @@ -13,6 +13,7 @@ require ( go.opentelemetry.io/collector/config/configtls v1.12.0 go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/exporter v0.105.0 go.opentelemetry.io/collector/exporter/otlpexporter v0.105.0 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.105.0 @@ -60,6 +61,7 @@ require ( go.opentelemetry.io/collector/config/confignet v0.105.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect go.opentelemetry.io/collector/config/internal v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/extension v0.105.0 // indirect go.opentelemetry.io/collector/extension/auth v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect @@ -148,3 +150,7 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry replace go.opentelemetry.io/collector/internal/globalgates => ../globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/otelcol/go.mod b/otelcol/go.mod index f43a028057a..3507c660530 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -65,6 +65,8 @@ require ( go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector v0.105.0 // indirect go.opentelemetry.io/collector/consumer v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/pdata v1.12.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.105.0 // indirect @@ -148,3 +150,7 @@ replace go.opentelemetry.io/collector/config/configtls => ../config/configtls replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest diff --git a/otelcol/otelcoltest/go.mod b/otelcol/otelcoltest/go.mod index 17bccd9fe24..5eede494de7 100644 --- a/otelcol/otelcoltest/go.mod +++ b/otelcol/otelcoltest/go.mod @@ -63,6 +63,8 @@ require ( go.opentelemetry.io/collector v0.105.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect go.opentelemetry.io/collector/consumer v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect go.opentelemetry.io/collector/pdata v1.12.0 // indirect @@ -166,3 +168,7 @@ replace go.opentelemetry.io/collector/semconv => ../../semconv replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index b50acb84105..f8c94a922ce 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -9,6 +9,7 @@ require ( go.opentelemetry.io/collector/config/configtelemetry v0.105.0 go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/pdata/testdata v0.105.0 go.opentelemetry.io/collector/processor v0.105.0 @@ -44,6 +45,7 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect @@ -85,3 +87,7 @@ retract ( replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/processor/go.mod b/processor/go.mod index 4cdcb9b6e2f..2ccfdbddfb6 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -9,6 +9,7 @@ require ( go.opentelemetry.io/collector/component v0.105.0 go.opentelemetry.io/collector/config/configtelemetry v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/pdata/testdata v0.105.0 go.opentelemetry.io/otel v1.28.0 @@ -35,6 +36,7 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect @@ -67,3 +69,7 @@ replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 4e83df6e363..b5f3b7a205a 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -8,6 +8,7 @@ require ( go.opentelemetry.io/collector/component v0.105.0 go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/processor v0.105.0 go.uber.org/goleak v1.3.0 @@ -45,6 +46,7 @@ require ( github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect @@ -92,3 +94,7 @@ retract ( replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/receiver/go.mod b/receiver/go.mod index 544ed727f44..297bf27bb15 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -9,6 +9,7 @@ require ( go.opentelemetry.io/collector/component v0.105.0 go.opentelemetry.io/collector/config/configtelemetry v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/otel v1.28.0 go.opentelemetry.io/otel/metric v1.28.0 @@ -36,6 +37,8 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sys v0.21.0 // indirect @@ -67,3 +70,7 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../config/config replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest diff --git a/receiver/nopreceiver/go.mod b/receiver/nopreceiver/go.mod index 8b5eb3f3d4d..1d4e6d240de 100644 --- a/receiver/nopreceiver/go.mod +++ b/receiver/nopreceiver/go.mod @@ -7,6 +7,7 @@ require ( go.opentelemetry.io/collector/component v0.105.0 go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/receiver v0.105.0 go.uber.org/goleak v1.3.0 ) @@ -36,9 +37,11 @@ require ( github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect go.opentelemetry.io/collector/internal/globalgates v0.105.0 // indirect go.opentelemetry.io/collector/pdata v1.12.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -77,3 +80,7 @@ replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/glo replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index 69356d7bf91..79f50b82229 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -14,6 +14,7 @@ require ( go.opentelemetry.io/collector/config/configtls v1.12.0 go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/pdata v1.12.0 go.opentelemetry.io/collector/pdata/testdata v0.105.0 go.opentelemetry.io/collector/receiver v0.105.0 @@ -59,6 +60,7 @@ require ( go.opentelemetry.io/collector/config/configopaque v1.12.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect go.opentelemetry.io/collector/config/internal v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/extension v0.105.0 // indirect go.opentelemetry.io/collector/extension/auth v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.12.0 // indirect @@ -138,3 +140,7 @@ retract ( replace go.opentelemetry.io/collector/pdata/pprofile => ../../pdata/pprofile replace go.opentelemetry.io/collector/internal/globalgates => ../../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../../consumer/consumertest diff --git a/service/go.mod b/service/go.mod index f7c8bec2693..61e892d1190 100644 --- a/service/go.mod +++ b/service/go.mod @@ -17,6 +17,7 @@ require ( go.opentelemetry.io/collector/confmap v0.105.0 go.opentelemetry.io/collector/connector v0.105.0 go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/consumer/consumertest v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/exporter v0.105.0 go.opentelemetry.io/collector/extension v0.105.0 go.opentelemetry.io/collector/extension/zpagesextension v0.105.0 @@ -85,6 +86,7 @@ require ( go.opentelemetry.io/collector/config/configopaque v1.12.0 // indirect go.opentelemetry.io/collector/config/configtls v1.12.0 // indirect go.opentelemetry.io/collector/config/internal v0.105.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.105.0 // indirect go.opentelemetry.io/collector/extension/auth v0.105.0 // indirect go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect @@ -156,3 +158,7 @@ replace go.opentelemetry.io/collector/config/configcompression => ../config/conf replace go.opentelemetry.io/collector/pdata/pprofile => ../pdata/pprofile replace go.opentelemetry.io/collector/internal/globalgates => ../internal/globalgates + +replace go.opentelemetry.io/collector/consumer/consumerprofiles => ../consumer/consumerprofiles + +replace go.opentelemetry.io/collector/consumer/consumertest => ../consumer/consumertest diff --git a/versions.yaml b/versions.yaml index 4f6073a32f0..7ee33e71b7b 100644 --- a/versions.yaml +++ b/versions.yaml @@ -37,6 +37,7 @@ module-sets: - go.opentelemetry.io/collector/connector/forwardconnector - go.opentelemetry.io/collector/consumer - go.opentelemetry.io/collector/consumer/consumerprofiles + - go.opentelemetry.io/collector/consumer/consumertest - go.opentelemetry.io/collector/exporter - go.opentelemetry.io/collector/exporter/debugexporter - go.opentelemetry.io/collector/exporter/loggingexporter