Releases: getsentry/sentry-laravel
4.4.1
4.4.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v4.4.0.
Features
-
Add support for Laravel 11 Context (#869)
If you are using Laravel 11 and the new "Context" capabilities we now automatically capture that context for you and it will be visible in Sentry.
Read more about the feature in the Laravel documentation and how to use it.
4.3.1
4.3.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v4.3.0.
Features
-
Add support for Laravel 11.0 (#845)
If you're upgrading an existing Laravel 10 application to the new Laravel 11 directory structure, you must change how Sentry integrates into the exception handler. Update your
bootstrap/app.php
with:<?php use Illuminate\Foundation\Application; use Illuminate\Foundation\Configuration\Exceptions; use Illuminate\Foundation\Configuration\Middleware; use Sentry\Laravel\Integration; return Application::configure(basePath: dirname(__DIR__)) ->withRouting( web: __DIR__.'/../routes/web.php', commands: __DIR__.'/../routes/console.php', health: '/up', ) ->withMiddleware(function (Middleware $middleware) { // }) ->withExceptions(function (Exceptions $exceptions) { Integration::handles($exceptions); })->create();
If you plan to perform up-time checks against the new Laravel 11
/up
health URL, ignore this transaction in yourconfig/sentry.php
file, as not doing so could consume a substantial amount of your performance unit quota.// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#ignore-transactions 'ignore_transactions' => [ // Ignore Laravel's default health URL '/up', ],
Bug Fixes
4.2.0
The Sentry SDK team is happy to announce the immediate availability of Sentry Laravel SDK v4.2.0.
Features
-
Add new spans, measuring the time taken to queue a job (#833)
-
Add support for
failure_issue_threshold
&recovery_threshold
forsentryMonitor()
method on scheduled commands (#838) -
Automatically flush metrics when the application terminates (#841)
-
Add support for the W3C traceparent header (#834)
-
Improve
php artisan sentry:test
to show internal log messages by default (#842)
4.1.2
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
forintegrations
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
4.1.0
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 theSENTRY_TRACE_SQL_BINDINGS_ENABLED
environment variable totrue
.'tracing' => [ 'sql_bindings' => true, ],
Misc
4.0.0
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 theignore_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 LaravelHttp
facade, we automatically attach thesentry-trace
andbaggage
headers.This behaviour can be controlled by setting
trace_propagation_targets
in yourconfig/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 theSentry\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.