From 89b979b7247a74cb08e1c98d541549ae4f6d8bee Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Mon, 11 Oct 2021 15:14:24 +0200 Subject: [PATCH] docs: Explain Frame.Module and Frame.Package --- stacktrace.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/stacktrace.go b/stacktrace.go index 1c3320f5c..1f9c0679e 100644 --- a/stacktrace.go +++ b/stacktrace.go @@ -160,9 +160,16 @@ func extractXErrorsPC(err error) []uintptr { // Frame represents a function call and it's metadata. Frames are associated // with a Stacktrace. type Frame struct { - Function string `json:"function,omitempty"` - Symbol string `json:"symbol,omitempty"` - Module string `json:"module,omitempty"` + Function string `json:"function,omitempty"` + Symbol string `json:"symbol,omitempty"` + // Module is, despite the name, the Sentry protocol equivalent of a Go + // package's import path. + Module string `json:"module,omitempty"` + // Package is not used for Go stack trace frames. In other platforms it + // refers to a container where the Module can be found. For example, a + // Java JAR, a .NET Assembly, or a native dynamic library. + // It exists for completeness, allowing the construction and reporting + // of custom event payloads. Package string `json:"package,omitempty"` Filename string `json:"filename,omitempty"` AbsPath string `json:"abs_path,omitempty"`