Help us shape the future of Go! Take the 2026 Go Developer Survey

symbolizer

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotValidElf = errors.New("not a valid ELF file")
	ErrNoDebuginfo = errors.New("no debug info found")
	ErrLinerFailed = errors.New("liner creation failed")
)

Functions

func UnsymbolizableMapping added in v0.12.0

func UnsymbolizableMapping(m *pb.Mapping) bool

UnsymbolizableMapping returns true if a mapping points to a binary for which locations can't be symbolized in principle, at least now. Examples are "[vdso]", [vsyscall]" and some others, see the code.

Types

type DebuginfoFetcher added in v0.15.0

type DebuginfoFetcher interface {
	// Fetch ensures that the debug info for the given build ID is available on
	// a local filesystem and returns a path to it.
	FetchDebuginfo(ctx context.Context, dbginfo *debuginfopb.Debuginfo) (io.ReadCloser, error)
}

type DebuginfoMetadata added in v0.15.0

type DebuginfoMetadata interface {
	SetQuality(ctx context.Context, buildID string, quality *debuginfopb.DebuginfoQuality) error
	Fetch(ctx context.Context, buildID string) (*debuginfopb.Debuginfo, error)
}

type MappingLocations added in v0.12.0

type MappingLocations struct {
	Mapping   *pb.Mapping
	Locations []*pb.Location

	// LocationsLines is a list of lines per location.
	LocationsLines [][]profile.LocationLine
}

type Option added in v0.15.0

type Option func(*Symbolizer)

func WithAttemptThreshold added in v0.15.0

func WithAttemptThreshold(t int) Option

func WithDemangleMode added in v0.15.0

func WithDemangleMode(mode string) Option

type Symbolizer

type Symbolizer struct {
	// contains filtered or unexported fields
}

func New

func New(
	logger log.Logger,
	reg prometheus.Registerer,
	metadata DebuginfoMetadata,
	metastore pb.MetastoreServiceClient,
	debuginfo DebuginfoFetcher,
	tmpDir string,
	batchSize uint32,
	opts ...Option,
) *Symbolizer

func (*Symbolizer) Run

func (s *Symbolizer) Run(ctx context.Context, interval time.Duration) error

func (*Symbolizer) Symbolize added in v0.13.0

func (s *Symbolizer) Symbolize(ctx context.Context, locations []*pb.Location) error

Jump to

Keyboard shortcuts

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