【发布时间】:2019-01-07 17:51:16
【问题描述】:
是否可以使用 Fluentd 和日志文件将 PHP Stacktrace 和其他错误显示到 Stackdriver 错误报告中?
在Java,Python或Go中的某些应用程序中,错误地将在StackDriver错误报告中自动显示错误,但不使用PHP,我不知道为什么。例如,这类错误会自动发送到 Google Cloud Logging,但不会显示在错误报告中。
[error] 8795#8795: *6 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Exception: Always throw this error in /var/www/example.com/index.php
更新 1
我需要此功能来监控 GKE 集群中托管的大约 20 个 PHP Symphony 应用程序以及 Compute Engine 中的其他一些应用程序。每个应用程序都定义了一个部署并将日志输出到标准输出或/var/log/nginx/error.log(用于计算引擎),非常简单。
您知道如何在不修改我的应用程序的情况下在错误报告中获取这些错误吗?
【问题讨论】:
标签: php nginx google-cloud-platform stackdriver google-cloud-error-reporting