stacktrace

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFrames

func ExtractFrames(pcs []uintptr, err error) *sentry.Stacktrace

PATCH(jwoglom): ExtractFrames is split-out code from ExtractStacktrace which allows for frame extraction to be performed given glog PC pointers. The err argument is optional, if it is nil augmentation of xerror info is not provided.

func ExtractStacktrace

func ExtractStacktrace(err error) *sentry.Stacktrace

ExtractStacktrace creates a new Stacktrace based on the given error.

func GetXErrorStackTrace

func GetXErrorStackTrace(callSite sentry.Stacktrace, err error) *sentry.Stacktrace

GetXErrorStackTrace returns a combined stack trace incorporating the stack of the logging call site and that of the error it's logging.

func GopathRelativeFile

func GopathRelativeFile(absPath string) string

GopathRelativeFile sanitizes the path to remove GOPATH and obtain the import path. Concretely, this takes the path after the last instance of '/src/'. This may omit some of the path if there is an src directory in a package import path. If there are no /src/ directories in the path, the base filename is returned.

func GuessAbsPath

func GuessAbsPath(f string) string

GuessAbsPath guesses the proper absolute path if it is not provided, making a best-effort guess so that Sentry can attempt to augment the error with source code

func NewFrame

func NewFrame(f runtime.Frame) sentry.Frame

NewFrame assembles a stacktrace frame out of runtime.Frame.

func SourceFromStack

func SourceFromStack(s *sentry.Stacktrace) string

SourceFromStack retrieves the function and line where the event was logged from in the format "file.Function:118".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL