MetaLens360Help Center

Trace execution paths with Apex Flow Analyzer

Index an org's Apex, triggers and Flows, then trace what runs when a record changes — including async boundaries, per-step governor risk and duplicate queries — in plain language or by browsing.

Updated in Code & performance analysis

Overview

Apex Flow Analyzer shows what actually runs in your org: which trigger calls which handler, which Flow fires next, where work moves to a Queueable or Platform Event, and how many queries each step adds. It is also where you index an org — the step that powers SOQL Risk Intelligence, Query Amplification, Performance Health and Business Processes.

The page has four tabs:

  • AI Trace — ask a question in plain language and get the execution path.
  • Components — browse or use a guided wizard to pick a starting component.
  • Dep Graph — the dependency graph between components.
  • Hot Components — the most-connected components, with the highest dependency edge count.

The old Execution Flows link (/execution-flows) opens this page.

Before you start

  • The org must be synced, so its Apex and Flow metadata is available.
  • AI Trace and per-node AI explanations need an AI provider in Settings → AI Providers.

Steps

  1. Open Apex Flow Analyzer and pick the org.
  2. If you see "No components indexed yet", click Index <org> Now. Otherwise click Index Org to refresh after a sync. Indexing can take 30–90 seconds for large orgs — do not navigate away.
  3. On AI Trace, pick a sample question such as "What happens when an Opportunity is updated?" or type your own, then click Trace Flow.
  4. Read the trace. Each node shows its governor risk and SOQL by object. Async boundaries (enqueued, scheduled or published work) are marked, because that work runs in a separate transaction with fresh limits. Duplicate queries are flagged.
  5. Click a node and choose AI Explain for a plain-language description and fix recommendations.
  6. To start from a known component instead, open Components. Use Browse to search, or ⚡ Wizard to pick an object and then an entry point.
  7. Use Export trace → Download as Text to share the result.
  8. Open Dep Graph or Hot Components to find the components most others depend on.

Example

Priya, a release manager, needs to know what a change to OpportunityTriggerHandler could affect on acme-uat. She asks AI Trace, "What happens when an Opportunity closes?" The trace shows the trigger, two handlers, a record-triggered Flow, and a Queueable that runs after the transaction. One handler queries Account twice. She exports the trace and attaches it to ACME-142.

FAQs

How often should I index?

After every sync that brings in Apex or Flow changes. Analysis pages read the last index, not live code.

Why does the trace split at an async boundary?

Queueable, scheduled and Platform Event work runs in its own transaction. Its queries do not count against the triggering transaction's 100-query limit.

Can I index from somewhere else?

Yes. Sync Center has an Index action per org.

Troubleshooting

Other pages say the org is not indexed

Run Index Org here and wait for it to complete before switching pages.

AI Trace or AI Explain returns an error

Check that an AI provider is configured in Settings → AI Providers. See Fix "AI provider not configured".

The trace misses a component I just deployed

Sync the org, then index it again.

Was this article helpful?

Related articles