Skip to content

Releases: getsentry/sentry-php

4.14.1

23 Jun 15:37
Compare
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
Compare
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
Compare
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)

4.12.0

07 Jun 08:48
0173702
Compare
Choose a tag to compare

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

Features

  • Add support for Sentry Structured Logs (#1813)

    You can now send logs directly to Sentry using the new logging API:

    Sentry\init([
        // Enable logs to be sent to Sentry
        'enable_logs' => true,
    ]);
    use function Sentry\logger;
    
    // Log messages at different levels
    logger()->info('User logged in', ['user_id' => 123]);
    logger()->warn('Deprecated function used', ['function' => 'old_function']);
    logger()->error('Database connection failed', ['host' => 'db.example.com']);
    logger()->fatal('Critical system failure: %s', ['Out of memory'], ['component' => 'database']);
    
    // Flush logs to Sentry
    logger()->flush();
    
    // We recommend registering the flushing in a shutdown function
    register_shutdown_function(static fn () => logger()->flush());

    To learn more, head over to our docs.

Bug Fixes

  • Log correct source of sampling decision (#1836)

4.11.1

12 May 11:40
Compare
Choose a tag to compare

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

Bug Fixes

  • Fix stripping prefixes from closure frames for PHP 8.4 and up (#1828)

4.11.0

14 Apr 09:20
Compare
Choose a tag to compare

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

Features

Bug Fixes

  • Fix cases where anonymous stacktrace frames did not get their prefixes stripped (#1820)
  • Fix Guzzle middleware not setting the span it created as the current span, which resulted in nesting issues in the trace view (#1801)

4.10.0

06 Nov 07:50
Compare
Choose a tag to compare

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

Features

  • The SDK was updated to support PHP 8.4 (#1760)
  • Expose a new http_ssl_native_ca option to tell the HTTP client to use the operating system's native CA store for certificate verification (#1766)

Bug Fixes

  • Fix the http_timeout & http_connect_timeout options, which now also work with sub second values (#1785)

Misc

  • HTTP breadcrumbs created by the GuzzleTracingMiddleware are now set to a warning status for 4xx responses and an error status for 5xx responses (#1773)
  • All public Metrics APIs are now no-op, internal APIs were removed (#1786)

4.9.0

08 Aug 14:43
Compare
Choose a tag to compare

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

Features

  • Allow retrieving a single piece of data from the span by it’s key (#1767)

    \Sentry\SentrySdk::getCurrentHub()->getSpan()?->setData([
        'failure' => $span->getData('failure', 0) + 1,
    ]);
  • Add span trace origin (#1769)

4.8.1

16 Jul 14:01
Compare
Choose a tag to compare

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

Bug Fixes

  • Guard against empty REMOTE_ADDR (#1751)

4.8.0

05 Jun 13:32
Compare
Choose a tag to compare

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

Features

  • Add timing span when emiting a timing metric (#1717)

    use function Sentry\metrics;
    
    // This will now both emit a distribution metric and a span with the "expensive-operation" key
    metrics()->timing(
        key: 'expensive-operation',
        callback: fn() => doExpensiveOperation(),
    );

Bug Fixes

  • Fix missing data on HTTP spans (#1735)
  • Test span sampled status before creating child spans (#1740)

Misc

  • Implement fast path for ignoring errors (#1737)
  • Add array shape for better autocomplete of Sentry\init function (#1738)
  • Represent callable strings as strings (#1741)
  • Use AWS_LAMBDA_FUNCTION_VERSION environment variable for release if available (#1742)