From 631df9879808c14732f16a317736f4120697e6c0 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:08:23 -0600 Subject: [PATCH] [exporter/logging] Add warning to logging exporter (#11050) #### Description Add warning to logging exporter on startup to remind users to switch to the debug exporter. #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/pull/11037 #### Testing ![image](https://github.com/user-attachments/assets/7d9cd908-6fdf-45c4-82f0-56cce35dbcee) --- 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,