pprofreceiver

package module
v0.151.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 14 Imported by: 1

README

Pprof Receiver

The Pprof Receiver collects profiles from files specified with a glob pattern, from a remote endpoint or the running collector.

Status
Stability alpha: profiles
Distributions contrib
Issues Open issues Closed issues
Code coverage codecov
Code Owners @MovieStoreGuy, @atoulme

Configuration

  • include (required): The glob path for files to watch
  • collection_interval (default = 1m): The interval at which metrics are emitted by this receiver.
  • initial_delay (default = 1s): defines how long this receiver waits before starting.
  • block_profile_fraction (default = 1): (self scraper only) Fraction of blocking events that are profiled. A value <= 0 disables profiling. See https://golang.org/pkg/runtime/#SetBlockProfileRate for details.
  • mutex_profile_fraction (default = 1): (self scraper only) Fraction of mutex contention events that are profiled. A value <= 0 disables profiling. See https://golang.org/pkg/runtime/#SetMutexProfileFraction for details.
Example
receivers:
  pprof:
    include: /tmp/pprof/*
    collection_interval: 10s
    initial_delay: 1s

Collector with remote endpoint:

receivers:
  pprof:
    endpoint: "http://localhost:6060/debug/pprof/profile?seconds=1"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

Types

type Config

type Config struct {
	scraperhelper.ControllerConfig `mapstructure:",squash"`
	confighttp.ClientConfig        `mapstructure:",squash"`

	// Include is the glob pattern for pprof files to scrape.
	Include string `mapstructure:"include"`

	// Self-scraper only:
	// Fraction of blocking events that are profiled. A value <= 0 disables
	// profiling. See https://golang.org/pkg/runtime/#SetBlockProfileRate for details.
	BlockProfileFraction int `mapstructure:"block_profile_fraction"`

	// Self-scraper only:
	// Fraction of mutex contention events that are profiled. A value <= 0
	// disables profiling. See https://golang.org/pkg/runtime/#SetMutexProfileFraction
	// for details.
	MutexProfileFraction int `mapstructure:"mutex_profile_fraction"`
}

Config defines the configuration for the pprof receiver.

func (*Config) Validate added in v0.148.0

func (c *Config) Validate() error

Directories

Path Synopsis
metadata
Package metadata contains the autogenerated telemetry and build information for the receiver/pprof component.
Package metadata contains the autogenerated telemetry and build information for the receiver/pprof component.

Jump to

Keyboard shortcuts

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