I am trying the BugSnag integration with a Laravel app deployed on AWS Lambda through Laravel Vapor.
Bugsnag is working fine on my local but doesn’t send any error from AWS Lamda.
I also tried Bugsnag::setBatchSending(false) but it is still not working for me.
Any ideas what can be wrong?
Laravel Vapor changes default logging configuration to the stderr channel, which is captured and logged by AWS CloudWatch.
Adding a new vapor channel using the stack driver that includes both the stderr and BugSnag channels worked for me.
In .env.production
LOG_CHANNEL=vapor
In config/logging.php
return [
"channels" => [
"vapor" => [
"driver" => "stack",
"channels" => ["bugsnag", "stderr"],
"ignore_exceptions" => false,
],
"bugsnag" => [
"driver" => "bugsnag",
],
],
];