metastore

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const UnsymbolizedLocationLinesKeyPrefix = "v1/unsymbolized-locations/by-key/"

Unsymbolized locations are namespaced by their mapping ID. `v1/unsymbolized-locations/by-key/<hashed-mapping-key>/<hashed-location-key>`.

Variables

This section is empty.

Functions

func FunctionIDFromKey added in v0.12.0

func FunctionIDFromKey(key string) string

FunctionIDFromKey returns the function ID portion of the provided key.

func LocationIDFromKey added in v0.12.0

func LocationIDFromKey(key string) string

LocationIDFromKey returns the location ID portion of the provided key.

func LocationIDFromUnsymbolizedKey added in v0.12.0

func LocationIDFromUnsymbolizedKey(key string) string

LocationIDFromUnsymbolizedKey returns the location ID portion of the provided key.

func MakeFunctionKeyWithID added in v0.12.0

func MakeFunctionKeyWithID(functionID string) string

MakeFunctionKeyWithID returns the key to be used to store/lookup a function with the provided ID in a key-value store.

func MakeLocationKeyWithID added in v0.12.0

func MakeLocationKeyWithID(locationID string) string

MakeLocationKeyWithID returns the key to be used to store/lookup a location with the provided ID in a key-value store.

func MakeMappingKeyWithID added in v0.12.0

func MakeMappingKeyWithID(mappingID string) string

MakeMappingKeyWithID returns the key to be used to store/lookup a mapping with the provided ID in a key-value store.

func MakeStacktraceKeyWithID added in v0.12.0

func MakeStacktraceKeyWithID(stacktraceID string) string

MakeStacktraceKeyWithID returns the key to be used to store/lookup a mapping with the provided ID in a key-value store.

func MakeUnsymbolizedLocationKeyWithID added in v0.12.0

func MakeUnsymbolizedLocationKeyWithID(locationID string) string

MakeUnsymbolizedLocationKeyWithID returns the key to be used to store/lookup an unsymbolized location.

func MappingIDFromKey added in v0.12.0

func MappingIDFromKey(key string) string

MappingIDFromKey returns the mapping ID portion of the provided key.

func StacktraceIDFromKey added in v0.12.0

func StacktraceIDFromKey(key string) string

StacktraceIDFromKey returns the mapping ID portion of the provided key.

Types

type BadgerLogger

type BadgerLogger struct {
	Logger log.Logger
}

func (*BadgerLogger) Debugf

func (l *BadgerLogger) Debugf(f string, v ...interface{})

func (*BadgerLogger) Errorf

func (l *BadgerLogger) Errorf(f string, v ...interface{})

func (*BadgerLogger) Infof

func (l *BadgerLogger) Infof(f string, v ...interface{})

func (*BadgerLogger) Warningf

func (l *BadgerLogger) Warningf(f string, v ...interface{})

type BadgerMetastore

type BadgerMetastore struct {
	pb.UnimplementedMetastoreServiceServer
	// contains filtered or unexported fields
}

BadgerMetastore is an implementation of the metastore using the badger KV store.

func NewBadgerMetastore

func NewBadgerMetastore(
	logger log.Logger,
	reg prometheus.Registerer,
	tracer trace.Tracer,
	db *badger.DB,
) *BadgerMetastore

NewBadgerMetastore returns a new BadgerMetastore with using in-memory badger instance.

func (*BadgerMetastore) CreateLocationLines

func (*BadgerMetastore) Functions added in v0.12.0

func (*BadgerMetastore) GetOrCreateFunctions added in v0.12.0

func (*BadgerMetastore) GetOrCreateLocations added in v0.12.0

func (*BadgerMetastore) GetOrCreateMappings added in v0.12.0

func (*BadgerMetastore) GetOrCreateStacktraces added in v0.12.0

func (*BadgerMetastore) Locations added in v0.12.0

func (*BadgerMetastore) Mappings added in v0.12.0

func (*BadgerMetastore) Stacktraces added in v0.12.0

func (*BadgerMetastore) UnsymbolizedLocations added in v0.12.0

type InProcessClient added in v0.12.0

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

func NewInProcessClient added in v0.12.0

func NewInProcessClient(m pb.MetastoreServiceServer) *InProcessClient

func (*InProcessClient) CreateLocationLines added in v0.12.0

func (*InProcessClient) Functions added in v0.12.0

func (*InProcessClient) GetOrCreateFunctions added in v0.12.0

func (*InProcessClient) GetOrCreateLocations added in v0.12.0

func (*InProcessClient) GetOrCreateMappings added in v0.12.0

func (*InProcessClient) GetOrCreateStacktraces added in v0.12.0

func (*InProcessClient) Locations added in v0.12.0

func (*InProcessClient) Mappings added in v0.12.0

func (*InProcessClient) Stacktraces added in v0.12.0

func (*InProcessClient) UnsymbolizedLocations added in v0.12.0

type KeyMaker added in v0.18.0

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

KeyMaker is responsible for creating keys used in BadgerMetastore.

func NewKeyMaker added in v0.18.0

func NewKeyMaker() *KeyMaker

func (*KeyMaker) MakeFunctionID added in v0.18.0

func (m *KeyMaker) MakeFunctionID(f *pb.Function) string

MakeFunctionID returns a key for the function. Functions are uniquely identified by their name, filename, starting line number and system name.

func (*KeyMaker) MakeFunctionKey added in v0.18.0

func (m *KeyMaker) MakeFunctionKey(f *pb.Function) string

MakeFunctionKey returns the key to be used to store/lookup the function in a key-value store.

func (*KeyMaker) MakeLocationID added in v0.18.0

func (m *KeyMaker) MakeLocationID(l *pb.Location) string

MakeLocationID returns a key for the location that uniquely identifies the location. Locations are uniquely identified by their mapping ID and their address and whether the address is folded. If a location address is 0, then the lines are expected to be non empty and to be already resolved as they cannot be asynchronously symbolized. The lines are then taken into the location key.

func (*KeyMaker) MakeLocationKey added in v0.18.0

func (m *KeyMaker) MakeLocationKey(l *pb.Location) string

MakeLocationKey returns the key to be used to store/lookup the location in a key-value store.

func (*KeyMaker) MakeMappingID added in v0.18.0

func (m *KeyMaker) MakeMappingID(mp *pb.Mapping) string

MakeMappingID returns a key for the mapping. Mappings are uniquely identified by their build id (or file if build id is not available), their size, and offset.

func (*KeyMaker) MakeMappingKey added in v0.18.0

func (m *KeyMaker) MakeMappingKey(mp *pb.Mapping) string

MakeMappingKey returns the key to be used to store/lookup the mapping in a key-value store.

func (*KeyMaker) MakeProfileLocationID added in v0.19.0

func (m *KeyMaker) MakeProfileLocationID(l *profile.Location) string

func (*KeyMaker) MakeStacktraceID added in v0.18.0

func (m *KeyMaker) MakeStacktraceID(s *pb.Stacktrace) string

MakeStacktraceID returns a key for the stacktrace. Stacktraces are uniquely identified by their unique combination and order of locations.

func (*KeyMaker) MakeStacktraceKey added in v0.18.0

func (m *KeyMaker) MakeStacktraceKey(s *pb.Stacktrace) string

MakeStacktraceKey returns the key to be used to store/lookup the mapping in a key-value store.

Jump to

Keyboard shortcuts

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