Skip to main content

[PHP] Why don't I see profiles in Sentry?

Issue

I completed the PHP profiling setup, but I don't see any profiles in Sentry. I have installed the SDK and expected profiling data to appear.

Applies To

  • All SaaS Customers and Self-Hosted Users

  • PHP SDK

  • Profiling

Resolution

PHP profiles are missing most often because tracing is not enabled or the Excimer extension is not active. PHP profiling runs only inside transactions, so both tracing and the extension are required. Work through the checks below in order.

  1. Enable tracing and profiling in your SDK configuration. Set traces_sample_rate (or traces_sampler) to enable tracing, then set profiles_sample_rate (or profiles_sampler) to enable profiling. profiles_sample_rate is relative to traces_sample_rate:

    \Sentry\init([
    'dsn' => '<your-dsn>',
    'traces_sample_rate' => 1.0,
    // Relative to traces_sample_rate
    'profiles_sample_rate' => 1.0,
    ]);

    Profiling requires PHP SDK version 3.15.0 or later. The PHP SDK uses transaction-based profiling; it does not support Continuous or UI Profiling (profile_session_sample_rate / profile_lifecycle). See the PHP profiling setup docs and the profiles_sample_rate option.

  2. Make sure transactions are being created. The profiler starts only inside a transaction. The Laravel and Symfony SDKs create transactions automatically. With the plain PHP SDK, add transactions yourself using custom instrumentation, and confirm performance data appears on the Performance page in Sentry.

  3. Install and enable the Excimer extension. Excimer supports PHP 7.2 and later (use Excimer 1.1.0 or later for PHP 8.2), and runs on Linux and macOS only (Windows is not supported). Install it with your package manager or PECL:

    sudo apt-get install php-excimer
    # or
    pecl install excimer
  4. Confirm the extension is enabled for the PHP version your application uses:

    php -v   # check the active PHP version
    php -m # confirm "excimer" is listed
  5. Restart your PHP process after installing the extension, matching your PHP version and process manager. For example:

    sudo service php8.2-fpm restart

If profiles still do not appear, note these limits of the profiler: requests that finish in under ~20ms produce no profile (a minimum of two samples is required), the maximum profile duration is 30 seconds, and profiling is not recommended in CLI environments. For extension-specific installation help, see the Excimer project documentation, which is not built or maintained by Sentry.

Did this answer your question?