将浏览器JavaScript错误发送到Stackdriver错误报告

时间:2016-11-24 13:45:55

标签: javascript google-cloud-platform error-reporting stackdriver google-cloud-error-reporting

我有一个客户端JavaScript应用程序,我想报告Stackdriver错误报告的错误和异常。

1 个答案:

答案 0 :(得分:4)

Stackdriver错误报告可以处理来自客户端JavaScript的错误。

您需要一个Google Cloud Console项目。 然后enable the Stackdriver Error Reporting APIget an API key

报告客户端错误是通过使用API​​密钥调用report API endpoint来完成的。

然后,您可以使用此JavaScript模块规范化异常堆栈跟踪,并以预期的格式将它们发送到Stackdriver:https://github.com/GoogleCloudPlatform/stackdriver-errors-js

相关问题