The concept How will Apex know the system is working?
A platform can return successful responses and still be failing the business. Ingestion works, messages enter the queue, workers process them, but settlement records are not arriving. The application looks healthy while the business process is broken. Observability must cover both technical health and business health.
Three signals Logs, metrics and traces
| Signal | Explains | Apex examples |
|---|---|---|
| Logs | What happened | Notification received, validation failed, duplicate detected, reconciliation attempt completed, exception created. Structured, with no sensitive data. |
| Technical metrics | How the machines behave over time | Request latency, error rate, queue depth, consumer lag, database connections, CPU and memory, retry count |
| Business metrics | How the business process behaves | Payments received and reconciled, unmatched transactions, settlement delay, exceptions waiting, average resolution time |
| Traces | How one request moves through components | API gateway, payment ingestion, outbox publisher, queue, reconciliation worker, database |
For finance Business observability
A finance dashboard shows total payments received today, payments awaiting settlement, payments reconciled, unmatched payments, exceptions needing investigation, processing delay and exception aging. These tell business teams whether the platform is doing its job, not just whether it is running.
Wake people up wisely Alerts
- Queue depth exceeds an agreed threshold.
- Processing delay exceeds the business target.
- Settlement ingestion has not completed by the expected time.
- The reconciliation error rate rises unexpectedly.
- The dead-letter queue contains messages.
- Database storage or connections approach a limit.
- A privileged manual adjustment occurs.
Be ready Operational runbooks
A runbook helps an operator respond to a known condition. Scenario: the reconciliation queue is growing.
- Check queue depth and message age.
- Check worker health.
- Review processing error metrics.
- Inspect representative failed messages.
- Check database availability and connection usage.
- Decide whether the issue is temporary or persistent.
- Scale or restore processing capacity where appropriate.
- Replay eligible messages under the approved procedure.
- Confirm the queue returns to its normal range.
- Record the incident and its customer impact.
Practice Design the operations
Practical exercise
Exercise 09: observability and operations design
Write the operational architecture for Apex.
- A logging strategy and a metrics catalogue.
- A distributed tracing plan and business dashboards.
- Alert definitions, each with an owner.
- Three runbooks and an incident escalation model.
Show a sample alert and runbook title
- Alert: settlement file not received by the agreed time; owner, platform on-call; severity, high; first step, check the file transfer log, then contact the bank.
- Alert: dead-letter queue not empty; owner, application team; first step, inspect one message and classify the failure.
- Runbooks: reconciliation queue growing; settlement file late; dead-letter messages present.
3 questions
Check your understanding
What you can do now
- Plan logs, technical and business metrics, and traces.
- Design a finance dashboard that shows business health.
- Define owned, meaningful alerts.
- Write an operational runbook.
← Lesson 08: Reliability, Failure Handling and Disaster Recovery