Documentation ¶
Overview ¶
Package scraper allows to define pull based receivers that can be configured using the scraperreceiver.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateMetricsFunc ¶
CreateMetricsFunc is the equivalent of Factory.CreateMetrics().
func (CreateMetricsFunc) CreateMetrics ¶
func (f CreateMetricsFunc) CreateMetrics(ctx context.Context, set Settings, cfg component.Config) (Metrics, error)
CreateMetrics implements Factory.CreateMetrics.
type Factory ¶
type Factory interface { component.Factory // CreateMetrics creates a Metrics scraper based on this config. // If the scraper type does not support metrics, // this function returns the error [pipeline.ErrSignalNotSupported]. // Implementers can assume `next` is never nil. CreateMetrics(ctx context.Context, set Settings, cfg component.Config) (Metrics, error) // MetricsStability gets the stability level of the Metrics scraper. MetricsStability() component.StabilityLevel // contains filtered or unexported methods }
Factory is factory interface for scrapers.
This interface cannot be directly implemented. Implementations must use the NewFactory to implement it.
func NewFactory ¶
func NewFactory(cfgType component.Type, createDefaultConfig component.CreateDefaultConfigFunc, options ...FactoryOption) Factory
NewFactory returns a Factory.
type FactoryOption ¶
type FactoryOption interface {
// contains filtered or unexported methods
}
FactoryOption apply changes to Options.
func WithMetrics ¶
func WithMetrics(createMetrics CreateMetricsFunc, sl component.StabilityLevel) FactoryOption
WithMetrics overrides the default "error not supported" implementation for CreateMetrics and the default "undefined" stability level.
type Logs ¶ added in v0.116.0
type Logs interface { component.Component // ScrapeLogs is the base interface to indicate that how should logs be scraped. ScrapeLogs(context.Context) (plog.Logs, error) }
Logs is the base interface for logs scrapers.
type Metrics ¶
type Metrics interface { component.Component ScrapeMetrics(context.Context) (pmetric.Metrics, error) }
Metrics is the base interface for metrics scrapers.
func NewMetrics ¶
func NewMetrics(scrape ScrapeMetricsFunc, options ...Option) (Metrics, error)
NewMetrics creates a new Metrics scraper.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option apply changes to internal options.
func WithShutdown ¶
func WithShutdown(shutdown component.ShutdownFunc) Option
WithShutdown sets the function that will be called on shutdown.
type ScrapeLogsFunc ¶ added in v0.116.0
type ScrapeLogsFunc ScrapeFunc[plog.Logs]
ScrapeLogsFunc is a helper function that is similar to Logs.ScrapeLogs.
func (ScrapeLogsFunc) ScrapeLogs ¶ added in v0.116.0
type ScrapeMetricsFunc ¶
type ScrapeMetricsFunc ScrapeFunc[pmetric.Metrics]
ScrapeMetricsFunc is a helper function that is similar to Metrics.ScrapeMetrics.
func (ScrapeMetricsFunc) ScrapeMetrics ¶
Directories ¶
Path | Synopsis |
---|---|
Package scrapererror provides custom error types for scrapers.
|
Package scrapererror provides custom error types for scrapers. |
scraperhelper
module
|
|
scrapertest
module
|