简体   繁体   English

Google容器引擎记录到Stackdriver错误报告

[英]Google container engine logging to Stackdriver Error Reporting

I'm currently trying to log errors to Stackdriver Error Reporting from Google Container Engine. 我目前正在尝试将错误记录到Google Container Engine的Stackdriver Error Reporting中。 I'm using the built-in fluentd-based Stackdriver Logging agent from GKE which works great. 我使用的是GKE内置的,基于Fluentd的Stackdriver Logging代理,效果很好。 However, when I log an error according to the specification( https://cloud.google.com/error-reporting/docs/formatting-error-messages ), I do not see it appear in Stackdriver Error Reporting 但是,当我根据规范记录错误时( https://cloud.google.com/error-reporting/docs/formatting-error-messages ),我看不到它出现在Stackdriver Error Reporting中

The payload I see in Stackdriver Logging is 我在Stackdriver Logging中看到的有效负载是

{
 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"   
}

If I understand correctly, this should be fine? 如果我理解正确,应该没问题吗?

EDIT: 编辑:

I logged a manual error according to the trouble shooting page and it worked fine. 我根据故障排除页面记录了一个手动错误,并且工作正常。 The only difference I see between the error I manually logged and the payload I logged from GKE is that the logname and labels are different, but that shouldn't be a factor? 我看到的手动记录的错误和我从GKE记录的有效负载之间的唯一区别是,日志名称和标签不同,但这不应该是一个因素吗?

Error Reporting is looking for severity ERROR or higher, but will also consider DEFAULT in most cases. 错误报告正在寻找严重性为ERROR或更高的ERROR ,但在大多数情况下也会考虑使用DEFAULT The problem is the severity: "INFO" value in the log entry. 问题是severity: "INFO"日志条目中的severity: "INFO"值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在App Engine Standard python中使用Google Stackdriver日志时出错 - Error using Google Stackdriver Logging in App Engine Standard python Google App Engine错误未显示在使用Flask的StackDriver错误报告中 - Google App Engine Errors not showing up in StackDriver Error Reporting using Flask Google Stackdriver使用Redis队列登录App Engine(Python) - Google Stackdriver logging in App Engine (Python) using Redis queue 谷歌应用引擎。 堆栈驱动程序。 使用 Java 进行日志记录 - Google App Engine. Stackdriver. Logging with Java 如何使用错误报告在 BigQuery 中加入 Google App Engine 的日志记录表 - How to join Google App Engine's logging table in BigQuery with Error Reporting 谷歌应用引擎错误报告不起作用 - google app engine Error reporting does not work Google App Engine在kubernetes容器应用中请求样式日志记录 - Google App Engine request style logging in a kubernetes container app App Engine Stackdriver记录到全局日志而不是服务日志 - App Engine stackdriver logging to Global log instead of service log 如何在App Engine Flex Java环境中使用Stackdriver Structured日志记录 - How to use Stackdriver Structured Logging in App Engine Flex Java environment 如何从 StackDriver Logging API 反序列化 App Engine 应用程序日志? - How to deserialize App Engine application logs from StackDriver Logging API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM