Description
Stacktrace collection
While trying to implement an encoder that is compatible with GCP Stackdriver logging and also for GCP Stackdriver Error Reporting, I suspected that it's not working properly because the generated stacktrace is not compatible with what Error Reporting is expected.
The documentation says (https://cloud.google.com/error-reporting/docs/formatting-error-messages):
Go: Must be the return value of runtime.Stack()
The code in go sources (cloud.google.com/go/errors/errors.go
) shows that cloud.google.com/go/errors.(*Client).logInternal
indeed calls runtime.Stack
.
Unfortunately, the stack is grabbed by trackStacktrace
in stracktrace.go
, and there is apparently no other way around to provide the stracktrace.
Unless I'm missing something, we cannot provide the way the stacktrace is grabbed by zap