The scenario Healthy application, stuck business
| Signal | Answers | Apex examples |
|---|---|---|
| Logs | What happened? | Payment received, file accepted, reconciliation failed, database timeout, exception resolved |
| Metrics | How much, how often, how long? | Events a second, match rate, queue age, API latency, connections, error rate, open exceptions |
| Traces | Where did the time go? | Load balancer, API, PostgreSQL, publication, queue, worker |
jsonCorrelated, safe identifiers in a log line
{"level":"INFO","event":"SETTLEMENT_RECORD_RECONCILED","paymentId":"PAY-104582","settlementId":"SET-88321","correlationId":"COR-7F91A","ruleId":"EXACT_REFERENCE_AMOUNT","ruleVersion":2}Log identifiers, not payloads. An authorized operator can join events by ID without the logs exposing amounts, names or account details.
| Term | Is | Apex example |
|---|---|---|
| SLI | A measurement of service behavior | Percentage of valid payment requests accepted |
| SLO | A target for that measurement over a period | 99.9% over a rolling 30 days |
| SLA | A contractual commitment to the customer, with consequences such as service credits | Set by a commercial and legal agreement, ideally backed by an internal SLO that is stricter, so the team is warned before the contract is at risk |
Practice Build the dashboard and alerts
Practical exercise
Exercise 08: the Apex observability design
Build a dashboard and at least five alerts, each linked to a runbook.
- Request rate, error rate, p95 latency, database health and container restarts.
- Queue depth and oldest message age.
- Payment volume, settlement progress, reconciliation success and open exceptions.
- Sample logs and a trace of one reconciliation.
Show a sample alert
- Condition: settlement processing has not completed 2 hours after the file arrived.
- Severity: SEV 2. Owner: platform on-call. Runbook: queue processing stopped. Impact: finance cannot close the day.
2 questions
Check your understanding
Answer every question to submit.
What you can do now
- Combine logs, metrics and traces.
- Define SLIs and SLOs.
- Design actionable alerts.