Skip to content

Releases: getsentry/sentry-php

4.17.1

23 Oct 15:42

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.17.1.

Misc

  • Call curl_close only on PHP version 7.4 and below to prevent deprecation warnings. (#1947)

4.17.0

20 Oct 13:00

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.17.0.

Bug Fixes

  • Empty strings will no longer display <encoding error> when serialized. (#1940)

Misc

  • Remove symfony/phpunit-bridge as a dev dependency. (#1930)
  • Update sentry.origin to be consistent with other SDKs. (#1938)

4.16.0

22 Sep 13:46

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.16.0.

Features

  • Remove max_breadcrumbs limit. (#1890)
  • Implement __destruct in LogsHandler to make sure logs are always flushed. (#1916)

Bug Fixes

  • Use PSR log level when logging messages using the PSR-3 logger within the SDK. (#1907)
  • Remove @internal annotation from Sentry\Transport\Result. (#1904)

Misc

  • Add sentry.origin attribute to LogsHandler. (#1917)

4.15.2

03 Sep 07:26

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.15.2.

Bug Fixes

  • Ensure the Monolog handler only processes records permitted by their log level. (#1888)

4.15.1

28 Aug 15:48

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.15.1.

Bug Fixes

  • Do not send template attribute with logs when there are no template values (#1885)

4.15.0

20 Aug 14:29

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.15.0.

Features

  • Add Monolog Sentry Logs handler (#1867)

    This new handler allows you to capture Monolog logs as Sentry logs. To use it, configure your Monolog logger:

    use Monolog\Logger;
    use Sentry\Monolog\LogsHandler;
    use Sentry\Logs\LogLevel;
    
    // Initialize Sentry SDK first (make sure 'enable_logs' is set to true)
    \Sentry\init([
        'dsn' => '__YOUR_DSN__',
        'enable_logs' => true,
    ]);
    
    // Create a Monolog logger
    $logger = new Logger('my-app');
    
    // Add the Sentry logs handler
    // Optional: specify minimum log level (defaults to LogLevel::debug())
    $handler = new LogsHandler(LogLevel::info());
    $logger->pushHandler($handler);
    
    // Now your logs will be sent to Sentry
    $logger->info('User logged in', ['user_id' => 123]);
    $logger->error('Payment failed', ['order_id' => 456]);

    Note: The handler will not collect logs for exceptions (they should be handled separately via captureException).

Bug Fixes

  • Fix non string indexed attributes passed as log attributes (#1882)
  • Use correct sample_rate key when deriving sampleRand (#1874)
  • Do not call Reflection*::setAccessible() in PHP >= 8.1 (#1872)

4.14.2

21 Jul 08:35

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.14.2.

Bug Fixes

  • Add missing sample rates in the envelope header (#1870)

4.14.1

23 Jun 15:37

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.14.1.

Bug Fixes

  • Fix missing user attributes on logs (#1864)

4.14.0

13 Jun 17:25

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.14.0.

Features

  • Serialize enum variants with the variant name (#1860)

Bug Fixes

  • Fix handling of backtrace frames (#1862)
  • Set allowed types for http_ssl_native_ca (#1858)

4.13.0

10 Jun 15:54

Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.13.0.

Features

  • Add regex support for ignore_exceptions and ignore_transactions (#1850)

    You can now use regular expressions to ignore exceptions and transactions:

    Sentry\init([
        'ignore_exceptions' => [
            '/.*ArgumentException$/',
        ],
        'ignore_transactions' => [
            '/^GET \/api\/users\/\d+$/',
        ],
    ]);
  • Add support for variadic parameters and null values (#1849)

Bug Fixes

  • Fix Options::setEnableLogs (#1852)
  • Fix vsprintf not handling errors (#1855)