BugSnag 在生产中不适用于 Laravel Vapor

Vik*_*Roy 1 laravel bugsnag aws-lambda laravel-vapor

我正在尝试通过 Laravel Vapor 将 BugSnag 与部署在 AWS Lambda 上的 Laravel 应用程序集成。

Bugsnag 在我的本地工作正常,但没有从 AWS Lamda 发送任何错误。

我也试过 Bugsnag::setBatchSending(false) 但它仍然不适合我。

任何想法可能是错误的?

Vik*_*Roy 7

Laravel Vapor 将默认日志记录配置更改为 stderr 通道,该通道由 AWS CloudWatch 捕获和记录。

使用包括 stderr 和 BugSnag 通道的堆栈驱动程序添加新的蒸气通道对我有用。

在 .env.production 中

LOG_CHANNEL=vapor

在 config/logging.php

return [

    "channels" => [        

        "vapor" => [
            "driver" => "stack",
            "channels" => ["bugsnag", "stderr"],
            "ignore_exceptions" => false,
        ],

        "bugsnag" => [
            "driver" => "bugsnag",
        ],

    ],

];
Run Code Online (Sandbox Code Playgroud)