Bref runs PHP applications on AWS Lambda. Version 1.0.0 of the new sentry/sentry-bref integration reports what the Sentry SDK can't see on AWS Lambda:
- Timeouts and oversized responses: Requests that time out or return more than the 6 MB limit of AWS Lambda fail outside of PHP-FPM. The integration reports them with the URL and method of the request. This works with Laravel and Symfony.
- Event handlers: Each SQS, EventBridge, or S3 invocation gets its own transaction and scope, and the exceptions thrown by the handler are reported.
- Cold starts: Requests and events that trigger a cold start get
lambda.cold-startandbref.startupspans. - AWS SDK calls: Calls of the clients you pass to
AwsSdkTracer::trace()become spans and breadcrumbs, likeSQS.SendMessage. - CloudWatch logs: Every event links to the CloudWatch logs of its invocation.
The integration requires PHP 8.2 or later and Bref 3. Install it with Composer:
composer require sentry/sentry-bref
With Laravel, that's it. With Symfony, register Sentry\Bref\Symfony\BrefSentryBundle in config/bundles.php. For other frameworks and all options, read the Bref guide.