From d4b260307faba7840b231fc2a1495f62a3d8f7f3 Mon Sep 17 00:00:00 2001 From: Braydon Kains <93549768+braydonk@users.noreply.github.com> Date: Sun, 26 May 2024 15:13:23 -0400 Subject: [PATCH] service: add levelchanger for localhostgate warn (#209) Signed-off-by: braydonk --- service/main.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/service/main.go b/service/main.go index 8c2c9029e..ccfa173f0 100644 --- a/service/main.go +++ b/service/main.go @@ -49,7 +49,16 @@ func MainContext(ctx context.Context) { zapcore.DebugLevel, // We would like the Error logs from this file to be logged at Debug instead. // https://github.com/open-telemetry/opentelemetry-collector/blob/831373ae6c6959f6c9258ac585a2ec0ab19a074f/receiver/scraperhelper/scrapercontroller.go#L198 - levelchanger.FilePathLevelChangeCondition("scrapercontroller.go")), + levelchanger.FilePathLevelChangeCondition("scrapercontroller.go"), + ), + levelchanger.NewLevelChangerOption( + zapcore.WarnLevel, + zapcore.DebugLevel, + // This is a warning log that is written unless a certain featuregate is + // enabled, but we don't want to turn the featuregate on. + // https://github.com/open-telemetry/opentelemetry-collector/blob/8a2a1a58d13b5f492ebab2f40c51fdcb6fc452ce/internal/localhostgate/featuregate.go#L61-L68 + levelchanger.FilePathLevelChangeCondition("localhostgate/featuregate.go"), + ), }, }