processscraper

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 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 {
	internal.ConfigSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct

	// 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"`
}

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) CreateResourceMetricsScraper

func (f *Factory) CreateResourceMetricsScraper(
	_ context.Context,
	_ *zap.Logger,
	config internal.Config,
) (scraperhelper.ResourceMetricsScraper, error)

CreateResourceMetricsScraper creates a resource scraper based on provided config.

type MatchConfig

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

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

Jump to

Keyboard shortcuts

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