本文介绍了GCP Cloud Functions不再通过回溯对错误进行正确分类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用云功能已有一年多了,在过去的一个月左右,发生了变化,这使得对错误进行故障排除变得更加困难.

I've been using Cloud Functions for over a year now and in the last month or so, there's been a change that's made it much more difficult to troubleshoot errors.

以前,如下所示的简单操作会在日志记录中生成具有错误行号和追溯信息的错误(此处为 KeyError:'test'),但现在进行日志记录只是显示函数执行耗时X毫秒,状态为:崩溃" ,归类在 Debug 下.

Previously, something as simple as the following would generate an Error in Logging with the offending line number and traceback (KeyError: 'test' here), but now Logging just shows Function execution took X ms, finished with status: 'crash' categorized under Debug.

def hello_world(request):
    request_json = request.get_json()
    print(request_json)
    print(request_json['test'])
    return f'Hello World!'

有人对发生的事情有任何见解吗,请提供有关如何在发生崩溃的情况下继续对Cloud Functions进行故障排除的建议?预先谢谢你!

Does anybody have any insights on what happened, and advice on how to proceed to troubleshoot Cloud Functions with crashes going forward please? Thank you in advance!

推荐答案

@chengineer在注释线程中提供了答案,此问题影响了Cloud Functions,目前正在修复中.以下更新将发布在 https://issuetracker.google.com/issues/155215191

@chengineer provided the answer in the comment thread, this issue affected the Cloud Functions and it is currently under fix. The following updates will be posted on https://issuetracker.google.com/issues/155215191.

这篇关于GCP Cloud Functions不再通过回溯对错误进行正确分类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 14:14