A community member has associated this post with a similar question:
How to get logs of item deletion past TTL in CosmosDB?
Only moderators can edit this content.
Help Needed on Tracking Deletions in Change Feed
Our service currently stores metadata in Cosmos DB with a retention of 24 hours. We have set out TTL to be 18h in the configuration, but we need to track deletion records for compliance reasons.
We came across the Change feed modes in Azure Cosmos DB | Microsoft Learn All Versions and Deletes Mode which contains a "timeToLiveExpired" field. Given the information from your documentation that "Deletes from TTL expirations aren't guaranteed to appear in the feed immediately after the item expires. They appear when the item is purged from the container", how can we track whether the deletion has occurred within retention? Since this mode is on based on a Pull model, is it still possible to get the precise timestamp of when the item is definitely purged?
In the Latest Version mode, you recommend setting a tombstone flag "deleted" with the value true. How does the change feed capture it as an update when the TTL has expired? Does it appear in the Change feed when the item is purged or just upon TTL expiration?