List Slow Apex Log Operations
apexlog_list_slow_operationsRanks Apex debug log operations by self time or retained heap, showing calls, durations, database counts, and query plans to reveal bottlenecks and what to optimize.
Instructions
Rank what an Apex debug log spent its time on by self-execution time, or on the heap it retains - code units, methods, queries, searches, DML, flows and workflows in one table, each row with its calls, durations, database counts and rows, so the caller can see what to optimize and why, beside the query optimizer's plan for the queries among them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Rank only these log event types, e.g. SOQL_EXECUTE_BEGIN, DML_BEGIN, METHOD_ENTRY | |
| limit | No | Page size (default: 10); fewer if the page would be too large | |
| offset | No | Ranked rows to skip (default: 0). Advance it by the rows you got, which can be fewer than limit. | |
| sortBy | No | Default durationSelfMs. heapSelfNetBytes adds that column. | |
| groupBy | No | Fold repeats into one row; default name. callerNamespace attributes platform DML to the package that drove it. debugCategory folds a namespace's event types together and so states no type or name. none ranks each call on its own. A grouped durationTotalMs is what the transaction takes back if the group never runs - never sum it across rows. | |
| minSelfMs | No | Drop operations below this self time (default: 0), whichever sortBy is used | |
| namespace | No | Rank only these namespaces | |
| logFilePath | Yes | Absolute path | |
| debugCategory | No | Rank only these debug log categories |