From c389bb2df9d667b6710f587e601b30d6ecf4cba9 Mon Sep 17 00:00:00 2001 From: Joshua MacDonald Date: Fri, 19 Jul 2024 07:24:24 -0700 Subject: [PATCH] Use internal/otelarrow in receiver/otelarrowreceiver (#34138) **Description:** Removes external dependencies. **Link to tracking Issue:** #33567 --- cmd/otelcontribcol/go.mod | 1 - cmd/otelcontribcol/go.sum | 2 - exporter/otelarrowexporter/go.mod | 2 + internal/otelarrow/go.mod | 4 +- internal/otelarrow/go.sum | 2 - receiver/otelarrowreceiver/config.go | 3 +- receiver/otelarrowreceiver/factory.go | 38 +++++++++++-------- receiver/otelarrowreceiver/factory_test.go | 3 +- receiver/otelarrowreceiver/go.mod | 11 +++++- receiver/otelarrowreceiver/go.sum | 6 +-- .../otelarrowreceiver/internal/arrow/arrow.go | 4 +- .../internal/arrow/arrow_test.go | 6 +-- .../internal/logs/otlp_test.go | 3 +- .../internal/metrics/otlp_test.go | 3 +- .../internal/trace/otlp_test.go | 3 +- receiver/otelarrowreceiver/otelarrow.go | 6 +-- receiver/otelarrowreceiver/otelarrow_test.go | 4 +- 17 files changed, 59 insertions(+), 42 deletions(-) diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index 567c91813b85..851bc13d371b 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -659,7 +659,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.105.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.105.0 // indirect github.com/open-telemetry/otel-arrow v0.24.0 // indirect - github.com/open-telemetry/otel-arrow/collector v0.24.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.13 // indirect diff --git a/cmd/otelcontribcol/go.sum b/cmd/otelcontribcol/go.sum index bd4499161f12..31d2bb05f591 100644 --- a/cmd/otelcontribcol/go.sum +++ b/cmd/otelcontribcol/go.sum @@ -1970,8 +1970,6 @@ github.com/open-telemetry/opamp-go v0.15.0 h1:X2TWhEsGQ8GP7Uos3Ic9v/1aFUqoECZXKS github.com/open-telemetry/opamp-go v0.15.0/go.mod h1:QyPeN56JXlcZt5yG5RMdZ50Ju+zMFs1Ihy/hwHyF8Oo= github.com/open-telemetry/otel-arrow v0.24.0 h1:hNUEbwHW/1gEOUiN+HoI+ITiXe2vSBaPWlE9FRwJwDE= github.com/open-telemetry/otel-arrow v0.24.0/go.mod h1:uzoHixEh6CUBZkP+vkRvyiHYUnYsAOUwCcfByQkSMM0= -github.com/open-telemetry/otel-arrow/collector v0.24.0 h1:NYTcgtwG0lQnoGcEomTTtueZxzk03xt+XEXN4L5kqHA= -github.com/open-telemetry/otel-arrow/collector v0.24.0/go.mod h1:+jJ3Vfhh685hXSw2Z1P1wl/rTqEKlSaJ4FocZI+xs+0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= diff --git a/exporter/otelarrowexporter/go.mod b/exporter/otelarrowexporter/go.mod index 33231cdb37e4..d2fca532f6dd 100644 --- a/exporter/otelarrowexporter/go.mod +++ b/exporter/otelarrowexporter/go.mod @@ -96,3 +96,5 @@ require ( replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow => ../../internal/otelarrow replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver => ../../receiver/otelarrowreceiver + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent => ../../internal/sharedcomponent diff --git a/internal/otelarrow/go.mod b/internal/otelarrow/go.mod index 57a4af11a118..df86f293e6d2 100644 --- a/internal/otelarrow/go.mod +++ b/internal/otelarrow/go.mod @@ -60,7 +60,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/open-telemetry/otel-arrow/collector v0.24.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.105.0 // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.1 // indirect @@ -101,3 +101,5 @@ require ( replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver => ../../receiver/otelarrowreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter => ../../exporter/otelarrowexporter + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent => ../sharedcomponent diff --git a/internal/otelarrow/go.sum b/internal/otelarrow/go.sum index b96f4c624d3a..ade97f28a719 100644 --- a/internal/otelarrow/go.sum +++ b/internal/otelarrow/go.sum @@ -95,8 +95,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/open-telemetry/otel-arrow v0.24.0 h1:hNUEbwHW/1gEOUiN+HoI+ITiXe2vSBaPWlE9FRwJwDE= github.com/open-telemetry/otel-arrow v0.24.0/go.mod h1:uzoHixEh6CUBZkP+vkRvyiHYUnYsAOUwCcfByQkSMM0= -github.com/open-telemetry/otel-arrow/collector v0.24.0 h1:NYTcgtwG0lQnoGcEomTTtueZxzk03xt+XEXN4L5kqHA= -github.com/open-telemetry/otel-arrow/collector v0.24.0/go.mod h1:+jJ3Vfhh685hXSw2Z1P1wl/rTqEKlSaJ4FocZI+xs+0= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/receiver/otelarrowreceiver/config.go b/receiver/otelarrowreceiver/config.go index 8361c0ba7bc8..cc2d47c929cb 100644 --- a/receiver/otelarrowreceiver/config.go +++ b/receiver/otelarrowreceiver/config.go @@ -6,9 +6,10 @@ package otelarrowreceiver // import "github.com/open-telemetry/opentelemetry-col import ( "fmt" - "github.com/open-telemetry/otel-arrow/collector/compression/zstd" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/compression/zstd" ) // Protocols is the configuration for the supported protocols. diff --git a/receiver/otelarrowreceiver/factory.go b/receiver/otelarrowreceiver/factory.go index 48279d76cc3a..9c4c57dcab60 100644 --- a/receiver/otelarrowreceiver/factory.go +++ b/receiver/otelarrowreceiver/factory.go @@ -6,13 +6,13 @@ package otelarrowreceiver // import "github.com/open-telemetry/opentelemetry-col import ( "context" - "github.com/open-telemetry/otel-arrow/collector/sharedcomponent" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/metadata" ) @@ -63,15 +63,18 @@ func createTraces( nextConsumer consumer.Traces, ) (receiver.Traces, error) { oCfg := cfg.(*Config) - r, err := receivers.GetOrAdd(oCfg, func() (*otelArrowReceiver, error) { - return newOTelArrowReceiver(oCfg, set) + var err error + recv := receivers.GetOrAdd(oCfg, func() component.Component { + var recv *otelArrowReceiver + recv, err = newOTelArrowReceiver(oCfg, set) + return recv }) if err != nil { return nil, err } - r.Unwrap().registerTraceConsumer(nextConsumer) - return r, nil + recv.Unwrap().(*otelArrowReceiver).registerTraceConsumer(nextConsumer) + return recv, nil } // createMetrics creates a metrics receiver based on provided config. @@ -82,15 +85,17 @@ func createMetrics( consumer consumer.Metrics, ) (receiver.Metrics, error) { oCfg := cfg.(*Config) - r, err := receivers.GetOrAdd(oCfg, func() (*otelArrowReceiver, error) { - return newOTelArrowReceiver(oCfg, set) + var err error + recv := receivers.GetOrAdd(oCfg, func() component.Component { + var recv *otelArrowReceiver + recv, err = newOTelArrowReceiver(oCfg, set) + return recv }) if err != nil { return nil, err } - - r.Unwrap().registerMetricsConsumer(consumer) - return r, nil + recv.Unwrap().(*otelArrowReceiver).registerMetricsConsumer(consumer) + return recv, nil } // createLog creates a log receiver based on provided config. @@ -101,15 +106,18 @@ func createLog( consumer consumer.Logs, ) (receiver.Logs, error) { oCfg := cfg.(*Config) - r, err := receivers.GetOrAdd(oCfg, func() (*otelArrowReceiver, error) { - return newOTelArrowReceiver(oCfg, set) + var err error + recv := receivers.GetOrAdd(oCfg, func() component.Component { + var recv *otelArrowReceiver + recv, err = newOTelArrowReceiver(oCfg, set) + return recv }) if err != nil { return nil, err } - r.Unwrap().registerLogsConsumer(consumer) - return r, nil + recv.Unwrap().(*otelArrowReceiver).registerLogsConsumer(consumer) + return recv, nil } // This is the map of already created OTel-Arrow receivers for particular configurations. @@ -118,4 +126,4 @@ func createLog( // create separate objects, they must use one otelArrowReceiver object per configuration. // When the receiver is shutdown it should be removed from this map so the same configuration // can be recreated successfully. -var receivers = sharedcomponent.NewSharedComponents[*Config, *otelArrowReceiver]() +var receivers = sharedcomponent.NewSharedComponents() diff --git a/receiver/otelarrowreceiver/factory_test.go b/receiver/otelarrowreceiver/factory_test.go index 77724b5ad5f6..85cf9f9b6cc4 100644 --- a/receiver/otelarrowreceiver/factory_test.go +++ b/receiver/otelarrowreceiver/factory_test.go @@ -7,7 +7,6 @@ import ( "context" "testing" - "github.com/open-telemetry/otel-arrow/collector/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" @@ -16,6 +15,8 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/receiver/receivertest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/testutil" ) func TestCreateDefaultConfig(t *testing.T) { diff --git a/receiver/otelarrowreceiver/go.mod b/receiver/otelarrowreceiver/go.mod index 35b780022eb8..dcdcaa62fff4 100644 --- a/receiver/otelarrowreceiver/go.mod +++ b/receiver/otelarrowreceiver/go.mod @@ -3,8 +3,9 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelar go 1.21.0 require ( + github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow v0.105.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.105.0 github.com/open-telemetry/otel-arrow v0.24.0 - github.com/open-telemetry/otel-arrow/collector v0.24.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector v0.105.1-0.20240717163034-43ed6184f9fe go.opentelemetry.io/collector/component v0.105.1-0.20240717163034-43ed6184f9fe @@ -53,7 +54,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect @@ -94,3 +95,9 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow => ../../internal/otelarrow + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent => ../../internal/sharedcomponent + +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter => ../../exporter/otelarrowexporter diff --git a/receiver/otelarrowreceiver/go.sum b/receiver/otelarrowreceiver/go.sum index 5c1d0e87ce83..c95f1860b932 100644 --- a/receiver/otelarrowreceiver/go.sum +++ b/receiver/otelarrowreceiver/go.sum @@ -59,8 +59,8 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= 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/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= @@ -93,8 +93,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/open-telemetry/otel-arrow v0.24.0 h1:hNUEbwHW/1gEOUiN+HoI+ITiXe2vSBaPWlE9FRwJwDE= github.com/open-telemetry/otel-arrow v0.24.0/go.mod h1:uzoHixEh6CUBZkP+vkRvyiHYUnYsAOUwCcfByQkSMM0= -github.com/open-telemetry/otel-arrow/collector v0.24.0 h1:NYTcgtwG0lQnoGcEomTTtueZxzk03xt+XEXN4L5kqHA= -github.com/open-telemetry/otel-arrow/collector v0.24.0/go.mod h1:+jJ3Vfhh685hXSw2Z1P1wl/rTqEKlSaJ4FocZI+xs+0= github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/receiver/otelarrowreceiver/internal/arrow/arrow.go b/receiver/otelarrowreceiver/internal/arrow/arrow.go index 222b9eaa36a3..aa3974a37e7f 100644 --- a/receiver/otelarrowreceiver/internal/arrow/arrow.go +++ b/receiver/otelarrowreceiver/internal/arrow/arrow.go @@ -16,8 +16,6 @@ import ( "sync/atomic" arrowpb "github.com/open-telemetry/otel-arrow/api/experimental/arrow/v1" - "github.com/open-telemetry/otel-arrow/collector/admission" - "github.com/open-telemetry/otel-arrow/collector/netstats" arrowRecord "github.com/open-telemetry/otel-arrow/pkg/otel/arrow_record" "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/component" @@ -43,6 +41,8 @@ import ( "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/admission" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/netstats" internalmetadata "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/metadata" ) diff --git a/receiver/otelarrowreceiver/internal/arrow/arrow_test.go b/receiver/otelarrowreceiver/internal/arrow/arrow_test.go index a8a856ed93e1..4ffc6f569ac3 100644 --- a/receiver/otelarrowreceiver/internal/arrow/arrow_test.go +++ b/receiver/otelarrowreceiver/internal/arrow/arrow_test.go @@ -17,9 +17,6 @@ import ( arrowpb "github.com/open-telemetry/otel-arrow/api/experimental/arrow/v1" arrowCollectorMock "github.com/open-telemetry/otel-arrow/api/experimental/arrow/v1/mock" - "github.com/open-telemetry/otel-arrow/collector/admission" - "github.com/open-telemetry/otel-arrow/collector/netstats" - "github.com/open-telemetry/otel-arrow/collector/testdata" arrowRecord "github.com/open-telemetry/otel-arrow/pkg/otel/arrow_record" arrowRecordMock "github.com/open-telemetry/otel-arrow/pkg/otel/arrow_record/mock" otelAssert "github.com/open-telemetry/otel-arrow/pkg/otel/assert" @@ -46,6 +43,9 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/admission" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/netstats" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/testdata" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/arrow/mock" ) diff --git a/receiver/otelarrowreceiver/internal/logs/otlp_test.go b/receiver/otelarrowreceiver/internal/logs/otlp_test.go index 618beb283b5a..8c00b1c78f17 100644 --- a/receiver/otelarrowreceiver/internal/logs/otlp_test.go +++ b/receiver/otelarrowreceiver/internal/logs/otlp_test.go @@ -9,7 +9,6 @@ import ( "net" "testing" - "github.com/open-telemetry/otel-arrow/collector/testdata" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" @@ -20,6 +19,8 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/testdata" ) func TestExport(t *testing.T) { diff --git a/receiver/otelarrowreceiver/internal/metrics/otlp_test.go b/receiver/otelarrowreceiver/internal/metrics/otlp_test.go index 22a188971ff7..71c4f939d813 100644 --- a/receiver/otelarrowreceiver/internal/metrics/otlp_test.go +++ b/receiver/otelarrowreceiver/internal/metrics/otlp_test.go @@ -9,7 +9,6 @@ import ( "net" "testing" - "github.com/open-telemetry/otel-arrow/collector/testdata" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" @@ -20,6 +19,8 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/testdata" ) func TestExport(t *testing.T) { diff --git a/receiver/otelarrowreceiver/internal/trace/otlp_test.go b/receiver/otelarrowreceiver/internal/trace/otlp_test.go index e23c2bae56e1..2ce1929e875a 100644 --- a/receiver/otelarrowreceiver/internal/trace/otlp_test.go +++ b/receiver/otelarrowreceiver/internal/trace/otlp_test.go @@ -9,7 +9,6 @@ import ( "net" "testing" - "github.com/open-telemetry/otel-arrow/collector/testdata" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" @@ -20,6 +19,8 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/testdata" ) func TestExport(t *testing.T) { diff --git a/receiver/otelarrowreceiver/otelarrow.go b/receiver/otelarrowreceiver/otelarrow.go index 709f0d3180aa..cae423112df3 100644 --- a/receiver/otelarrowreceiver/otelarrow.go +++ b/receiver/otelarrowreceiver/otelarrow.go @@ -9,9 +9,6 @@ import ( "sync" arrowpb "github.com/open-telemetry/otel-arrow/api/experimental/arrow/v1" - "github.com/open-telemetry/otel-arrow/collector/admission" - "github.com/open-telemetry/otel-arrow/collector/compression/zstd" - "github.com/open-telemetry/otel-arrow/collector/netstats" arrowRecord "github.com/open-telemetry/otel-arrow/pkg/otel/arrow_record" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" @@ -25,6 +22,9 @@ import ( "go.uber.org/zap" "google.golang.org/grpc" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/admission" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/compression/zstd" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/netstats" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/arrow" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/logs" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/metrics" diff --git a/receiver/otelarrowreceiver/otelarrow_test.go b/receiver/otelarrowreceiver/otelarrow_test.go index a71f4c56714b..93fda3799146 100644 --- a/receiver/otelarrowreceiver/otelarrow_test.go +++ b/receiver/otelarrowreceiver/otelarrow_test.go @@ -15,8 +15,6 @@ import ( "time" arrowpb "github.com/open-telemetry/otel-arrow/api/experimental/arrow/v1" - "github.com/open-telemetry/otel-arrow/collector/testdata" - "github.com/open-telemetry/otel-arrow/collector/testutil" arrowRecord "github.com/open-telemetry/otel-arrow/pkg/otel/arrow_record" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -47,6 +45,8 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/testdata" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/testutil" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/arrow/mock" componentMetadata "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/metadata" )