MCPcopy Index your code
hub / github.com/cockroachdb/errors / convertPkgStack

Function convertPkgStack

withstack/reportable.go:74–84  ·  view source on GitHub ↗

convertPkgStack converts a StackTrace from github.com/pkg/errors to a Stacktrace in github.com/getsentry/sentry-go.

(st errbase.StackTrace)

Source from the content-addressed store, hash-verified

72// convertPkgStack converts a StackTrace from github.com/pkg/errors
73// to a Stacktrace in github.com/getsentry/sentry-go.
74func convertPkgStack(st errbase.StackTrace) *ReportableStackTrace {
75 // If there are no frames, the entire stacktrace is nil.
76 if len(st) == 0 {
77 return nil
78 }
79
80 // Note: the stack trace logic changed between go 1.11 and 1.12.
81 // Trying to analyze the frame PCs point-wise will cause
82 // the output to change between the go versions.
83 return parsePrintedStack(fmt.Sprintf("%+v", st))
84}
85
86// trimPath is a copy of the same function in package sentry-go.
87func trimPath(filename string) string {

Callers 1

GetReportableStackTraceFunction · 0.85

Calls 1

parsePrintedStackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…