Does telemetry logs provides any configuration to rotate logs ? Based on log configuration provided in collector yaml file, I couldn't find any option for log rotation. Please clarify.
Also, since open telemetry collector agent uses Zap logger, I found another log library called lumberjack, which can be used in conjunction with Zap to enable log rotation.
In order to achieve it, Lumberjack instance need to be set in Zap logger during application start-up like below,
Can you help me here on where I set this in open telemetry collector agent? I am currently using custom otel collector agent by creating a custom processor for my use case.
Hi,
Does telemetry logs provides any configuration to rotate logs ? Based on log configuration provided in collector yaml file, I couldn't find any option for log rotation. Please clarify.
Also, since open telemetry collector agent uses Zap logger, I found another log library called lumberjack, which can be used in conjunction with Zap to enable log rotation.
In order to achieve it, Lumberjack instance need to be set in Zap logger during application start-up like below,
log.SetOutput(&lumberjack.Logger{ Filename: "/var/log/myapp/foo.log", MaxSize: 500, // megabytes MaxBackups: 3, MaxAge: 28, //days Compress: true, // disabled by default })
Can you help me here on where I set this in open telemetry collector agent? I am currently using custom otel collector agent by creating a custom processor for my use case.
Please let me know for any further details.