Skip to content

Releases: getsentry/sentry-laravel

4.1.2

16 Jan 12:54
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v4.1.2.

Bug Fixes

  • Fix unable to set callable for integrations option (#826)

  • Fix performance traces not being collected for Laravel Lumen unless missing routes are reported (#822)

  • Fix configuration options for queue job tracing not applying correctly (#820)

Misc

  • Allow newer versions of symfony/psr-http-message-bridge dependency (#829)

4.1.1

12 Dec 22:21
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v4.1.1.

Bug Fixes

  • Fix missing sentryMonitor() macro when command is called outside the CLI environment (#812)

  • Don't call terminating() in Lumen apps below 9.1.4 (#815)

4.1.0

23 Nov 14:13
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v4.1.0.

Features

  • Capture SQL query bindings (parameters) in SQL query spans (#804)

    To enable this feature, update your config/sentry.php file or set the SENTRY_TRACE_SQL_BINDINGS_ENABLED environment variable to true.

    'tracing' => [
        'sql_bindings' => true,
    ],

Misc

  • Unify backtrace origin span attributes (#803)
  • Add ignore_exceptions & ignore_transactions to default config (#802)

4.0.0

16 Nov 12:48
Compare
Choose a tag to compare

The Sentry SDK team is thrilled to announce the immediate availability of Sentry Laravel SDK v4.0.0.

Breaking Changes

This version adds support for the underlying Sentry PHP SDK v4.0.
Please refer to the PHP SDK sentry-php/UPGRADE-4.0.md guide for a complete list of breaking changes.

  • This version exclusively uses the envelope endpoint to send event data to Sentry.

    If you are using sentry.io, no action is needed.
    If you are using an on-premise/self-hosted installation of Sentry, the minimum requirement is now version >= v20.6.0.

  • You need to have ext-curl installed to use the SDK.

  • The IgnoreErrorsIntegration integration was removed. Use the ignore_exceptions option instead.

    // config/sentry.php
    
    'ignore_exceptions' => [BadThingsHappenedException::class],

    This option performs an is_a check now, so you can also ignore more generic exceptions.

Features

  • Enable distributed tracing for outgoing HTTP client requests (#797)

    This feature is only available on Laravel >= 10.14.
    When making a request using the Laravel Http facade, we automatically attach the sentry-trace and baggage headers.

    This behaviour can be controlled by setting trace_propagation_targets in your config/sentry.php file.

    // config/sentry.php
    
    // All requests will contain the tracing headers. This is the default behaviour.
    'trace_propagation_targets' => null,
    
    // To turn this feature off completely, set the option to an empty array.
    'trace_propagation_targets' => [],
    
    // To only attach these headers to some requests, you can allow-list certain hosts.
    'trace_propagation_targets' => [
        'examlpe.com',
        'api.examlpe.com',
    ],

    Please make sure to remove any custom code that injected these headers previously.
    If you are using the Sentry\Tracing\GuzzleTracingMiddleware provided by our underlying PHP SDK, you must also remove it.

  • Add support for Laravel Livewire 3 (#798)

    The SDK now creates traces and breadcrumbs for Livewire 3 as well.
    Both the class-based and Volt usage are supported.

    // config/sentry.php
    
    'breadcrumbs' => [
        // Capture Livewire components in breadcrumbs
        'livewire' => true,
    ],
    'tracing' => [
        // Capture Livewire components as spans
        'livewire' => true,
    ],
  • Add new fluent APIs (#1601)

    // Before
    $spanContext = new SpanContext();
    $spanContext->setDescription('myFunction');
    $spanContext->setOp('function');
    
    // After
    $spanContext = (new SpanContext())
        ->setDescription('myFunction');
        ->setOp('function');
  • Simplify the breadcrumb API (#1603)

    // Before
    \Sentry\addBreadcrumb(
        new \Sentry\Breadcrumb(
            \Sentry\Breadcrumb::LEVEL_INFO,
            \Sentry\Breadcrumb::TYPE_DEFAULT,
            'auth',                // category
            'User authenticated',  // message (optional)
            ['user_id' => $userId] // data (optional)
        )
    );
    
    // After
    \Sentry\addBreadcrumb(
        category: 'auth',
        message: 'User authenticated', // optional
        metadata: ['user_id' => $userId], // optional
        level: Breadcrumb::LEVEL_INFO, // set by default
        type: Breadcrumb::TYPE_DEFAULT, // set by default
    );
  • New default cURL HTTP client (#1589)

Misc

  • The abandoned package php-http/message-factory was removed.

3.8.2

12 Oct 14:45
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v3.8.2.

Bug Fixes

  • Fix DateTimeZone not properly converted to a string when using Cron Monitoring (#783)

3.8.1

04 Oct 10:43
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v3.8.1.

Bug Fixes

  • Fix a deprecation notice caused by passing null to Str::startsWith() (#780)

3.8.0

05 Sep 11:20
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v3.8.0.

Features

  • Initial support for Laravel Folio (#738)

    If you are using Laravel Folio in your application, we'll extract a more meaningful transaction name based on the
    VieMatched event.

  • The filesystem adapters for the sentry driver now extend the well-known Laravel classes they decorate,
    Illuminate\Filesystem\FilesystemAdapter and Illuminate\Filesystem\AwsS3V3Adapter.

    Enabling the feature can be simplified by wrapping the configuration for all disks
    with a call to Sentry\Laravel\Features\Storage\Integration::configureDisks()
    in your config/filesystems.php file:

    'disks' => Sentry\Laravel\Features\Storage\Integration::configureDisks([
        'local' => [
            'driver' => 'local',
            'root' => storage_path('app'),
            'throw' => false,
        ],
    
        // ...
    ], /* enableSpans: */ true, /* enableBreadcrumbs: */ true),

    Alternatively, you can enable this feature only for select disks:

    'disks' => [
        'local' => [
            'driver' => 'local',
            'root' => storage_path('app'),
            'throw' => false,
        ],
    
        's3' => Sentry\Laravel\Features\Storage\Integration::configureDisk('s3', [
            // ...
        ], /* enableSpans: */ true, /* enableBreadcrumbs: */ true),
    ],

    By default, both spans and breadcrumbs are enabled.
    You may disable them by passing the second argument, $enableSpans or the third argument, $enableBreadcrumbs.

  • Add Laravel artisan about command (#768)

Bug Fixes

  • Remove usage of Str::replace (#762)

    • This fixes an issue using Cron Monitoring in Laravel 6, 7 and < 8.41.0

Misc

  • Differentiate between boot and register for features (#759)

  • Internal improvements (#769)

    • Make feature registration agnostic to the service container.
    • Cleanup tests by using the @define-env annotation.
    • Move the Log channel to a feature and add tests.
    • Mark BacktraceHelper as @internal and make it lazy for the tracing service provider.

3.7.3

03 Aug 10:15
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v3.7.3.

Bug Fixes

  • Fix HTTP client integration consuming the PSR request/response body stream (#756)

3.7.2

02 Aug 13:25
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v3.7.2.

Bug Fixes

  • Fix app.bootstrap span not starting at the start of the performance transaction (#734)

  • Fix sentry storage driver not being registered when DSN is not set causing Driver [sentry] is not supported. (#752)

3.7.1

01 Aug 10:32
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v3.7.1.

Bug Fixes

  • Performance traces and breadcrumbs for filesystem access are now turned off by default (#746)

    To enable the feature, you'll need to make some changes in your config/filesystems.php file for each disk where you want to enable the tracing filesystem driver.

    // For example, if you want to trace the `local` disk, you update the disk config from this:
    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
        'throw' => false,
    ],
    
    // to this:
    'local' => [
        'driver' => 'sentry',
        'root' => storage_path('app'),
        'throw' => false,
    
        'sentry_disk_name' => 'local',
        'sentry_original_driver' => 'local',
        'sentry_enable_spans' => true,
        'sentry_enable_breadcrumbs' => true,
    ],

    For each disk, you replace the driver key with sentry and add the sentry_original_driver key with the original driver name.
    For us to construct the original driver, you also need to add the sentry_disk_name key with the name of the disk.
    In addition, you can specify the optional sentry_enable_spans and sentry_enable_breadcrumbs config keys to turn off that feature for the disk.
    These options are enabled by default.

    Please note that we replace the driver for the disk with a custom driver that will capture performance traces and breadcrumbs.
    This means that relying on the disk to be of a specific type might cause problems.
    If you rely on the disk being an instance of Illuminate\Contracts\Filesystem\Filesystem or Illuminate\Contracts\Filesystem\Cloud, there should be no problem.