Documentation
¶
Index ¶
- Constants
- Variables
- 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 MetaFromOtelProfile(stringTable []string, p *pprofextended.Profile, name string, duration uint64) profile.Meta
- func MetaFromPprof(p *pprofpb.Profile, name string, sampleIndex int) profile.Meta
- func NewArrowToInternalConverter(mem memory.Allocator, schema *dynparquet.Schema, metrics *Metrics) *arrowToInternalConverter
- func OtlpRequestToArrowRecord(ctx context.Context, req *otelgrpcprofilingpb.ExportProfilesServiceRequest, ...) (arrow.RecordBatch, error)
- func SampleToParquetRow(schema *dynparquet.Schema, row parquet.Row, ...) parquet.Row
- func ValidateOtelDictionary(d *otelprofilingpb.ProfilesDictionary) error
- func ValidateOtelExportProfilesServiceRequest(req *otelgrpcprofilingpb.ExportProfilesServiceRequest) error
- func ValidateOtelProfile(d *otelprofilingpb.ProfilesDictionary, p *otelprofilingpb.Profile) error
- func ValidatePprofProfile(p *pprofpb.Profile, ei []*profilestorepb.ExecutableInfo) error
- func WriteRawRequestToArrowRecord(ctx context.Context, mem memory.Allocator, req *profilestorepb.WriteRawRequest, ...) (arrow.RecordBatch, error)
- type InternalRecordBuilderV1
- type Metrics
- type NormalizedProfile
- type NormalizedSample
- type NormalizedWriteRawRequest
- type Series
Constants ¶
View Source
const (
MetadataSchemaVersion = "parca_write_schema_version"
)
View Source
const (
MetadataSchemaVersionV1 = "v1"
)
Variables ¶
View Source
var ErrMissingNameLabel = errors.New("missing __name__ label")
Functions ¶
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 MetaFromOtelProfile ¶ added in v0.22.0
func MetaFromPprof ¶ added in v0.22.0
func NewArrowToInternalConverter ¶ added in v0.22.0
func NewArrowToInternalConverter( mem memory.Allocator, schema *dynparquet.Schema, metrics *Metrics, ) *arrowToInternalConverter
func OtlpRequestToArrowRecord ¶ added in v0.22.0
func OtlpRequestToArrowRecord( ctx context.Context, req *otelgrpcprofilingpb.ExportProfilesServiceRequest, schema *dynparquet.Schema, mem memory.Allocator, ) (arrow.RecordBatch, error)
func SampleToParquetRow ¶ added in v0.22.0
func SampleToParquetRow( schema *dynparquet.Schema, row parquet.Row, labelNames, profileLabelNames, profileNumLabelNames []string, lset map[string]string, meta profile.Meta, s *NormalizedSample, ) parquet.Row
SampleToParquetRow converts a sample to a Parquet row. The passed labels must be sorted.
func ValidateOtelDictionary ¶ added in v0.24.1
func ValidateOtelDictionary(d *otelprofilingpb.ProfilesDictionary) error
func ValidateOtelExportProfilesServiceRequest ¶ added in v0.22.0
func ValidateOtelExportProfilesServiceRequest(req *otelgrpcprofilingpb.ExportProfilesServiceRequest) error
func ValidateOtelProfile ¶ added in v0.22.0
func ValidateOtelProfile(d *otelprofilingpb.ProfilesDictionary, p *otelprofilingpb.Profile) error
func ValidatePprofProfile ¶
func ValidatePprofProfile(p *pprofpb.Profile, ei []*profilestorepb.ExecutableInfo) error
func WriteRawRequestToArrowRecord ¶ added in v0.22.0
func WriteRawRequestToArrowRecord( ctx context.Context, mem memory.Allocator, req *profilestorepb.WriteRawRequest, schema *dynparquet.Schema, ) (arrow.RecordBatch, error)
Types ¶
type InternalRecordBuilderV1 ¶ added in v0.22.0
type InternalRecordBuilderV1 struct {
Producer *array.Dictionary
SampleType *array.Dictionary
SampleUnit *array.Dictionary
PeriodType *array.Dictionary
PeriodUnit *array.Dictionary
Period *array.Int64
Duration *array.Int64
Timestamp *array.Int64
TimeNanos *array.Int64
Value *array.Int64
Labels []arrow.Array
LabelFields []arrow.Field
Locations *array.List
StacktraceIDs *array.Dictionary
}
func (*InternalRecordBuilderV1) Release ¶ added in v0.22.0
func (r *InternalRecordBuilderV1) Release()
type Metrics ¶ added in v0.22.0
type Metrics struct {
IncompleteLocations prometheus.Counter
}
func NewMetrics ¶ added in v0.22.0
func NewMetrics(reg prometheus.Registerer) *Metrics
type NormalizedProfile ¶ added in v0.22.0
type NormalizedProfile struct {
Samples []*NormalizedSample
Meta profile.Meta
}
func NormalizePprof ¶ added in v0.22.0
func NormalizePprof( ctx context.Context, name string, takenLabelNames map[string]string, p *pprofpb.Profile, normalizedAddress bool, executableInfo []*profilestorepb.ExecutableInfo, ) ([]*NormalizedProfile, error)
type NormalizedSample ¶ added in v0.22.0
type NormalizedWriteRawRequest ¶
func NormalizeWriteRawRequest ¶ added in v0.22.0
func NormalizeWriteRawRequest(ctx context.Context, req *profilestorepb.WriteRawRequest) (NormalizedWriteRawRequest, error)
type Series ¶
type Series struct {
Labels map[string]string
Samples [][]*NormalizedProfile
}
Click to show internal directories.
Click to hide internal directories.