Documentation
¶
Overview ¶
Package xscraper 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 ¶
This section is empty.
Types ¶
type CreateProfilesFunc ¶
CreateProfilesFunc is the equivalent of Factory.CreateProfiles().
type Factory ¶
type Factory interface {
scraper.Factory
// CreateProfiles creates a Profiles scraper based on this config.
// If the scraper type does not support profiles,
// this function returns the error [pipeline.ErrSignalNotSupported].
CreateProfiles(ctx context.Context, set scraper.Settings, cfg component.Config) (Profiles, error)
// ProfilesStability gets the stability level of the Profiles scraper.
ProfilesStability() component.StabilityLevel
}
func NewFactory ¶
func NewFactory(cfgType component.Type, createDefaultConfig component.CreateDefaultConfigFunc, options ...FactoryOption) Factory
NewFactory creates a Factory with experimental capabilities and wraps a scraper.Factory.
type FactoryOption ¶
type FactoryOption interface {
// contains filtered or unexported methods
}
FactoryOption apply changes to Options.
func WithLogs ¶
func WithLogs(createLogs scraper.CreateLogsFunc, sl component.StabilityLevel) FactoryOption
WithLogs overrides the default "error not supported" implementation for CreateLogs and the default "undefined" stability level.
func WithMetrics ¶
func WithMetrics(createMetrics scraper.CreateMetricsFunc, sl component.StabilityLevel) FactoryOption
WithMetrics overrides the default "error not supported" implementation for CreateMetrics and the default "undefined" stability level.
func WithProfiles ¶
func WithProfiles(createProfiles CreateProfilesFunc, sl component.StabilityLevel) FactoryOption
WithProfiles overrides the default "error not supported" implementation for CreateProfiles and the default "undefined" stability level.
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 Profiles ¶
type Profiles interface {
component.Component
// ScrapeProfiles is the base interface to indicate that how should profiles be scraped.
ScrapeProfiles(context.Context) (pprofile.Profiles, error)
}
Profiles is the base interface for profiles scrapers.
func NewProfiles ¶
func NewProfiles(scrape ScrapeProfilesFunc, options ...Option) (Profiles, error)
NewProfiles creates a new Profiles scraper.
type ScrapeProfilesFunc ¶
type ScrapeProfilesFunc scraper.ScrapeFunc[pprofile.Profiles]
ScrapeProfilesFunc is a helper function.