Skip to content

Commit

Permalink
[exporter/logging] Add warning to logging exporter (#11050)
Browse files Browse the repository at this point in the history
#### Description

Add warning to logging exporter on startup to remind users to switch to
the debug exporter.

#### Link to tracking issue
Related to
#11037

#### Testing

![image](https://github.com/user-attachments/assets/7d9cd908-6fdf-45c4-82f0-56cce35dbcee)
  • Loading branch information
TylerHelmuth authored Sep 4, 2024
1 parent 752ec37 commit 631df98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exporter/loggingexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 631df98

Please sign in to comment.