diff --git a/.chloggen/codeboten_cleanup-gomod.yaml b/.chloggen/codeboten_cleanup-gomod.yaml new file mode 100644 index 00000000000..d7bdadb49ef --- /dev/null +++ b/.chloggen/codeboten_cleanup-gomod.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: deprecation + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: internal/testdata + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: move internal/testdata to pdata/testdata + +# One or more tracking issues or pull requests related to the change +issues: [9886] + +# (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: This reduces dependencies from the consumer package while making testdata available across repos. It will allow us to remove duplicated code and its a fairly small surface area. + +# 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/cmd/builder/internal/builder/main_test.go b/cmd/builder/internal/builder/main_test.go index beac8cef5c7..8635baf41a1 100644 --- a/cmd/builder/internal/builder/main_test.go +++ b/cmd/builder/internal/builder/main_test.go @@ -85,6 +85,7 @@ func TestGenerateAndCompile(t *testing.T) { fmt.Sprintf("go.opentelemetry.io/collector/receiver/otlpreceiver => %s/receiver/otlpreceiver", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/otelcol => %s/otelcol", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/pdata => %s/pdata", workspaceDir), + fmt.Sprintf("go.opentelemetry.io/collector/pdata/testdata => %s/pdata/testdata", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/semconv => %s/semconv", workspaceDir), fmt.Sprintf("go.opentelemetry.io/collector/service => %s/service", workspaceDir), } diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 0f4fe8e9df4..fb4e60c10a0 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -48,6 +48,7 @@ replaces: - go.opentelemetry.io/collector/featuregate => ${WORKSPACE_DIR}/featuregate - go.opentelemetry.io/collector/otelcol => ${WORKSPACE_DIR}/otelcol - go.opentelemetry.io/collector/pdata => ${WORKSPACE_DIR}/pdata + - go.opentelemetry.io/collector/pdata/testdata => ${WORKSPACE_DIR}/pdata/testdata - go.opentelemetry.io/collector/processor => ${WORKSPACE_DIR}/processor - go.opentelemetry.io/collector/receiver => ${WORKSPACE_DIR}/receiver - go.opentelemetry.io/collector/receiver/otlpreceiver => ${WORKSPACE_DIR}/receiver/otlpreceiver diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index e868995994c..d94bfb7ce1b 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -64,6 +64,8 @@ replace go.opentelemetry.io/collector/confmap/provider/fileprovider => ../../con replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector/semconv => ../../semconv diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index b41a6eeb20a..91e667bbcb0 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -61,6 +61,7 @@ replaces: - go.opentelemetry.io/collector/extension/zpagesextension => ../../extension/zpagesextension - go.opentelemetry.io/collector/featuregate => ../../featuregate - go.opentelemetry.io/collector/pdata => ../../pdata + - go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata - go.opentelemetry.io/collector/processor => ../../processor - go.opentelemetry.io/collector/receiver => ../../receiver - go.opentelemetry.io/collector/receiver/nopreceiver => ../../receiver/nopreceiver diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index abe1ca210c8..75d16107c97 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -204,6 +204,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/processor => ../../processor replace go.opentelemetry.io/collector/receiver => ../../receiver diff --git a/config/configgrpc/configgrpc_benchmark_test.go b/config/configgrpc/configgrpc_benchmark_test.go index d1fc95f772b..1ad755f2b4f 100644 --- a/config/configgrpc/configgrpc_benchmark_test.go +++ b/config/configgrpc/configgrpc_benchmark_test.go @@ -16,10 +16,10 @@ import ( "google.golang.org/grpc/encoding/gzip" "google.golang.org/grpc/status" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func BenchmarkCompressors(b *testing.B) { diff --git a/config/configgrpc/go.mod b/config/configgrpc/go.mod index 953e3b6d521..6c76c2eccb1 100644 --- a/config/configgrpc/go.mod +++ b/config/configgrpc/go.mod @@ -15,6 +15,7 @@ require ( go.opentelemetry.io/collector/config/internal v0.97.0 go.opentelemetry.io/collector/extension/auth v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 go.opentelemetry.io/otel v1.24.0 go.uber.org/goleak v1.3.0 @@ -92,6 +93,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/config/confighttp/go.mod b/config/confighttp/go.mod index 79bb0402d89..e69c0b1fc69 100644 --- a/config/confighttp/go.mod +++ b/config/confighttp/go.mod @@ -90,3 +90,5 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/consumer => ../../consumer + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/config/internal/go.mod b/config/internal/go.mod index ea86a9a5207..414c575d4f8 100644 --- a/config/internal/go.mod +++ b/config/internal/go.mod @@ -31,3 +31,5 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/consumer => ../../consumer replace go.opentelemetry.io/collector/component => ../../component + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index e51c3eca8b0..af85449e096 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -62,6 +62,8 @@ replace go.opentelemetry.io/collector/connector => ../ replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/connector/go.mod b/connector/go.mod index 3f4214fe48e..7903632c3cb 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -9,6 +9,7 @@ require ( go.opentelemetry.io/collector/component v0.97.0 go.opentelemetry.io/collector/consumer v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 @@ -66,3 +67,5 @@ replace go.opentelemetry.io/collector/consumer => ../consumer replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata + +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata diff --git a/connector/logs_router_test.go b/connector/logs_router_test.go index accce0a03cd..a4074762ac1 100644 --- a/connector/logs_router_test.go +++ b/connector/logs_router_test.go @@ -14,8 +14,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) type mutatingLogsSink struct { diff --git a/connector/metrics_router_test.go b/connector/metrics_router_test.go index 62dd54c11e0..c3fe824992a 100644 --- a/connector/metrics_router_test.go +++ b/connector/metrics_router_test.go @@ -14,8 +14,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) type mutatingMetricsSink struct { diff --git a/connector/traces_router_test.go b/connector/traces_router_test.go index 33a2124ed3e..8c93b10528a 100644 --- a/connector/traces_router_test.go +++ b/connector/traces_router_test.go @@ -14,8 +14,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) type mutatingTracesSink struct { diff --git a/consumer/consumererror/signalerrors_test.go b/consumer/consumererror/signalerrors_test.go index 141db20202c..475d3173bb9 100644 --- a/consumer/consumererror/signalerrors_test.go +++ b/consumer/consumererror/signalerrors_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestTraces(t *testing.T) { diff --git a/consumer/consumertest/sink_test.go b/consumer/consumertest/sink_test.go index 24c1f6fac8b..bd29ebc6aef 100644 --- a/consumer/consumertest/sink_test.go +++ b/consumer/consumertest/sink_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestTracesSink(t *testing.T) { diff --git a/consumer/go.mod b/consumer/go.mod index e304cc0c4e5..17b06716402 100644 --- a/consumer/go.mod +++ b/consumer/go.mod @@ -4,8 +4,8 @@ go 1.21 require ( github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.uber.org/goleak v1.3.0 ) @@ -28,19 +28,11 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace go.opentelemetry.io/collector => ../ - -replace go.opentelemetry.io/collector/component => ../component - -replace go.opentelemetry.io/collector/confmap => ../confmap - -replace go.opentelemetry.io/collector/featuregate => ../featuregate - replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + retract ( v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 v0.69.0 // Release failed, use v0.69.1 ) - -replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry diff --git a/exporter/debugexporter/go.mod b/exporter/debugexporter/go.mod index 434ac1d962c..276754fc04a 100644 --- a/exporter/debugexporter/go.mod +++ b/exporter/debugexporter/go.mod @@ -72,6 +72,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector/extension => ../../extension diff --git a/exporter/exporterhelper/logs_batch_test.go b/exporter/exporterhelper/logs_batch_test.go index 701d1794a85..72255ff551e 100644 --- a/exporter/exporterhelper/logs_batch_test.go +++ b/exporter/exporterhelper/logs_batch_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/exporter/exporterbatcher" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestMergeLogs(t *testing.T) { diff --git a/exporter/exporterhelper/logs_test.go b/exporter/exporterhelper/logs_test.go index e42af577b2c..827a383e279 100644 --- a/exporter/exporterhelper/logs_test.go +++ b/exporter/exporterhelper/logs_test.go @@ -28,8 +28,8 @@ import ( "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) const ( diff --git a/exporter/exporterhelper/metrics_batch_test.go b/exporter/exporterhelper/metrics_batch_test.go index 704ed409a87..9a5bc9815a9 100644 --- a/exporter/exporterhelper/metrics_batch_test.go +++ b/exporter/exporterhelper/metrics_batch_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/exporter/exporterbatcher" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestMergeMetrics(t *testing.T) { diff --git a/exporter/exporterhelper/metrics_test.go b/exporter/exporterhelper/metrics_test.go index ddbefeb71f2..6ae88c4feaf 100644 --- a/exporter/exporterhelper/metrics_test.go +++ b/exporter/exporterhelper/metrics_test.go @@ -28,8 +28,8 @@ import ( "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) const ( diff --git a/exporter/exporterhelper/retry_sender_test.go b/exporter/exporterhelper/retry_sender_test.go index 96b4904f372..d3863097326 100644 --- a/exporter/exporterhelper/retry_sender_test.go +++ b/exporter/exporterhelper/retry_sender_test.go @@ -22,7 +22,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/exporter/exporterqueue" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func mockRequestUnmarshaler(mr Request) exporterqueue.Unmarshaler[Request] { diff --git a/exporter/exporterhelper/traces_batch_test.go b/exporter/exporterhelper/traces_batch_test.go index 9e89bb6c6e8..5779b731b63 100644 --- a/exporter/exporterhelper/traces_batch_test.go +++ b/exporter/exporterhelper/traces_batch_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/exporter/exporterbatcher" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestMergeTraces(t *testing.T) { diff --git a/exporter/exporterhelper/traces_test.go b/exporter/exporterhelper/traces_test.go index 0c8bec25f5f..42810bc8bb1 100644 --- a/exporter/exporterhelper/traces_test.go +++ b/exporter/exporterhelper/traces_test.go @@ -28,8 +28,8 @@ import ( "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) const ( diff --git a/exporter/go.mod b/exporter/go.mod index f17085c3d1e..455db6c63a2 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -13,6 +13,7 @@ require ( go.opentelemetry.io/collector/consumer v0.97.0 go.opentelemetry.io/collector/extension v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/receiver v0.97.0 go.opentelemetry.io/otel v1.24.0 go.opentelemetry.io/otel/metric v1.24.0 @@ -71,6 +72,8 @@ replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../receiver retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module diff --git a/exporter/internal/common/logging_exporter_test.go b/exporter/internal/common/logging_exporter_test.go index e087b52cd1a..763f649daba 100644 --- a/exporter/internal/common/logging_exporter_test.go +++ b/exporter/internal/common/logging_exporter_test.go @@ -13,10 +13,10 @@ import ( "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestLoggingTracesExporterNoErrors(t *testing.T) { diff --git a/exporter/internal/otlptext/logs_test.go b/exporter/internal/otlptext/logs_test.go index 1055c30d2d2..a1d15676d1a 100644 --- a/exporter/internal/otlptext/logs_test.go +++ b/exporter/internal/otlptext/logs_test.go @@ -13,9 +13,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestLogsText(t *testing.T) { diff --git a/exporter/internal/otlptext/metrics_test.go b/exporter/internal/otlptext/metrics_test.go index 989b65b399e..b2772b17953 100644 --- a/exporter/internal/otlptext/metrics_test.go +++ b/exporter/internal/otlptext/metrics_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestMetricsText(t *testing.T) { diff --git a/exporter/internal/otlptext/traces_test.go b/exporter/internal/otlptext/traces_test.go index f3a7fdad6ab..2c4b69280a1 100644 --- a/exporter/internal/otlptext/traces_test.go +++ b/exporter/internal/otlptext/traces_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestTracesText(t *testing.T) { diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index d6248293eea..3b4f060c1b9 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -75,6 +75,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver retract ( diff --git a/exporter/nopexporter/go.mod b/exporter/nopexporter/go.mod index a860b9fbc29..4a643e3c045 100644 --- a/exporter/nopexporter/go.mod +++ b/exporter/nopexporter/go.mod @@ -63,6 +63,8 @@ replace go.opentelemetry.io/collector/exporter => ../ replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/config/configretry => ../../config/configretry replace go.opentelemetry.io/collector/receiver => ../../receiver diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index b97f36c0001..729aa9fbd0b 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -16,6 +16,7 @@ require ( go.opentelemetry.io/collector/consumer v0.97.0 go.opentelemetry.io/collector/exporter v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/otel/metric v1.24.0 go.opentelemetry.io/otel/trace v1.24.0 go.uber.org/goleak v1.3.0 @@ -111,6 +112,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/exporter/otlpexporter/otlp_test.go b/exporter/otlpexporter/otlp_test.go index d1c4f622bc0..345c9cbf645 100644 --- a/exporter/otlpexporter/otlp_test.go +++ b/exporter/otlpexporter/otlp_test.go @@ -31,13 +31,13 @@ import ( "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/plog/plogotlp" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/pdata/testdata" ) type mockReceiver struct { diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 3fbfeb1e9ca..4bd49efffc7 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -111,6 +111,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../../receiver replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index e384177a69e..a966e8e8f98 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -78,3 +78,5 @@ retract ( ) replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/extension/memorylimiterextension/go.mod b/extension/memorylimiterextension/go.mod index 6a7a9d37855..bad93ee5038 100644 --- a/extension/memorylimiterextension/go.mod +++ b/extension/memorylimiterextension/go.mod @@ -71,3 +71,5 @@ replace go.opentelemetry.io/collector/pdata => ../../pdata replace go.opentelemetry.io/collector/consumer => ../../consumer replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 466a0c32352..0628c0e069a 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -83,3 +83,5 @@ retract ( ) replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata diff --git a/go.mod b/go.mod index 64349186dbc..1353fe0d401 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( go.opentelemetry.io/collector/consumer v0.97.0 go.opentelemetry.io/collector/featuregate v1.4.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/contrib/config v0.4.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 @@ -81,6 +82,8 @@ replace go.opentelemetry.io/collector/featuregate => ./featuregate replace go.opentelemetry.io/collector/pdata => ./pdata +replace go.opentelemetry.io/collector/pdata/testdata => ./pdata/testdata + retract ( v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module, use v0.76.1 v0.69.0 // Release failed, use v0.69.1 diff --git a/internal/e2e/go.mod b/internal/e2e/go.mod index b3567e45b55..7d14557717f 100644 --- a/internal/e2e/go.mod +++ b/internal/e2e/go.mod @@ -15,6 +15,7 @@ require ( go.opentelemetry.io/collector/exporter/otlpexporter v0.97.0 go.opentelemetry.io/collector/exporter/otlphttpexporter v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/receiver v0.97.0 go.opentelemetry.io/collector/receiver/otlpreceiver v0.97.0 go.uber.org/goleak v1.3.0 @@ -116,6 +117,8 @@ replace go.opentelemetry.io/collector/exporter/otlphttpexporter => ../../exporte replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/consumer => ../../consumer replace go.opentelemetry.io/collector/receiver/otlpreceiver => ../../receiver/otlpreceiver diff --git a/internal/e2e/otlphttp_test.go b/internal/e2e/otlphttp_test.go index 59627ab4b17..b173dcf59d7 100644 --- a/internal/e2e/otlphttp_test.go +++ b/internal/e2e/otlphttp_test.go @@ -28,10 +28,10 @@ import ( "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/exporter/otlphttpexporter" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/internal/testutil" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/otlpreceiver" "go.opentelemetry.io/collector/receiver/receivertest" ) diff --git a/internal/fanoutconsumer/logs_test.go b/internal/fanoutconsumer/logs_test.go index 8c247cb1232..c1b91a7a4e8 100644 --- a/internal/fanoutconsumer/logs_test.go +++ b/internal/fanoutconsumer/logs_test.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestLogsNotMultiplexing(t *testing.T) { diff --git a/internal/fanoutconsumer/metrics_test.go b/internal/fanoutconsumer/metrics_test.go index efb39ec552a..51e00791a76 100644 --- a/internal/fanoutconsumer/metrics_test.go +++ b/internal/fanoutconsumer/metrics_test.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestMetricsNotMultiplexing(t *testing.T) { diff --git a/internal/fanoutconsumer/traces_test.go b/internal/fanoutconsumer/traces_test.go index 120c6524715..829e4cd9069 100644 --- a/internal/fanoutconsumer/traces_test.go +++ b/internal/fanoutconsumer/traces_test.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestTracesNotMultiplexing(t *testing.T) { diff --git a/internal/testdata/deprecated.go b/internal/testdata/deprecated.go new file mode 100644 index 00000000000..717de656ff9 --- /dev/null +++ b/internal/testdata/deprecated.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package testdata + +import ( + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + ptestdata "go.opentelemetry.io/collector/pdata/testdata" +) + +const ( + TestGaugeDoubleMetricName = ptestdata.TestGaugeDoubleMetricName + TestGaugeIntMetricName = ptestdata.TestGaugeIntMetricName + TestSumDoubleMetricName = ptestdata.TestSumDoubleMetricName + TestSumIntMetricName = ptestdata.TestSumIntMetricName + TestHistogramMetricName = ptestdata.TestHistogramMetricName + TestExponentialHistogramMetricName = ptestdata.TestExponentialHistogramMetricName + TestSummaryMetricName = ptestdata.TestSummaryMetricName +) + +// Deprecated: [v0.98.0] use pdata/testdata.GenerateMetricsAllTypesEmpty instead. +func GenerateMetricsAllTypesEmpty() pmetric.Metrics { + return ptestdata.GenerateMetricsAllTypesEmpty() +} + +// Deprecated: [v0.98.0] use pdata/testdata.GenerateMetricsMetricTypeInvalid instead. +func GenerateMetricsMetricTypeInvalid() pmetric.Metrics { + return ptestdata.GenerateMetricsMetricTypeInvalid() +} + +// Deprecated: [v0.98.0] use pdata/testdata.GenerateMetricsAllTypes instead. +func GenerateMetricsAllTypes() pmetric.Metrics { + return ptestdata.GenerateMetricsAllTypes() +} + +// Deprecated: [v0.98.0] use pdata/testdata.GenerateMetrics instead. +func GenerateMetrics(count int) pmetric.Metrics { + return ptestdata.GenerateMetrics(count) +} + +// Deprecated: [v0.98.0] use pdata/testdata.GenerateLogs instead. +func GenerateLogs(count int) plog.Logs { + return ptestdata.GenerateLogs(count) +} + +// Deprecated: [v0.98.0] use pdata/testdata.GenerateTraces instead. +func GenerateTraces(spanCount int) ptrace.Traces { + return ptestdata.GenerateTraces(count) +} diff --git a/otelcol/go.mod b/otelcol/go.mod index f77d33d6323..069622e52b1 100644 --- a/otelcol/go.mod +++ b/otelcol/go.mod @@ -71,6 +71,7 @@ require ( go.opentelemetry.io/collector v0.97.0 // indirect go.opentelemetry.io/collector/consumer v0.97.0 // indirect go.opentelemetry.io/collector/pdata v1.4.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/semconv v0.97.0 // indirect go.opentelemetry.io/contrib/config v0.4.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.24.0 // indirect @@ -107,6 +108,8 @@ replace go.opentelemetry.io/collector/component => ../component replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension replace go.opentelemetry.io/collector/extension => ../extension diff --git a/pdata/testdata/Makefile b/pdata/testdata/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/pdata/testdata/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/internal/testdata/common.go b/pdata/testdata/common.go similarity index 100% rename from internal/testdata/common.go rename to pdata/testdata/common.go diff --git a/pdata/testdata/go.mod b/pdata/testdata/go.mod new file mode 100644 index 00000000000..cddac6a7127 --- /dev/null +++ b/pdata/testdata/go.mod @@ -0,0 +1,22 @@ +module go.opentelemetry.io/collector/pdata/testdata + +go 1.21 + +require go.opentelemetry.io/collector/pdata v1.4.0 + +require ( + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // 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 + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.23.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect +) + +replace go.opentelemetry.io/collector/pdata => ../ diff --git a/pdata/testdata/go.sum b/pdata/testdata/go.sum new file mode 100644 index 00000000000..f5761c88106 --- /dev/null +++ b/pdata/testdata/go.sum @@ -0,0 +1,74 @@ +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/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +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/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/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.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +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.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.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.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.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-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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/internal/testdata/log.go b/pdata/testdata/log.go similarity index 100% rename from internal/testdata/log.go rename to pdata/testdata/log.go diff --git a/internal/testdata/metric.go b/pdata/testdata/metric.go similarity index 100% rename from internal/testdata/metric.go rename to pdata/testdata/metric.go diff --git a/internal/testdata/resource.go b/pdata/testdata/resource.go similarity index 100% rename from internal/testdata/resource.go rename to pdata/testdata/resource.go diff --git a/internal/testdata/trace.go b/pdata/testdata/trace.go similarity index 100% rename from internal/testdata/trace.go rename to pdata/testdata/trace.go diff --git a/processor/batchprocessor/batch_processor_test.go b/processor/batchprocessor/batch_processor_test.go index a3a618c0f3e..6e8033fb387 100644 --- a/processor/batchprocessor/batch_processor_test.go +++ b/processor/batchprocessor/batch_processor_test.go @@ -20,10 +20,10 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/processor/processortest" ) diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index da50481a3f5..01f4ffa4dbe 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -13,6 +13,7 @@ require ( go.opentelemetry.io/collector/confmap v0.97.0 go.opentelemetry.io/collector/consumer v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/processor v0.97.0 go.opentelemetry.io/otel v1.24.0 go.opentelemetry.io/otel/exporters/prometheus v0.46.0 @@ -66,6 +67,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( diff --git a/processor/batchprocessor/splitlogs_test.go b/processor/batchprocessor/splitlogs_test.go index d112cd1069e..74ac51c8521 100644 --- a/processor/batchprocessor/splitlogs_test.go +++ b/processor/batchprocessor/splitlogs_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestSplitLogs_noop(t *testing.T) { diff --git a/processor/batchprocessor/splitmetrics_test.go b/processor/batchprocessor/splitmetrics_test.go index e81cc73b5db..fd40ec8f9fb 100644 --- a/processor/batchprocessor/splitmetrics_test.go +++ b/processor/batchprocessor/splitmetrics_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestSplitMetrics_noop(t *testing.T) { diff --git a/processor/batchprocessor/splittraces_test.go b/processor/batchprocessor/splittraces_test.go index 5316aab66a2..62d8b1e0e4d 100644 --- a/processor/batchprocessor/splittraces_test.go +++ b/processor/batchprocessor/splittraces_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestSplitTraces_noop(t *testing.T) { diff --git a/processor/go.mod b/processor/go.mod index 16a7ca60a37..1cdfbdde117 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -10,6 +10,7 @@ require ( go.opentelemetry.io/collector/config/configtelemetry v0.97.0 go.opentelemetry.io/collector/consumer v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/otel v1.24.0 go.opentelemetry.io/otel/metric v1.24.0 go.opentelemetry.io/otel/trace v1.24.0 @@ -65,4 +66,6 @@ replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 296e3cb98ad..50191f19c12 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -46,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.97.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.46.0 // indirect go.opentelemetry.io/otel/sdk v1.24.0 // indirect @@ -73,6 +74,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/consumer => ../../consumer retract ( diff --git a/processor/processortest/shutdown_verifier.go b/processor/processortest/shutdown_verifier.go index e0c3becac24..1048fe7b712 100644 --- a/processor/processortest/shutdown_verifier.go +++ b/processor/processortest/shutdown_verifier.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/processor" ) diff --git a/receiver/go.mod b/receiver/go.mod index 2d56f16a416..99d6ecc692a 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -65,6 +65,8 @@ replace go.opentelemetry.io/collector/featuregate => ../featuregate replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module replace go.opentelemetry.io/collector/config/configtelemetry => ../config/configtelemetry diff --git a/receiver/nopreceiver/go.mod b/receiver/nopreceiver/go.mod index ab5a5d88d74..99de794db4f 100644 --- a/receiver/nopreceiver/go.mod +++ b/receiver/nopreceiver/go.mod @@ -64,6 +64,8 @@ replace go.opentelemetry.io/collector/receiver => ../ replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry replace go.opentelemetry.io/collector => ../.. diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index 7692d6ec677..b3008183a8b 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -15,6 +15,7 @@ require ( go.opentelemetry.io/collector/confmap v0.97.0 go.opentelemetry.io/collector/consumer v0.97.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/receiver v0.97.0 go.opentelemetry.io/otel/metric v1.24.0 go.opentelemetry.io/otel/trace v1.24.0 @@ -115,6 +116,8 @@ replace go.opentelemetry.io/collector/featuregate => ../../featuregate replace go.opentelemetry.io/collector/pdata => ../../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../../pdata/testdata + replace go.opentelemetry.io/collector/receiver => ../ replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/receiver/otlpreceiver/internal/logs/otlp_test.go b/receiver/otlpreceiver/internal/logs/otlp_test.go index b2d3178d011..9ac76ac115a 100644 --- a/receiver/otlpreceiver/internal/logs/otlp_test.go +++ b/receiver/otlpreceiver/internal/logs/otlp_test.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog/plogotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/receivertest" ) diff --git a/receiver/otlpreceiver/internal/metrics/otlp_test.go b/receiver/otlpreceiver/internal/metrics/otlp_test.go index babc366119f..06bbd2412d3 100644 --- a/receiver/otlpreceiver/internal/metrics/otlp_test.go +++ b/receiver/otlpreceiver/internal/metrics/otlp_test.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/receivertest" ) diff --git a/receiver/otlpreceiver/internal/trace/otlp_test.go b/receiver/otlpreceiver/internal/trace/otlp_test.go index 58bfc61f4fc..beef2c6d594 100644 --- a/receiver/otlpreceiver/internal/trace/otlp_test.go +++ b/receiver/otlpreceiver/internal/trace/otlp_test.go @@ -20,8 +20,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receiverhelper" "go.opentelemetry.io/collector/receiver/receivertest" ) diff --git a/receiver/otlpreceiver/otlp_test.go b/receiver/otlpreceiver/otlp_test.go index 246b641dc28..5e0c073680e 100644 --- a/receiver/otlpreceiver/otlp_test.go +++ b/receiver/otlpreceiver/otlp_test.go @@ -37,12 +37,12 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumererror" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/internal/testutil" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/receiver/receivertest" ) diff --git a/service/go.mod b/service/go.mod index b3820f23344..5189816b22a 100644 --- a/service/go.mod +++ b/service/go.mod @@ -22,6 +22,7 @@ require ( go.opentelemetry.io/collector/extension/zpagesextension v0.97.0 go.opentelemetry.io/collector/featuregate v1.4.0 go.opentelemetry.io/collector/pdata v1.4.0 + go.opentelemetry.io/collector/pdata/testdata v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/processor v0.97.0 go.opentelemetry.io/collector/receiver v0.97.0 go.opentelemetry.io/collector/semconv v0.97.0 @@ -97,6 +98,8 @@ replace go.opentelemetry.io/collector/component => ../component replace go.opentelemetry.io/collector/pdata => ../pdata +replace go.opentelemetry.io/collector/pdata/testdata => ../pdata/testdata + replace go.opentelemetry.io/collector/extension/zpagesextension => ../extension/zpagesextension replace go.opentelemetry.io/collector/extension => ../extension diff --git a/service/internal/capabilityconsumer/capabilities_test.go b/service/internal/capabilityconsumer/capabilities_test.go index 73ce2b577a0..69e9f17249f 100644 --- a/service/internal/capabilityconsumer/capabilities_test.go +++ b/service/internal/capabilityconsumer/capabilities_test.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestLogs(t *testing.T) { diff --git a/service/internal/graph/graph_test.go b/service/internal/graph/graph_test.go index 9ae936b5d05..eddd3098153 100644 --- a/service/internal/graph/graph_test.go +++ b/service/internal/graph/graph_test.go @@ -23,7 +23,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" "go.opentelemetry.io/collector/receiver" diff --git a/service/internal/testcomponents/example_connector.go b/service/internal/testcomponents/example_connector.go index 75c5145cf7b..a521389cf80 100644 --- a/service/internal/testcomponents/example_connector.go +++ b/service/internal/testcomponents/example_connector.go @@ -9,10 +9,10 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/internal/testdata" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/testdata" ) var connType = component.MustNewType("exampleconnector") diff --git a/service/internal/testcomponents/example_router_test.go b/service/internal/testcomponents/example_router_test.go index 23f94854b2a..2f44e04902d 100644 --- a/service/internal/testcomponents/example_router_test.go +++ b/service/internal/testcomponents/example_router_test.go @@ -15,7 +15,7 @@ import ( "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/internal/testdata" + "go.opentelemetry.io/collector/pdata/testdata" ) func TestExampleRouter(t *testing.T) { diff --git a/versions.yaml b/versions.yaml index 09175e0f05a..210df6328b3 100644 --- a/versions.yaml +++ b/versions.yaml @@ -46,6 +46,7 @@ module-sets: - go.opentelemetry.io/collector/extension/zpagesextension - go.opentelemetry.io/collector/extension/memorylimiterextension - go.opentelemetry.io/collector/otelcol + - go.opentelemetry.io/collector/pdata/testdata - go.opentelemetry.io/collector/processor - go.opentelemetry.io/collector/processor/batchprocessor - go.opentelemetry.io/collector/processor/memorylimiterprocessor