Documentation
¶
Index ¶
- Constants
- func FunctionIDFromKey(key string) string
- func LocationIDFromKey(key string) string
- func LocationIDFromUnsymbolizedKey(key string) string
- func MakeFunctionKeyWithID(functionID string) string
- func MakeLocationKeyWithID(locationID string) string
- func MakeMappingKeyWithID(mappingID string) string
- func MakeStacktraceKeyWithID(stacktraceID string) string
- func MakeUnsymbolizedLocationKeyWithID(locationID string) string
- func MappingIDFromKey(key string) string
- func StacktraceIDFromKey(key string) string
- type BadgerLogger
- type BadgerMetastore
- func (m *BadgerMetastore) CreateLocationLines(ctx context.Context, r *pb.CreateLocationLinesRequest) (*pb.CreateLocationLinesResponse, error)
- func (m *BadgerMetastore) Functions(ctx context.Context, r *pb.FunctionsRequest) (*pb.FunctionsResponse, error)
- func (m *BadgerMetastore) GetOrCreateFunctions(ctx context.Context, r *pb.GetOrCreateFunctionsRequest) (*pb.GetOrCreateFunctionsResponse, error)
- func (m *BadgerMetastore) GetOrCreateLocations(ctx context.Context, r *pb.GetOrCreateLocationsRequest) (*pb.GetOrCreateLocationsResponse, error)
- func (m *BadgerMetastore) GetOrCreateMappings(ctx context.Context, r *pb.GetOrCreateMappingsRequest) (*pb.GetOrCreateMappingsResponse, error)
- func (m *BadgerMetastore) GetOrCreateStacktraces(ctx context.Context, r *pb.GetOrCreateStacktracesRequest) (*pb.GetOrCreateStacktracesResponse, error)
- func (m *BadgerMetastore) Locations(ctx context.Context, r *pb.LocationsRequest) (*pb.LocationsResponse, error)
- func (m *BadgerMetastore) Mappings(ctx context.Context, r *pb.MappingsRequest) (*pb.MappingsResponse, error)
- func (m *BadgerMetastore) Stacktraces(ctx context.Context, r *pb.StacktracesRequest) (*pb.StacktracesResponse, error)
- func (m *BadgerMetastore) UnsymbolizedLocations(ctx context.Context, r *pb.UnsymbolizedLocationsRequest) (*pb.UnsymbolizedLocationsResponse, error)
- type InProcessClient
- func (c *InProcessClient) CreateLocationLines(ctx context.Context, in *pb.CreateLocationLinesRequest, ...) (*pb.CreateLocationLinesResponse, error)
- func (c *InProcessClient) Functions(ctx context.Context, in *pb.FunctionsRequest, opts ...grpc.CallOption) (*pb.FunctionsResponse, error)
- func (c *InProcessClient) GetOrCreateFunctions(ctx context.Context, in *pb.GetOrCreateFunctionsRequest, ...) (*pb.GetOrCreateFunctionsResponse, error)
- func (c *InProcessClient) GetOrCreateLocations(ctx context.Context, in *pb.GetOrCreateLocationsRequest, ...) (*pb.GetOrCreateLocationsResponse, error)
- func (c *InProcessClient) GetOrCreateMappings(ctx context.Context, in *pb.GetOrCreateMappingsRequest, ...) (*pb.GetOrCreateMappingsResponse, error)
- func (c *InProcessClient) GetOrCreateStacktraces(ctx context.Context, in *pb.GetOrCreateStacktracesRequest, ...) (*pb.GetOrCreateStacktracesResponse, error)
- func (c *InProcessClient) Locations(ctx context.Context, in *pb.LocationsRequest, opts ...grpc.CallOption) (*pb.LocationsResponse, error)
- func (c *InProcessClient) Mappings(ctx context.Context, in *pb.MappingsRequest, opts ...grpc.CallOption) (*pb.MappingsResponse, error)
- func (c *InProcessClient) Stacktraces(ctx context.Context, in *pb.StacktracesRequest, opts ...grpc.CallOption) (*pb.StacktracesResponse, error)
- func (c *InProcessClient) UnsymbolizedLocations(ctx context.Context, in *pb.UnsymbolizedLocationsRequest, ...) (*pb.UnsymbolizedLocationsResponse, error)
- type KeyMaker
- func (m *KeyMaker) MakeFunctionID(f *pb.Function) string
- func (m *KeyMaker) MakeFunctionKey(f *pb.Function) string
- func (m *KeyMaker) MakeLocationID(l *pb.Location) string
- func (m *KeyMaker) MakeLocationKey(l *pb.Location) string
- func (m *KeyMaker) MakeMappingID(mp *pb.Mapping) string
- func (m *KeyMaker) MakeMappingKey(mp *pb.Mapping) string
- func (m *KeyMaker) MakeProfileLocationID(l *profile.Location) string
- func (m *KeyMaker) MakeStacktraceID(s *pb.Stacktrace) string
- func (m *KeyMaker) MakeStacktraceKey(s *pb.Stacktrace) string
Constants ¶
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
FunctionIDFromKey returns the function ID portion of the provided key.
func LocationIDFromKey ¶ added in v0.12.0
LocationIDFromKey returns the location ID portion of the provided key.
func LocationIDFromUnsymbolizedKey ¶ added in v0.12.0
LocationIDFromUnsymbolizedKey returns the location ID portion of the provided key.
func MakeFunctionKeyWithID ¶ added in v0.12.0
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
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
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
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
MakeUnsymbolizedLocationKeyWithID returns the key to be used to store/lookup an unsymbolized location.
func MappingIDFromKey ¶ added in v0.12.0
MappingIDFromKey returns the mapping ID portion of the provided key.
func StacktraceIDFromKey ¶ added in v0.12.0
StacktraceIDFromKey returns the mapping ID portion of the provided key.
Types ¶
type BadgerLogger ¶
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 (m *BadgerMetastore) CreateLocationLines(ctx context.Context, r *pb.CreateLocationLinesRequest) (*pb.CreateLocationLinesResponse, error)
func (*BadgerMetastore) Functions ¶ added in v0.12.0
func (m *BadgerMetastore) Functions(ctx context.Context, r *pb.FunctionsRequest) (*pb.FunctionsResponse, error)
func (*BadgerMetastore) GetOrCreateFunctions ¶ added in v0.12.0
func (m *BadgerMetastore) GetOrCreateFunctions(ctx context.Context, r *pb.GetOrCreateFunctionsRequest) (*pb.GetOrCreateFunctionsResponse, error)
func (*BadgerMetastore) GetOrCreateLocations ¶ added in v0.12.0
func (m *BadgerMetastore) GetOrCreateLocations(ctx context.Context, r *pb.GetOrCreateLocationsRequest) (*pb.GetOrCreateLocationsResponse, error)
func (*BadgerMetastore) GetOrCreateMappings ¶ added in v0.12.0
func (m *BadgerMetastore) GetOrCreateMappings(ctx context.Context, r *pb.GetOrCreateMappingsRequest) (*pb.GetOrCreateMappingsResponse, error)
func (*BadgerMetastore) GetOrCreateStacktraces ¶ added in v0.12.0
func (m *BadgerMetastore) GetOrCreateStacktraces(ctx context.Context, r *pb.GetOrCreateStacktracesRequest) (*pb.GetOrCreateStacktracesResponse, error)
func (*BadgerMetastore) Locations ¶ added in v0.12.0
func (m *BadgerMetastore) Locations(ctx context.Context, r *pb.LocationsRequest) (*pb.LocationsResponse, error)
func (*BadgerMetastore) Mappings ¶ added in v0.12.0
func (m *BadgerMetastore) Mappings(ctx context.Context, r *pb.MappingsRequest) (*pb.MappingsResponse, error)
func (*BadgerMetastore) Stacktraces ¶ added in v0.12.0
func (m *BadgerMetastore) Stacktraces(ctx context.Context, r *pb.StacktracesRequest) (*pb.StacktracesResponse, error)
func (*BadgerMetastore) UnsymbolizedLocations ¶ added in v0.12.0
func (m *BadgerMetastore) UnsymbolizedLocations(ctx context.Context, r *pb.UnsymbolizedLocationsRequest) (*pb.UnsymbolizedLocationsResponse, error)
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 (c *InProcessClient) CreateLocationLines(ctx context.Context, in *pb.CreateLocationLinesRequest, opts ...grpc.CallOption) (*pb.CreateLocationLinesResponse, error)
func (*InProcessClient) Functions ¶ added in v0.12.0
func (c *InProcessClient) Functions(ctx context.Context, in *pb.FunctionsRequest, opts ...grpc.CallOption) (*pb.FunctionsResponse, error)
func (*InProcessClient) GetOrCreateFunctions ¶ added in v0.12.0
func (c *InProcessClient) GetOrCreateFunctions(ctx context.Context, in *pb.GetOrCreateFunctionsRequest, opts ...grpc.CallOption) (*pb.GetOrCreateFunctionsResponse, error)
func (*InProcessClient) GetOrCreateLocations ¶ added in v0.12.0
func (c *InProcessClient) GetOrCreateLocations(ctx context.Context, in *pb.GetOrCreateLocationsRequest, opts ...grpc.CallOption) (*pb.GetOrCreateLocationsResponse, error)
func (*InProcessClient) GetOrCreateMappings ¶ added in v0.12.0
func (c *InProcessClient) GetOrCreateMappings(ctx context.Context, in *pb.GetOrCreateMappingsRequest, opts ...grpc.CallOption) (*pb.GetOrCreateMappingsResponse, error)
func (*InProcessClient) GetOrCreateStacktraces ¶ added in v0.12.0
func (c *InProcessClient) GetOrCreateStacktraces(ctx context.Context, in *pb.GetOrCreateStacktracesRequest, opts ...grpc.CallOption) (*pb.GetOrCreateStacktracesResponse, error)
func (*InProcessClient) Locations ¶ added in v0.12.0
func (c *InProcessClient) Locations(ctx context.Context, in *pb.LocationsRequest, opts ...grpc.CallOption) (*pb.LocationsResponse, error)
func (*InProcessClient) Mappings ¶ added in v0.12.0
func (c *InProcessClient) Mappings(ctx context.Context, in *pb.MappingsRequest, opts ...grpc.CallOption) (*pb.MappingsResponse, error)
func (*InProcessClient) Stacktraces ¶ added in v0.12.0
func (c *InProcessClient) Stacktraces(ctx context.Context, in *pb.StacktracesRequest, opts ...grpc.CallOption) (*pb.StacktracesResponse, error)
func (*InProcessClient) UnsymbolizedLocations ¶ added in v0.12.0
func (c *InProcessClient) UnsymbolizedLocations(ctx context.Context, in *pb.UnsymbolizedLocationsRequest, opts ...grpc.CallOption) (*pb.UnsymbolizedLocationsResponse, error)
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
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
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
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
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
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
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 (*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.