I am building an application in a micro service architecture . So I have my different business models running on different microservices.
Microservices are using graph and document databases.
What I have to do is, I need to keep all audit logs about the objects whenever they were changed. There are couple of ways to do this,two I thought of :
- Store audit logs in the each databases whenever something changes to object.
- Instead of having it localized, make it to a central repository where we can see all the audits for whole application as behind the scenes application is served by micro services but at front this is just one app for the users and also for us. Would elastic search be used for this purpose of long term storage ? or we have other solutions ?
Which other ways are the best practices that I must follow. My objective in the end is to the when what was changed in the object by whom.
Cheers!