profiling

package
v1.8.16 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const LabelEndpoint = "endpoint"
View Source
const MaxLabelValuesPerKey = 1000

Variables

This section is empty.

Functions

func ArchiveKey added in v1.8.11

func ArchiveKey(projectId, profileId uuid.UUID, recordedAt time.Time) string

func BuildRows added in v1.8.9

func BuildRows(projectId uuid.UUID, decoded []Decoded) ([]models.ProfileStack, []models.ProfileSample, []models.Profile)

func HashFrames

func HashFrames(frames []string) uint64

func LabelAllowKeys added in v1.8.12

func LabelAllowKeys(additional []string) []string

func NewLabelAllowSet added in v1.8.12

func NewLabelAllowSet(additional []string) map[string]struct{}

func RawArchiveEnabled added in v1.8.11

func RawArchiveEnabled() bool

func StampArchive added in v1.8.11

func StampArchive(projectId uuid.UUID, recordedAt time.Time, profiles []models.Profile) (string, bool)

Types

type Decoded

type Decoded struct {
	Meta    Meta
	Stacks  []Stack
	Samples []Sample
}

type Decoder

type Decoder interface {
	Decode(ctx IngestContext, payload []byte) ([]Decoded, error)
}

type IngestContext

type IngestContext struct {
	ProjectId          uuid.UUID
	DefaultServiceName string
	ServerName         string
	AppVersion         string
	ReceivedAt         time.Time
	LabelAllowlist     map[string]struct{}
}

type Meta

type Meta struct {
	ServiceName string
	Start       time.Time
	End         time.Time
	ServerName  string
	AppVersion  string
	Attributes  map[string]string
	TraceId     *string
	SpanId      *string
}

type OTLPDecoder added in v1.8.9

type OTLPDecoder struct{}

func (OTLPDecoder) Decode added in v1.8.9

func (OTLPDecoder) Decode(ctx IngestContext, payload []byte) ([]Decoded, error)

type PprofDecoder

type PprofDecoder struct{}

func (PprofDecoder) Decode

func (PprofDecoder) Decode(ctx IngestContext, payload []byte) ([]Decoded, error)

type Sample

type Sample struct {
	Type      string
	Unit      string
	IsGauge   bool
	StackHash uint64
	Value     int64
	Labels    map[string]string
}

type Stack

type Stack struct {
	Hash   uint64
	Frames []string
}

Jump to

Keyboard shortcuts

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