symbolizer

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReaderAtCloser

func NewReaderAtCloser(data []byte) interface {
	io.ReadCloser
	io.ReaderAt
}

Types

type Config

type Config struct {
	DebuginfodURL            string `yaml:"debuginfod_url" category:"advanced"`
	MaxDebuginfodConcurrency int    `yaml:"max_debuginfod_concurrency" category:"advanced"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) Validate

func (cfg *Config) Validate() error

type DebuginfodClient

type DebuginfodClient interface {
	FetchDebuginfo(ctx context.Context, buildID string) (io.ReadCloser, error)
}

type DebuginfodClientConfig

type DebuginfodClientConfig struct {
	BaseURL       string
	HTTPClient    *http.Client
	BackoffConfig backoff.Config
	UserAgent     string

	NotFoundCacheMaxItems int64
	NotFoundCacheTTL      time.Duration
}

DebuginfodClientConfig holds configuration for the debuginfod client.

type DebuginfodHTTPClient

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

DebuginfodHTTPClient implements the DebuginfodClient interface using HTTP.

func NewDebuginfodClient

func NewDebuginfodClient(logger log.Logger, baseURL string, metrics *metrics, limits Limits) (*DebuginfodHTTPClient, error)

NewDebuginfodClient creates a new client for fetching debug information from a debuginfod server.

func NewDebuginfodClientWithConfig

func NewDebuginfodClientWithConfig(logger log.Logger, cfg DebuginfodClientConfig, metrics *metrics, limits Limits) (*DebuginfodHTTPClient, error)

NewDebuginfodClientWithConfig creates a new client with the specified configuration.

func (*DebuginfodHTTPClient) FetchDebuginfo

func (c *DebuginfodHTTPClient) FetchDebuginfo(ctx context.Context, buildID string) (io.ReadCloser, error)

FetchDebuginfo fetches the debuginfo file for a specific build ID.

Concurrent callers for the same build ID share one fetch, detached from any single caller's cancellation. The error contract follows from that: a done caller gets its own context error without waiting for the shared fetch to finish, and every other error comes from the shared fetch — it may wrap a context error (e.g. the HTTP client's timeout) that says nothing about the caller's own context.

type ErrSymbolSizeBytesExceedsLimit

type ErrSymbolSizeBytesExceedsLimit struct {
	Limit int64
}

func (*ErrSymbolSizeBytesExceedsLimit) Error

type LidiaTableCacheEntry

type LidiaTableCacheEntry struct {
	Data []byte // Processed Lidia table data
}

LidiaTableCacheEntry represents a cached Lidia table with its binary layout information

type Limits

type Limits interface {
	SymbolizerMaxSymbolSizeBytes(tenantID string) int
}

type Resolver added in v2.2.0

type Resolver interface {
	Resolve(ctx context.Context, buildID, binaryName string, addrs []uint64) ([][]lidia.SourceInfoFrame, error)
}

Resolver resolves debug symbols for addresses within a single binary (identified by buildID). result[i] is aligned to addrs[i]; a nil/empty slice at index i means address i could not be resolved. A non-nil error is returned only when the caller's own ctx is done (context.Canceled or context.DeadlineExceeded), in which case result is nil; any other failure degrades to unresolved slots. A buildID that is empty or fails validation resolves nothing: every result slot is nil.

type Symbolizer

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

func New

func New(logger log.Logger, cfg Config, reg prometheus.Registerer, storageBucket objstore.Bucket, limits Limits) (*Symbolizer, error)

func (*Symbolizer) Resolve added in v2.2.0

func (s *Symbolizer) Resolve(ctx context.Context, buildID, binaryName string, addrs []uint64) ([][]lidia.SourceInfoFrame, error)

Resolve implements Resolver.

func (*Symbolizer) SymbolizePprof

func (s *Symbolizer) SymbolizePprof(ctx context.Context, profile *googlev1.Profile) error

Jump to

Keyboard shortcuts

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