Update/remove specific field from historical traces? #10662
Replies: 2 comments
-
|
Based on the available documentation, Langfuse does not support removing or nullifying specific fields from existing traces(1). The data model is designed around trace immutability, and the deletion capabilities are focused on removing entire traces rather than modifying individual fields(1). Available Options1. Delete and Recreate TracesThe approach suggested by Langfuse on Discord—retrieving traces via the API, deleting them, and recreating them with the desired metadata—is the only documented method for this use case(1). While not ideal for production data at scale, this is the supported workflow. You can delete traces through:
2. Data Retention PoliciesIf your goal is to minimize PII exposure over time, you can configure Data Retention policies to automatically remove older traces(1). This won't address existing data immediately but can prevent long-term storage of sensitive fields. 3. Preventive MeasuresFor future traces, consider implementing data masking at ingestion time to redact PII before it reaches Langfuse(2). This prevents the issue from occurring in new traces. Important LimitationsTrace deletions in Langfuse are rate-limited and typically complete within 15 minutes, with no confirmation provided(1). You'll need to query the data again to verify deletion(1). For large-scale field removal from historical traces, the delete-and-recreate approach remains the only documented solution, though it requires careful orchestration for production environments. 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @justine-arjo, Inkeep's answer is correct. How many traces do you need to remove? If it's a lot, we might be able to help you on that. For future traces, best to look into data masking. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your question
Hi Langfuse team,
I have a question regarding the immutability constraints of the observability data model.
In my current project, some traces contain a
user.namefield that I would now like to remove for privacy/PII-minimization reasons. I understand from the FAQ that the tracing data model is mostly immutable, and that updates sent with the same trace ID can overwrite certain fields, especially if the full event (with the original timestamp) is re-ingested.Before I proceed, could you clarify the following:
Thank you!
Langfuse Cloud or Self-Hosted?
Langfuse Cloud
If self-hosted, what version are you running?
No response
SDK and integration versions
No response
Pre-Submission Checklist
Beta Was this translation helpful? Give feedback.
All reactions