0

As /var/log is a black box, as it's engineered by PaaS mount which we don't really are able to inspect.

The context is that log files supposedly are building up storage space counting towards the memory, and over the time of an instance they should be cleanup.

Do we have a way to know when a log entry has been picked up, and safe to be removed? Do you know if there is an automatic logrotate included in the hidden-gem-stackdriver integration?

How do we know when it's safe to issue a logrotate? What's the recommendation here, shall we use separate files every 1 minute, 10-15 minutes? hourly?

Pentium10
  • 434
  • 9
  • 23

1 Answers1

2

Cloud Run automatically sends the log entries received at /var/log to Cloud Logging. It does not retain these logs in a local file and these logs do not count against the memory allocated to your container.

As a developer, you should not need to worry about cleaning up /var/log on Cloud Run and can assume that anything that you have written to /var/log will end up in Cloud Logging with high reliability (higher than if you were sending the logs yourself via an API call)

Steren
  • 136
  • 1