Is there a way to clear trace data in batch? #3949
-
Hi, I want to apply retention policy to our self-host langfuse data. Something like only persists 1 months traces and discard all traces generated 1 month ago. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @renwei-work 👋 I'm here to help you out with any bugs, questions, or contributions you have. Let's tackle this together! Currently, Langfuse does not provide built-in support for automated batch deletion of trace data based on a retention policy. You would need to manually manage data retention by running cleanup tasks on your PostgreSQL database. You can purge the trace and observation tables based on the Regarding your concern about foreign keys, the For now, you might consider writing a custom script to automate the deletion process based on your retention policy. |
Beta Was this translation helpful? Give feedback.
-
Hi @renwei-work, this is answered in this post: https://github.com/orgs/langfuse/discussions/2268#discussioncomment-10201896 :) |
Beta Was this translation helpful? Give feedback.
Hi @renwei-work, this is answered in this post: https://github.com/orgs/langfuse/discussions/2268#discussioncomment-10201896 :)