I Was Blind, but Now I See. Event Sourcing and Observability
Event sourcing is an architectural pattern in which every change to an application’s state is recorded as a sequence of events (Fowler, 2005). Event sourcing is a companion architecture to domain-driven design, with events related to aggregate root entities within the domain. In domain-driven design, we model the domain by creating a ubiquitous language that captures its core concepts. Those objects are subject to certain actions, and it’s natural to think of these actions as events that have occurred. As an example, if you have an aggregate root “Order”, when the order is created, you may emit an event “order.created”. When the credit for the order is approved, you may have “order.approved”. When the order is shipped, “order.shipped” would be emitted and so on. What you end up with is an append-only log of all the things that are happening in the system.