From 3939180aaad024329d4e004a70f202c5b26a13c8 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:57:11 -0600 Subject: [PATCH] Add warning to logging exporter --- exporter/loggingexporter/factory.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/exporter/loggingexporter/factory.go b/exporter/loggingexporter/factory.go index 54f68e5bb74..c19d7e16ac6 100644 --- a/exporter/loggingexporter/factory.go +++ b/exporter/loggingexporter/factory.go @@ -44,6 +44,7 @@ func createDefaultConfig() component.Config { } func createTracesExporter(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Traces, error) { + set.TelemetrySettings.Logger.Warn("The logging exporter is DEPRECATED and will be REMOVED in v0.111.0. Use the debug exporter instead: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter") cfg := config.(*Config) return common.CreateTracesExporter(ctx, set, config, &common.Common{ Verbosity: cfg.Verbosity, @@ -55,6 +56,7 @@ func createTracesExporter(ctx context.Context, set exporter.Settings, config com } func createMetricsExporter(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Metrics, error) { + set.TelemetrySettings.Logger.Warn("The logging exporter is DEPRECATED and will be REMOVED in v0.111.0. Use the debug exporter instead: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter") cfg := config.(*Config) return common.CreateMetricsExporter(ctx, set, config, &common.Common{ Verbosity: cfg.Verbosity, @@ -66,6 +68,7 @@ func createMetricsExporter(ctx context.Context, set exporter.Settings, config co } func createLogsExporter(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Logs, error) { + set.TelemetrySettings.Logger.Warn("The logging exporter is DEPRECATED and will be REMOVED in v0.111.0. Use the debug exporter instead: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/debugexporter") cfg := config.(*Config) return common.CreateLogsExporter(ctx, set, config, &common.Common{ Verbosity: cfg.Verbosity,