From 81564d67043c4c0f2f3c02f6033e526601c3299b Mon Sep 17 00:00:00 2001 From: Bence Csati Date: Wed, 11 Dec 2024 10:32:45 +0100 Subject: [PATCH] fix: generate debug exporter only if needed Signed-off-by: Bence Csati --- internal/controller/telemetry/otel_conf_gen/otel_conf_gen.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/controller/telemetry/otel_conf_gen/otel_conf_gen.go b/internal/controller/telemetry/otel_conf_gen/otel_conf_gen.go index 342ff1a..033fe4e 100644 --- a/internal/controller/telemetry/otel_conf_gen/otel_conf_gen.go +++ b/internal/controller/telemetry/otel_conf_gen/otel_conf_gen.go @@ -69,7 +69,9 @@ func (cfgInput *OtelColConfigInput) generateExporters(ctx context.Context) map[s maps.Copy(exporters, exporter.GenerateOTLPGRPCExporters(ctx, cfgInput.ResourceRelations)) maps.Copy(exporters, exporter.GenerateOTLPHTTPExporters(ctx, cfgInput.ResourceRelations)) maps.Copy(exporters, exporter.GenerateFluentforwardExporters(ctx, cfgInput.ResourceRelations)) - maps.Copy(exporters, exporter.GenerateDebugExporters()) + if cfgInput.Debug { + maps.Copy(exporters, exporter.GenerateDebugExporters()) + } return exporters }