Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateBase(ei *profilestorepb.ExecutableInfo, start, limit, offset uint64) (uint64, error)
- func LabelNamesFromSamples(takenLabels map[string]string, stringTable []string, samples []*pprofpb.Sample, ...)
- func LabelsFromSample(takenLabels map[string]string, stringTable []string, plabels []*pprofpb.Label) (map[string]string, map[string]int64)
- func NormalizeAddress(addr uint64, ei *profilestorepb.ExecutableInfo, start, limit, offset uint64) (uint64, error)
- func ValidatePprofProfile(p *pprofpb.Profile, ei []*profilestorepb.ExecutableInfo) error
- type MetastoreNormalizer
- func (n *MetastoreNormalizer) NormalizeFunctions(ctx context.Context, functions []*pprofpb.Function, stringTable []string) ([]*pb.Function, error)
- func (n *MetastoreNormalizer) NormalizeLocations(ctx context.Context, locations []*pprofpb.Location, ...) ([]*pb.Location, error)
- func (n *MetastoreNormalizer) NormalizeMappings(ctx context.Context, mappings []*pprofpb.Mapping, stringTable []string) ([]mappingNormalizationInfo, error)
- func (n *MetastoreNormalizer) NormalizePprof(ctx context.Context, name string, takenLabelNames map[string]string, ...) ([]*profile.NormalizedProfile, error)
- func (n *MetastoreNormalizer) NormalizeStacktraces(ctx context.Context, samples []*pprofpb.Sample, locations []*pb.Location) ([]*pb.Stacktrace, error)
- func (n *MetastoreNormalizer) NormalizeWriteRawRequest(ctx context.Context, req *profilestorepb.WriteRawRequest) (NormalizedWriteRawRequest, error)
- type NormalizedWriteRawRequest
- type Normalizer
- type Series
Constants ¶
View Source
const (
UnsymolizableLocationAddress = 0x0
)
Variables ¶
View Source
var ErrMissingNameLabel = errors.New("missing __name__ label")
Functions ¶
func CalculateBase ¶
func CalculateBase(ei *profilestorepb.ExecutableInfo, start, limit, offset uint64) (uint64, error)
Base determines the base address to subtract from virtual address to get symbol table address. For an executable, the base is 0. Otherwise, it's a shared library, and the base is the address where the mapping starts. The kernel needs special handling.
func LabelNamesFromSamples ¶
func LabelsFromSample ¶
func LabelsFromSample(takenLabels map[string]string, stringTable []string, plabels []*pprofpb.Label) (map[string]string, map[string]int64)
TODO: support num label units.
func NormalizeAddress ¶
func NormalizeAddress(addr uint64, ei *profilestorepb.ExecutableInfo, start, limit, offset uint64) (uint64, error)
func ValidatePprofProfile ¶
func ValidatePprofProfile(p *pprofpb.Profile, ei []*profilestorepb.ExecutableInfo) error
Types ¶
type MetastoreNormalizer ¶
type MetastoreNormalizer struct {
// contains filtered or unexported fields
}
func NewNormalizer ¶
func NewNormalizer( metastore pb.MetastoreServiceClient, enableAddressNormalization bool, addressNormalizationFailed prometheus.Counter, ) *MetastoreNormalizer
func (*MetastoreNormalizer) NormalizeFunctions ¶
func (*MetastoreNormalizer) NormalizeLocations ¶
func (n *MetastoreNormalizer) NormalizeLocations( ctx context.Context, locations []*pprofpb.Location, mappingsInfo []mappingNormalizationInfo, mappings []*pprofpb.Mapping, functions []*pb.Function, normalizedAddress bool, stringTable []string, executableInfo []*profilestorepb.ExecutableInfo, ) ([]*pb.Location, error)
func (*MetastoreNormalizer) NormalizeMappings ¶
func (*MetastoreNormalizer) NormalizePprof ¶
func (n *MetastoreNormalizer) NormalizePprof( ctx context.Context, name string, takenLabelNames map[string]string, p *pprofpb.Profile, normalizedAddress bool, executableInfo []*profilestorepb.ExecutableInfo, ) ([]*profile.NormalizedProfile, error)
func (*MetastoreNormalizer) NormalizeStacktraces ¶
func (n *MetastoreNormalizer) NormalizeStacktraces(ctx context.Context, samples []*pprofpb.Sample, locations []*pb.Location) ([]*pb.Stacktrace, error)
func (*MetastoreNormalizer) NormalizeWriteRawRequest ¶
func (n *MetastoreNormalizer) NormalizeWriteRawRequest(ctx context.Context, req *profilestorepb.WriteRawRequest) (NormalizedWriteRawRequest, error)
NormalizeWriteRawRequest normalizes the profiles (mappings, functions, locations, stack traces) to prepare for ingestion. It also validates label names of profiles' series, decompresses the samples, unmarshals and validates them.
type Normalizer ¶
type Normalizer interface { NormalizePprof( ctx context.Context, name string, takenLabelNames map[string]string, p *pprofpb.Profile, normalizedAddress bool, executableInfo []*profilestorepb.ExecutableInfo, ) ([]*profile.NormalizedProfile, error) NormalizeWriteRawRequest( ctx context.Context, req *profilestorepb.WriteRawRequest, ) (NormalizedWriteRawRequest, error) }
Click to show internal directories.
Click to hide internal directories.