Monitor Process and Flow Usage Against Per-Transaction Governor Limits

Processes and flows can do powerful things, and those things often count toward your per-transaction limits. Now you can use debug logs to identify which actions contribute the most against those limits. These details help you troubleshoot errors and monitor usage as you activate and distribute your processes and flows. You can also use these details while testing processes and flows that you’re building to prevent them from reaching governor limits at run time.

Where: This change applies to Lightning Experience and Salesforce Classic in Essentials, Professional, Enterprise, Performance, Unlimited, and Developer editions.

How: Access debug logs from the Logs tab in the Developer Console. Or from Setup, enter Debug Logs in the Quick Find box. In the debug level, set Workflow to Finer.

Use these debug event types to monitor process and flow usage against per-transaction governor limits.
  • FLOW_START_INTERVIEW_LIMIT_USAGE—Includes how much of a limit is used by the transaction upon starting the process or flow interview but before executing process or flow elements. Also includes the per-transaction limit.
  • FLOW_ELEMENT_LIMIT_USAGE—Includes how much of a limit is used by the process or flow element, the total count used by the transaction after executing the element, and the per-transaction limit.
  • FLOW_BULK_ELEMENT_LIMIT_USAGE—Includes how much of a limit is used by the element executed in bulk, the total count used by the transaction after executing the element, and the per-transaction limit.

Example

...
... |FLOW_START_INTERVIEW_LIMIT_USAGE|SOQL queries: 1 out of 100
... |FLOW_START_INTERVIEW_LIMIT_USAGE|SOQL query rows: 100 out of 50000
... |FLOW_START_INTERVIEW_LIMIT_USAGE|SOSL queries: 0 out of 20
... |FLOW_START_INTERVIEW_LIMIT_USAGE|DML statements: 1 out of 150
... |FLOW_START_INTERVIEW_LIMIT_USAGE|DML rows: 10 out of 10000
... |FLOW_START_INTERVIEW_LIMIT_USAGE|CPU time in ms: 0 out of 15000
... |FLOW_START_INTERVIEW_LIMIT_USAGE|Heap size in bytes: 0 out of 6000000
... |FLOW_START_INTERVIEW_LIMIT_USAGE|Callouts: 0 out of 100
... |FLOW_START_INTERVIEW_LIMIT_USAGE|Email invocations: 0 out of 10
... |FLOW_START_INTERVIEW_LIMIT_USAGE|Future calls: 0 out of 50
... |FLOW_START_INTERVIEW_LIMIT_USAGE|Jobs in queue: 0 out of 50
... |FLOW_START_INTERVIEW_LIMIT_USAGE|Push notifications: 0 out of 10
...
... |FLOW_ELEMENT_LIMIT_USAGE|1 DML statements, total 2 out of 150
... |FLOW_ELEMENT_LIMIT_USAGE|1 DML rows, total 11 out of 10000
...

Related Updates for Developers

Debug Logs
New events: FLOW_START_INTERVIEW_LIMIT_USAGE, FLOW_ELEMENT_LIMIT_USAGE, FLOW_BULK_ELEMENT_LIMIT_USAGE