Setting default Data Retention value via LANGFUSE_INIT_PROJECT_RETENTION env variable doesn't work. #11123
Describe your questionIn my self-hosted Langfuse, I have configured Looking at the code here, it seems to me that without setting My usecase is that whenever I create new Project from UI, by default the data retention period should get set to 30 days. Is there any way, I can achieve it? Langfuse Cloud or Self-Hosted?Self-Hosted If Self-Hostedv3.137.0 EE If Langfuse CloudNo response SDK and integration versionsNo response Pre-Submission Checklist
|
Replies: 1 comment 2 replies
|
You're correct in your observation. The According to the documentation, Currently, there is no built-in way to set a default data retention value that automatically applies to all new projects created through the UI. Data retention is configured on a project level, and by default, Langfuse stores event data indefinitely(3). Project owners and administrators must manually change the data retention setting within the Project Settings view for each project(3). For your use case, you have two options:
There is an open feature request for global and organization-level data retention configuration that would address your use case(4), but this is not currently available in Langfuse. 📚 Sources:
Have another question? Just tag @inkeep. |
Hey @ankitjain1510 ,
Inkeep is correct here. Currently, there is no option to have this configured by default. You would have to use the projects API in this case.
You can also use ClickHouse TTLs and bucket lifecycle policies to solve this on an infrastructure level.
We'll log this as a feature request and will give an update here once this becomes part of the product.