Documentation
¶
Overview ¶
Package profiling resolves forge's continuous profiling config and runs the Pyroscope push profiler. The span labels that link a trace to its CPU profile live in internal/telemetry, next to the server span.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProfileTypes = []string{"cpu", "alloc_objects", "alloc_space", "inuse_objects", "inuse_space"}
DefaultProfileTypes is what the Pyroscope SDK collects by default.
Functions ¶
This section is empty.
Types ¶
type Inputs ¶
type Inputs struct {
Code shared.ProfilingConfig // from WithAppProfilingConfig
File shared.ProfilingConfig // from the forge config "profiling" key
AppName string
AppVersion string
Environment string
TracingEnabled bool
Getenv func(string) string
}
Inputs is everything Resolve reads.
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
Profiler pushes profiles to Pyroscope while the app runs.
type Settings ¶
type Settings struct {
Push bool // a server address is set
SpanLabels bool
ServerAddress string
ApplicationName string
BasicAuthUser string
BasicAuthPassword string
TenantID string
Tags map[string]string
ProfileTypes []string
Warnings []string
}
Settings is the resolved profiling configuration.
Click to show internal directories.
Click to hide internal directories.