mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 11:19:27 +08:00
1.3 KiB
1.3 KiB
Debug Analysis Playbook
Use this playbook when platform-apex-logs-debug is active and you need the expanded workflow.
1. Gather context
Collect:
- org alias
- failing transaction or test context
- approximate time window
- relevant user / record / request identifiers
2. Retrieve logs
Preferred commands:
sf apex list log --target-org <alias> --json
sf apex get log --log-id <id> --target-org <alias>
sf apex tail log --target-org <alias> --color
See cli-commands.md for more options.
3. Analyze in this order
- transaction entry point
- exceptions and fatal errors
- governor limits
- SOQL / DML repetition patterns
- CPU / heap hotspots
- callout timing and external failures
4. Classify severity
- Critical — runtime failure, hard limit, data corruption risk
- Warning — near-limit, non-selective query, slow path
- Info — optimization opportunity, cleanup item, observability gap
5. Propose fixes
Prefer fixes that are:
- root-cause oriented
- bulk-safe
- testable
- deployable in one clean change set
6. Loop with adjacent skills
- use
sf-apexfor code fixes - use
platform-apex-test-runto reproduce and verify - use
platform-metadata-deployto deploy fixes - use
platform-data-managewhen the issue depends on missing or malformed test data