From 3acff6cea5a7b1527e2725146b2e33abaf69378c Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Tue, 29 Jun 2021 06:46:01 -0700 Subject: [PATCH] Move internal data wrappers to model/internal (#3514) Signed-off-by: Bogdan Drutu --- {internal => model/internal}/otlp_wrapper.go | 0 {internal => model/internal}/otlp_wrappers_test.go | 0 model/otlp/json_marshaler.go | 2 +- model/otlp/json_unmarshaler.go | 2 +- model/otlp/pb_marshaler.go | 2 +- model/otlp/pb_unmarshaler.go | 2 +- model/otlpgrpc/logs.go | 2 +- model/otlpgrpc/metrics.go | 2 +- model/otlpgrpc/traces.go | 2 +- model/pdata/logs.go | 2 +- model/pdata/logs_test.go | 2 +- model/pdata/metrics.go | 2 +- model/pdata/metrics_test.go | 2 +- model/pdata/traces.go | 2 +- model/pdata/traces_test.go | 2 +- 15 files changed, 13 insertions(+), 13 deletions(-) rename {internal => model/internal}/otlp_wrapper.go (100%) rename {internal => model/internal}/otlp_wrappers_test.go (100%) diff --git a/internal/otlp_wrapper.go b/model/internal/otlp_wrapper.go similarity index 100% rename from internal/otlp_wrapper.go rename to model/internal/otlp_wrapper.go diff --git a/internal/otlp_wrappers_test.go b/model/internal/otlp_wrappers_test.go similarity index 100% rename from internal/otlp_wrappers_test.go rename to model/internal/otlp_wrappers_test.go diff --git a/model/otlp/json_marshaler.go b/model/otlp/json_marshaler.go index 79df6e0d3d5..6744304f4e8 100644 --- a/model/otlp/json_marshaler.go +++ b/model/otlp/json_marshaler.go @@ -19,7 +19,7 @@ import ( "github.com/gogo/protobuf/jsonpb" - "go.opentelemetry.io/collector/internal" + "go.opentelemetry.io/collector/model/internal" "go.opentelemetry.io/collector/model/pdata" ) diff --git a/model/otlp/json_unmarshaler.go b/model/otlp/json_unmarshaler.go index a4cd4c02572..79a11fb7a89 100644 --- a/model/otlp/json_unmarshaler.go +++ b/model/otlp/json_unmarshaler.go @@ -19,10 +19,10 @@ import ( "github.com/gogo/protobuf/jsonpb" - "go.opentelemetry.io/collector/internal" otlpcollectorlogs "go.opentelemetry.io/collector/internal/data/protogen/collector/logs/v1" otlpcollectormetrics "go.opentelemetry.io/collector/internal/data/protogen/collector/metrics/v1" otlpcollectortrace "go.opentelemetry.io/collector/internal/data/protogen/collector/trace/v1" + "go.opentelemetry.io/collector/model/internal" "go.opentelemetry.io/collector/model/pdata" ) diff --git a/model/otlp/pb_marshaler.go b/model/otlp/pb_marshaler.go index 843480634da..73740861a57 100644 --- a/model/otlp/pb_marshaler.go +++ b/model/otlp/pb_marshaler.go @@ -15,7 +15,7 @@ package otlp import ( - "go.opentelemetry.io/collector/internal" + "go.opentelemetry.io/collector/model/internal" "go.opentelemetry.io/collector/model/pdata" ) diff --git a/model/otlp/pb_unmarshaler.go b/model/otlp/pb_unmarshaler.go index b1ac853b62f..f92cb14cebd 100644 --- a/model/otlp/pb_unmarshaler.go +++ b/model/otlp/pb_unmarshaler.go @@ -15,10 +15,10 @@ package otlp import ( - "go.opentelemetry.io/collector/internal" otlpcollectorlogs "go.opentelemetry.io/collector/internal/data/protogen/collector/logs/v1" otlpcollectormetrics "go.opentelemetry.io/collector/internal/data/protogen/collector/metrics/v1" otlpcollectortrace "go.opentelemetry.io/collector/internal/data/protogen/collector/trace/v1" + "go.opentelemetry.io/collector/model/internal" "go.opentelemetry.io/collector/model/pdata" ) diff --git a/model/otlpgrpc/logs.go b/model/otlpgrpc/logs.go index 2822c2de3f5..e80ba57a4fd 100644 --- a/model/otlpgrpc/logs.go +++ b/model/otlpgrpc/logs.go @@ -19,8 +19,8 @@ import ( "google.golang.org/grpc" - "go.opentelemetry.io/collector/internal" otlpcollectorlogs "go.opentelemetry.io/collector/internal/data/protogen/collector/logs/v1" + "go.opentelemetry.io/collector/model/internal" "go.opentelemetry.io/collector/model/pdata" ) diff --git a/model/otlpgrpc/metrics.go b/model/otlpgrpc/metrics.go index d9d7798ca4b..84097a6f555 100644 --- a/model/otlpgrpc/metrics.go +++ b/model/otlpgrpc/metrics.go @@ -19,8 +19,8 @@ import ( "google.golang.org/grpc" - "go.opentelemetry.io/collector/internal" otlpcollectormetrics "go.opentelemetry.io/collector/internal/data/protogen/collector/metrics/v1" + "go.opentelemetry.io/collector/model/internal" "go.opentelemetry.io/collector/model/pdata" ) diff --git a/model/otlpgrpc/traces.go b/model/otlpgrpc/traces.go index a793f7b8a47..4b497d605e8 100644 --- a/model/otlpgrpc/traces.go +++ b/model/otlpgrpc/traces.go @@ -19,8 +19,8 @@ import ( "google.golang.org/grpc" - "go.opentelemetry.io/collector/internal" otlpcollectortraces "go.opentelemetry.io/collector/internal/data/protogen/collector/trace/v1" + "go.opentelemetry.io/collector/model/internal" "go.opentelemetry.io/collector/model/pdata" ) diff --git a/model/pdata/logs.go b/model/pdata/logs.go index 35831d72631..0a2b1813280 100644 --- a/model/pdata/logs.go +++ b/model/pdata/logs.go @@ -15,9 +15,9 @@ package pdata import ( - "go.opentelemetry.io/collector/internal" otlpcollectorlog "go.opentelemetry.io/collector/internal/data/protogen/collector/logs/v1" otlplogs "go.opentelemetry.io/collector/internal/data/protogen/logs/v1" + "go.opentelemetry.io/collector/model/internal" ) // LogsMarshaler marshals pdata.Logs into bytes. diff --git a/model/pdata/logs_test.go b/model/pdata/logs_test.go index 4a79fcc26d6..e6d22087e5c 100644 --- a/model/pdata/logs_test.go +++ b/model/pdata/logs_test.go @@ -20,9 +20,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/internal" otlpcollectorlog "go.opentelemetry.io/collector/internal/data/protogen/collector/logs/v1" otlplogs "go.opentelemetry.io/collector/internal/data/protogen/logs/v1" + "go.opentelemetry.io/collector/model/internal" ) func TestLogRecordCount(t *testing.T) { diff --git a/model/pdata/metrics.go b/model/pdata/metrics.go index 971393a7d03..5611a9c2b46 100644 --- a/model/pdata/metrics.go +++ b/model/pdata/metrics.go @@ -15,9 +15,9 @@ package pdata import ( - "go.opentelemetry.io/collector/internal" otlpcollectormetrics "go.opentelemetry.io/collector/internal/data/protogen/collector/metrics/v1" otlpmetrics "go.opentelemetry.io/collector/internal/data/protogen/metrics/v1" + "go.opentelemetry.io/collector/model/internal" ) // MetricsMarshaler marshals pdata.Metrics into bytes. diff --git a/model/pdata/metrics_test.go b/model/pdata/metrics_test.go index 477b0fbfa97..af097f0db44 100644 --- a/model/pdata/metrics_test.go +++ b/model/pdata/metrics_test.go @@ -23,11 +23,11 @@ import ( goproto "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" - "go.opentelemetry.io/collector/internal" otlpcollectormetrics "go.opentelemetry.io/collector/internal/data/protogen/collector/metrics/v1" otlpcommon "go.opentelemetry.io/collector/internal/data/protogen/common/v1" otlpmetrics "go.opentelemetry.io/collector/internal/data/protogen/metrics/v1" otlpresource "go.opentelemetry.io/collector/internal/data/protogen/resource/v1" + "go.opentelemetry.io/collector/model/internal" ) const ( diff --git a/model/pdata/traces.go b/model/pdata/traces.go index 06429b8c7be..e753058df8e 100644 --- a/model/pdata/traces.go +++ b/model/pdata/traces.go @@ -15,9 +15,9 @@ package pdata import ( - "go.opentelemetry.io/collector/internal" otlpcollectortrace "go.opentelemetry.io/collector/internal/data/protogen/collector/trace/v1" otlptrace "go.opentelemetry.io/collector/internal/data/protogen/trace/v1" + "go.opentelemetry.io/collector/model/internal" ) // TracesMarshaler marshals pdata.Traces into bytes. diff --git a/model/pdata/traces_test.go b/model/pdata/traces_test.go index 07edb15e2fc..92eae5a8cd7 100644 --- a/model/pdata/traces_test.go +++ b/model/pdata/traces_test.go @@ -23,9 +23,9 @@ import ( goproto "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" - "go.opentelemetry.io/collector/internal" otlpcollectortrace "go.opentelemetry.io/collector/internal/data/protogen/collector/trace/v1" otlptrace "go.opentelemetry.io/collector/internal/data/protogen/trace/v1" + "go.opentelemetry.io/collector/model/internal" ) func TestSpanCount(t *testing.T) {