processscraper

package
v0.71.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TypeStr the value of "type" key in configuration.
	TypeStr = "process"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Metrics allows to customize scraped metrics representation.
	Metrics metadata.MetricsSettings `mapstructure:"metrics"`
	internal.ScraperConfig
	// Include specifies a filter on the process names that should be included from the generated metrics.
	// Exclude specifies a filter on the process names that should be excluded from the generated metrics.
	// If neither `include` or `exclude` are set, process metrics will be generated for all processes.
	Include MatchConfig `mapstructure:"include"`
	Exclude MatchConfig `mapstructure:"exclude"`

	// MuteProcessNameError is a flag that will mute the error encountered when trying to read a process the
	// collector does not have permission for.
	// See https://github.com/open-telemetry/opentelemetry-collector/issues/3004 for more information.
	MuteProcessNameError bool `mapstructure:"mute_process_name_error,omitempty"`

	// ScrapeProcessDelay is used to indicate the minimum amount of time a process must be running
	// before metrics are scraped for it.  The default value is 0 seconds (0s)
	ScrapeProcessDelay time.Duration `mapstructure:"scrape_process_delay"`
}

Config relating to Process Metric Scraper.

type Factory

type Factory struct {
}

Factory is the Factory for scraper.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() internal.Config

CreateDefaultConfig creates the default configuration for the Scraper.

func (*Factory) CreateMetricsScraper added in v0.40.0

func (f *Factory) CreateMetricsScraper(
	_ context.Context,
	settings receiver.CreateSettings,
	cfg internal.Config,
) (scraperhelper.Scraper, error)

CreateMetricsScraper creates a resource scraper based on provided config.

type MatchConfig

type MatchConfig struct {
	filterset.Config `mapstructure:",squash"`

	Names []string `mapstructure:"names"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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