Profiling Performance Overhead
Profiling works by taking snapshots (samples) of the call stack of each thread in your application at a regular interval, then transmitting that data to event ingestion servers via the Internet. This method of profiling is known as sampling profiling. Sentry's profilers collect samples approximately 100 times per second (or once every 10ms). Sampling profiling provides a reasonable tradeoff between data fidelity and runtime overhead, as opposed to deterministic profiling, which introduces significantly higher overhead by tracking every function call.
For most applications, the performance overhead of enabling profiling in production is imperceptible to end users.
The quantitative overhead of profiling (measured as a percentage increase in CPU time) is dependent on environmental factors such as the SDK, the platform, the hardware, and whether the workload is CPU or I/O bound. As a rule of thumb, we target approximately 1-5% CPU time overhead on a typical configuration with mid-end hardware on each platform.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").