Go에서 Stackdriver 오류보고에 오류를 기록하려고합니다. 오류보고의 첫 번째 페이지에는 "응용 프로그램 오류를 Google 스택 드라이버 로깅에 기록하거나 ..."(https://cloud.google.com/error-reporting/docs/)로 표시 할 수 있습니다. Go 클라이언트 라이브러리로 어떻게 할 수 있습니까? Stackdriver 로깅에 오류를 기록하는 방법 Stackdriver 로깅을 통해 오류를보고하는 방법
로깅 라이브러리가 제공하는 Entry
github.com/GoogleCloudPlatform/.../logging.go#L412
type Entry struct {
Timestamp time.Time
Severity Severity
Payload interface{}
Labels map[string]string
InsertID string
HTTPRequest *HTTPRequest
Operation *logpb.LogEntryOperation
LogName string
Resource *mrpb.MonitoredResource
}
내가 페이로드에 this JSON 구조를 마샬링해야합니까? 또는 stacktrace를 문자열로 삽입 할 수 있습니까? docs에서