 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
const ( ProfilePath = "__profile_path__" ProfilePathPrefix = "__profile_path_prefix__" ProfileName = "__name__" )
Variables ¶
var DefaultArguments = NewDefaultArguments()
    var DefaultProfilingConfig = ProfilingConfig{ Memory: ProfilingTarget{ Enabled: true, Path: "/debug/pprof/allocs", }, Block: ProfilingTarget{ Enabled: true, Path: "/debug/pprof/block", }, Goroutine: ProfilingTarget{ Enabled: true, Path: "/debug/pprof/goroutine", }, Mutex: ProfilingTarget{ Enabled: true, Path: "/debug/pprof/mutex", }, ProcessCPU: ProfilingTarget{ Enabled: true, Path: "/debug/pprof/profile", Delta: true, }, FGProf: ProfilingTarget{ Enabled: false, Path: "/debug/fgprof", Delta: true, }, GoDeltaProfMemory: ProfilingTarget{ Enabled: false, Path: "/debug/pprof/delta_heap", }, GoDeltaProfMutex: ProfilingTarget{ Enabled: false, Path: "/debug/pprof/delta_mutex", }, GoDeltaProfBlock: ProfilingTarget{ Enabled: false, Path: "/debug/pprof/delta_block", }, }
Functions ¶
Types ¶
type Arguments ¶
type Arguments struct {
	Targets   []discovery.Target     `alloy:"targets,attr"`
	ForwardTo []pyroscope.Appendable `alloy:"forward_to,attr"`
	// The job name to override the job label with.
	JobName string `alloy:"job_name,attr,optional"`
	// A set of query parameters with which the target is scraped.
	Params url.Values `alloy:"params,attr,optional"`
	// How frequently to scrape the targets of this scrape config.
	ScrapeInterval time.Duration `alloy:"scrape_interval,attr,optional"`
	// The timeout for scraping targets of this config.
	ScrapeTimeout time.Duration `alloy:"scrape_timeout,attr,optional"`
	// The URL scheme with which to fetch metrics from targets.
	Scheme string `alloy:"scheme,attr,optional"`
	// The duration for a profile to be scrapped.
	DeltaProfilingDuration time.Duration `alloy:"delta_profiling_duration,attr,optional"`
	HTTPClientConfig component_config.HTTPClientConfig `alloy:",squash"`
	ProfilingConfig ProfilingConfig `alloy:"profiling_config,block,optional"`
	Clustering cluster.ComponentBlock `alloy:"clustering,block,optional"`
}
    Arguments holds values which are used to configure the pprof.scrape component.
func NewDefaultArguments ¶
func NewDefaultArguments() Arguments
NewDefaultArguments create the default settings for a scrape job.
func (*Arguments) SetToDefault ¶
func (arg *Arguments) SetToDefault()
SetToDefault implements syntax.Defaulter.
type Component ¶
type Component struct {
	// contains filtered or unexported fields
}
    Component implements the pprof.scrape component.
func (*Component) DebugInfo ¶
func (c *Component) DebugInfo() interface{}
DebugInfo implements component.DebugComponent.
func (*Component) NotifyClusterChange ¶
func (c *Component) NotifyClusterChange()
NotifyClusterChange implements component.ClusterComponent.
type CustomProfilingTarget ¶
type Manager ¶
type Manager struct {
	// contains filtered or unexported fields
}
    func NewManager ¶
func (*Manager) ApplyConfig ¶
ApplyConfig resets the manager's target providers and job configurations as defined by the new cfg.
func (*Manager) Run ¶
func (m *Manager) Run(tsets <-chan []*targetgroup.Group)
Run receives and saves target set updates and triggers the scraping loops reloading. Reloading happens in the background so that it doesn't block receiving targets updates.
func (*Manager) TargetsActive ¶
TargetsActive returns the active targets currently being scraped.
func (*Manager) TargetsAll ¶
TargetsAll returns active and dropped targets grouped by job_name.
type Options ¶ added in v1.1.0
type Options struct {
	// Optional HTTP client options to use when scraping.
	HTTPClientOptions []config_util.HTTPClientOption
}
    type ProfilingConfig ¶
type ProfilingConfig struct {
	Memory            ProfilingTarget         `alloy:"profile.memory,block,optional"`
	Block             ProfilingTarget         `alloy:"profile.block,block,optional"`
	Goroutine         ProfilingTarget         `alloy:"profile.goroutine,block,optional"`
	Mutex             ProfilingTarget         `alloy:"profile.mutex,block,optional"`
	ProcessCPU        ProfilingTarget         `alloy:"profile.process_cpu,block,optional"`
	FGProf            ProfilingTarget         `alloy:"profile.fgprof,block,optional"`
	GoDeltaProfMemory ProfilingTarget         `alloy:"profile.godeltaprof_memory,block,optional"`
	GoDeltaProfMutex  ProfilingTarget         `alloy:"profile.godeltaprof_mutex,block,optional"`
	GoDeltaProfBlock  ProfilingTarget         `alloy:"profile.godeltaprof_block,block,optional"`
	Custom            []CustomProfilingTarget `alloy:"profile.custom,block,optional"`
	PathPrefix string `alloy:"path_prefix,attr,optional"`
}
    func (*ProfilingConfig) AllTargets ¶
func (cfg *ProfilingConfig) AllTargets() map[string]ProfilingTarget
AllTargets returns the set of all standard and custom profiling targets, regardless of whether they're enabled. The key in the map indicates the name of the target.
func (*ProfilingConfig) SetToDefault ¶
func (cfg *ProfilingConfig) SetToDefault()
SetToDefault implements syntax.Defaulter.
type ProfilingTarget ¶
type Target ¶
type Target struct {
	// contains filtered or unexported fields
}
    Target refers to a singular HTTP or HTTPS endpoint.
func (*Target) Hash ¶
Hash returns an identifying hash for the target, based on public labels and the URL.
func (*Target) Health ¶
func (t *Target) Health() TargetHealth
Health returns the last known health state of the target.
func (*Target) LastScrape ¶
LastScrape returns the time of the last scrape.
func (*Target) LastScrapeDuration ¶
LastScrapeDuration returns how long the last scrape of the target took.
type TargetHealth ¶
type TargetHealth string
TargetHealth describes the health state of a target.
const ( HealthUnknown TargetHealth = "unknown" HealthGood TargetHealth = "up" HealthBad TargetHealth = "down" )
The possible health states of a target based on the last performed scrape.
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| internal
       | |
| 
          
            fastdelta
            
            
          
           Package fastdelta tries to match up samples between two pprof profiles and take their difference. | Package fastdelta tries to match up samples between two pprof profiles and take their difference. | 
| 
          
            pproflite
            
            
          
           Package pproflite implements zero-allocation pprof encoding and decoding. | Package pproflite implements zero-allocation pprof encoding and decoding. |