From 31b2f5cee2c1ce9dad6cd9587f8150a864eee8b8 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Tue, 21 Jun 2022 13:47:56 +0300 Subject: [PATCH] Move internal/otlptext to exporter/loggingexporter/internal, only usage (#5483) Signed-off-by: Bogdan Drutu --- .../loggingexporter/internal}/otlptext/databuffer.go | 2 +- .../loggingexporter/internal}/otlptext/databuffer_test.go | 0 .../loggingexporter/internal}/otlptext/logs.go | 4 ++-- .../loggingexporter/internal}/otlptext/logs_test.go | 0 .../loggingexporter/internal}/otlptext/metrics.go | 4 ++-- .../loggingexporter/internal}/otlptext/metrics_test.go | 0 .../loggingexporter/internal}/otlptext/traces.go | 4 ++-- .../loggingexporter/internal}/otlptext/traces_test.go | 0 exporter/loggingexporter/logging_exporter.go | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename {internal => exporter/loggingexporter/internal}/otlptext/databuffer.go (98%) rename {internal => exporter/loggingexporter/internal}/otlptext/databuffer_test.go (100%) rename {internal => exporter/loggingexporter/internal}/otlptext/logs.go (91%) rename {internal => exporter/loggingexporter/internal}/otlptext/logs_test.go (100%) rename {internal => exporter/loggingexporter/internal}/otlptext/metrics.go (89%) rename {internal => exporter/loggingexporter/internal}/otlptext/metrics_test.go (100%) rename {internal => exporter/loggingexporter/internal}/otlptext/traces.go (92%) rename {internal => exporter/loggingexporter/internal}/otlptext/traces_test.go (100%) diff --git a/internal/otlptext/databuffer.go b/exporter/loggingexporter/internal/otlptext/databuffer.go similarity index 98% rename from internal/otlptext/databuffer.go rename to exporter/loggingexporter/internal/otlptext/databuffer.go index f72ffd2c56f..237f9a30322 100644 --- a/internal/otlptext/databuffer.go +++ b/exporter/loggingexporter/internal/otlptext/databuffer.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlptext // import "go.opentelemetry.io/collector/internal/otlptext" +package otlptext // import "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" import ( "bytes" diff --git a/internal/otlptext/databuffer_test.go b/exporter/loggingexporter/internal/otlptext/databuffer_test.go similarity index 100% rename from internal/otlptext/databuffer_test.go rename to exporter/loggingexporter/internal/otlptext/databuffer_test.go diff --git a/internal/otlptext/logs.go b/exporter/loggingexporter/internal/otlptext/logs.go similarity index 91% rename from internal/otlptext/logs.go rename to exporter/loggingexporter/internal/otlptext/logs.go index 2c4dbeab147..9c12bb3101c 100644 --- a/internal/otlptext/logs.go +++ b/exporter/loggingexporter/internal/otlptext/logs.go @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlptext // import "go.opentelemetry.io/collector/internal/otlptext" +package otlptext // import "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" import ( "go.opentelemetry.io/collector/pdata/plog" ) -// NewTextLogsMarshaler returns a serializer.Marshaler to encode to OTLP text bytes. +// NewTextLogsMarshaler returns a plog.Marshaler to encode to OTLP text bytes. func NewTextLogsMarshaler() plog.Marshaler { return textLogsMarshaler{} } diff --git a/internal/otlptext/logs_test.go b/exporter/loggingexporter/internal/otlptext/logs_test.go similarity index 100% rename from internal/otlptext/logs_test.go rename to exporter/loggingexporter/internal/otlptext/logs_test.go diff --git a/internal/otlptext/metrics.go b/exporter/loggingexporter/internal/otlptext/metrics.go similarity index 89% rename from internal/otlptext/metrics.go rename to exporter/loggingexporter/internal/otlptext/metrics.go index 25a72ed1a03..6c7a4133764 100644 --- a/internal/otlptext/metrics.go +++ b/exporter/loggingexporter/internal/otlptext/metrics.go @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlptext // import "go.opentelemetry.io/collector/internal/otlptext" +package otlptext // import "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" import "go.opentelemetry.io/collector/pdata/pmetric" -// NewTextMetricsMarshaler returns a serializer.Marshaler to encode to OTLP text bytes. +// NewTextMetricsMarshaler returns a pmetric.Marshaler to encode to OTLP text bytes. func NewTextMetricsMarshaler() pmetric.Marshaler { return textMetricsMarshaler{} } diff --git a/internal/otlptext/metrics_test.go b/exporter/loggingexporter/internal/otlptext/metrics_test.go similarity index 100% rename from internal/otlptext/metrics_test.go rename to exporter/loggingexporter/internal/otlptext/metrics_test.go diff --git a/internal/otlptext/traces.go b/exporter/loggingexporter/internal/otlptext/traces.go similarity index 92% rename from internal/otlptext/traces.go rename to exporter/loggingexporter/internal/otlptext/traces.go index 10998d51461..4ad770765c3 100644 --- a/internal/otlptext/traces.go +++ b/exporter/loggingexporter/internal/otlptext/traces.go @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlptext // import "go.opentelemetry.io/collector/internal/otlptext" +package otlptext // import "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" import ( "go.opentelemetry.io/collector/pdata/ptrace" ) -// NewTextTracesMarshaler returns a serializer.Marshaler to encode to OTLP text bytes. +// NewTextTracesMarshaler returns a ptrace.Marshaler to encode to OTLP text bytes. func NewTextTracesMarshaler() ptrace.Marshaler { return textTracesMarshaler{} } diff --git a/internal/otlptext/traces_test.go b/exporter/loggingexporter/internal/otlptext/traces_test.go similarity index 100% rename from internal/otlptext/traces_test.go rename to exporter/loggingexporter/internal/otlptext/traces_test.go diff --git a/exporter/loggingexporter/logging_exporter.go b/exporter/loggingexporter/logging_exporter.go index 359994e9f13..0b066fd19ff 100644 --- a/exporter/loggingexporter/logging_exporter.go +++ b/exporter/loggingexporter/logging_exporter.go @@ -26,7 +26,7 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/exporter/exporterhelper" - "go.opentelemetry.io/collector/internal/otlptext" + "go.opentelemetry.io/collector/exporter/loggingexporter/internal/otlptext" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace"