by dtech · 2y ago · 0 comments
I'd also recommend against doing audit logging on the application level if you want any kind of coverage, it's to easy to forget or work around. Database triggers or a CDC solution like Debezium [1] have more certainty and as a bonus don't require adding the audit functionality to each individual model.
I’m currently in the process of standing up some Debezium based infra so I’m acutely aware of how annoying and involved it is. There’s also inherent limitations in Debezuium/kafka like maximum message sizes that may not support row shapes that Postgres handles just fine.