stacktrace

package
v1.45.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package stacktrace Port of the stack trace logic from zap logger so that we can add stacktraces and origins to API Errors

Index

Constants

View Source
const (
	// First captures only the first frame.
	First stacktraceDepth = iota

	// Full captures the entire call stack, allocating more
	// storage for it if needed.
	Full
)

Variables

This section is empty.

Functions

func Capture

func Capture(skip int, depth stacktraceDepth) *stacktrace

Capture captures a stack trace of the specified depth, skipping the provided number of frames. skip=0 identifies the origin of captureStacktrace.

The origin must call Free on the returned stacktrace after using it.

func CaptureAsString

func CaptureAsString(skip int) string

func NewStackFormatter

func NewStackFormatter(b *buffer.Buffer) stackFormatter

NewStackFormatter builds a new stackFormatter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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