0
我目前正在尝试将错误记录记录到来自Google容器引擎的Stackdriver错误报告。我使用的是GKE内置的基于fluentd的Stackdriver Logging代理,效果很好。然而,当我按照说明书(https://cloud.google.com/error-reporting/docs/formatting-error-messages)记录错误,我没有看到它出现在为Stackdriver错误报告谷歌容器引擎记录到Stackdriver错误报告
有效载荷我的Stackdriver记录看到的是
{
insertId: "xatjb4fltv246"
jsonPayload: {
stream: "event"
message: "path was incorrect"
environment: "production"
event_type: "RAILS_ERROR"
context: {
path: "/2",
reportLocation: {
functionName: "foo"
filePath: "/something.js"
lineNumber: 3
}
request_id: "3149e5c4-3192-4a9c-a123-b4dedf5a9e07"
}
timestamp: 1492205840
serviceContext: {
service: "nambrotdotcom"
}
}
resource: {…}
timestamp: "2017-04-14T21:37:20Z"
severity: "INFO"
labels: {…}
logName: "projects/nambrotdotcom/logs/web"
}
如果我理解正确的话,这应该没事?
编辑:
我根据故障排除页记录了人工操作误差,它能正常工作。我在手动记录的错误和从GKE记录的有效负载之间唯一的差别是日志名称和标签不同,但这不应该是一个因素?
就是这样!谢谢! – nambrot