← Lessons

quiz vs the machine

Gold1520

System Design

Continuous Profiling

Always on, low overhead profiling so the hot code is already captured before you go looking.

5 min read · core · beat Gold to climb

Profiling You Forgot to Start

Traditional profiling is something you run during an incident, by which point the spike is often gone. Continuous profiling runs all the time at low overhead, so the data is already there when you need it.

How It Stays Cheap

  • Low frequency sampling: capturing stacks a small number of times per second keeps CPU cost in the low single digit percent.
  • Compact storage: stacks are aggregated and deduplicated rather than stored raw.
  • Always on: every service profiles itself continuously, in production.

What It Unlocks

Because the data is historical and continuous you can:

  • Diff over time: did a deploy make a function hotter than last week.
  • Investigate after the fact: a spike at 3 am is still captured.
  • Cut cost: find the functions burning the most CPU fleet wide and optimize them.

Key idea

Continuous profiling runs always on at low overhead in production, so historical hot code is captured for diffing across deploys and investigating spikes after they pass.

Check yourself

Answer to earn rating on the learn ladder.

1. What is the main benefit of continuous over on demand profiling?

2. How does continuous profiling keep overhead low?