Part 08 of 16 · Day 1 · event tracing
Tracing one application across the system
Problem and experience
The whole journey for the first time
The application goes through seven steps. So far everything works. Let us look at who does what and what trail they leave.
- Submitted
- Risk
- Approval
- Identity
- Account
- Contract
- Disbursement
From practiceWhere on this journey do you think it might fail first?
TakeawayThe happy path is useful because it shows us what could go wrong.
What it means
The first run is an exercise without failures: we watch which events are created and who reacts to them.
Why we use it
First we want to understand the normal flow. Failures are then easier to name.
When it makes sense
Before every further change to the flow.
Where it breaks
- Taking the happy path as proof that the system works.
- Not following the event trail and relying on the final state.
Imagine
The client submits an application and it is approved within a few seconds. Each step left an event.
Understanding what happens when nothing goes wrong is the first step.
Principle, application and exercise
The happy path and its trail
We follow one application from submission to payout. Each step is an event with the same correlationId.
- MortgageApplicationSubmitted
- RiskAssessmentCompleted
- MortgageApproved
- CustomerIdentityCreated
- MortgageAccountOpened
- ContractSigned
- MortgageDisbursed
Trade-offThe happy path hides problems: duplicates, ordering, outages. They only show up on day 2.
TakeawayLook at the event trail, not just the final state.
What it means
The run passes through the Risk, Approval, Identity, Account, Document and Disbursement services. Each reacts to an event and creates the next one.
Why we use it
We will see how the process is made up of small steps.
When it makes sense
Whenever getting to know a new flow.
Where it breaks
- Mistaking the state in the read model for the actual state of the service.
- Not recognising which step triggered which.
Imagine
Just look at the event timeline and see who did what and when.
The event trail is the best documentation of a process.
Training for your team
Would you like this training for your team?
We run the training on your code and your domain problem. We agree the scope, dates and format with you.
Discuss the training →