View in #prefect-community on Slack
@Lucas_Hosoya: Hi, I got a question about log retention in Prefect Cloud (Starter and Standard)
When it says only “1-2 weeks of run history”, does that mean that the whole history is deleted? (UI, Interactive API)
• Is there any way to keep logs other than the Enterprise plan? (For Prefect Cloud server, not custom made server)
• Custom logs in tasks/flows to storage. -> Not very useful or effective since involves work that is not necessary, since logs already exist in Prefect Cloud.
@Anna_Geller: @Lucas_Hosoya that’s correct. Currently, to get more than 2 weeks of history on a Standard plan, you would need to contact firstname.lastname@example.org
@Lucas_Hosoya: Hey, thanks for the reply!
I’ll be looking with the team to solve this!
@Anna_Geller: @Lucas_Hosoya in theory, you could build your own solution somehow to either query logs from the API and store it somewhere else:
But this would be probably cumbersome.
The easiest way to approach this would be to backup logs on your execution layer. E.g. if you use a Kubernetes agent on AWS EKS, you could set up a mechanism to store all logs for all pods in CloudWatch.
Medium: Move logs of all Kubernetes Pods to AWS CloudWatch Logs using Fluentd.
@Lucas_Hosoya: That would work too! Our plan is to throw all of the logs into a storage and analyze with ELK
@Anna_Geller: For instance, if you use ECSAgent, then all your logs from the ECSAgent and ECS tasks of the flow runs are by default persisted in CloudWatch so when there is an emergency and you need to find logs from flow runs from over 2 weeks ago, you would find them in CloudWatch