Describe the bug
We are currently using the OpenTelemetry Collector to log telemetry data into a logfile. The logfiles are continuously growing, and we encounter issues when the pod gets restarted multiple times, causing us to lose logs.
We need guidance on the available options for log rotation and the best practices for implementing it.
Steps to reproduce
Configure OTelCol to log telemetry data into a logfile.
Observe that the logfile grows continuously.
What did you expect to see?
We expect to have a mechanism for log rotation to manage the size of the logfiles and to ensure logs are not lost after pod restarts using with volume mounts.
What did you see instead?
Logfile grows continuously.
Describe the bug We are currently using the OpenTelemetry Collector to log telemetry data into a logfile. The logfiles are continuously growing, and we encounter issues when the pod gets restarted multiple times, causing us to lose logs.
We need guidance on the available options for log rotation and the best practices for implementing it.
Steps to reproduce
What did you expect to see? We expect to have a mechanism for log rotation to manage the size of the logfiles and to ensure logs are not lost after pod restarts using with volume mounts.
What did you see instead? Logfile grows continuously.
What version did you use? v0.105.0
What config did you use?
Environment OpenTelemetry Collector version: v0.105.0 collector-telemetry
Additional context GitHub Issue https://github.com/open-telemetry/opentelemetry-collector/issues/1048 talks about logrotation.
What are the options for log rotation in OpenTelemetry Collector? What are the best practices to implement log rotation effectively?