scraper

package
v0.29.5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProbeSuccessMetricName = "probe_success"
	CheckInfoMetricName    = "sm_check_info"
	CheckInfoSource        = "synthetic-monitoring-agent"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory added in v0.20.1

type Factory func(
	ctx context.Context, check model.Check, publisher pusher.Publisher, probe sm.Probe,
	features feature.Collection,
	logger zerolog.Logger,
	metrics Metrics,
	k6runner k6runner.Runner,
	labelsLimiter LabelsLimiter,
	telemeter *telemetry.Telemeter,
) (*Scraper, error)

type Incrementer added in v0.17.1

type Incrementer interface {
	Inc()
}

type IncrementerVec added in v0.17.1

type IncrementerVec interface {
	WithLabelValues(...string) Incrementer
}

func NewIncrementerFromCounterVec added in v0.17.1

func NewIncrementerFromCounterVec(c *prometheus.CounterVec) IncrementerVec

type LabelsLimiter added in v0.20.1

type LabelsLimiter interface {
	MetricLabels(ctx context.Context, tenantID model.GlobalID) (int, error)
	LogLabels(ctx context.Context, tenantID model.GlobalID) (int, error)
}

type Metrics added in v0.23.0

type Metrics interface {
	AddScrape()
	AddCheckError()
	AddCollectorError()
}

func NewMetrics added in v0.23.0

func NewMetrics(scrapeCounter Incrementer, errorCounter IncrementerVec) Metrics

type Scraper

type Scraper struct {
	// contains filtered or unexported fields
}

func New

func New(
	ctx context.Context, check model.Check, publisher pusher.Publisher, probe sm.Probe,
	features feature.Collection,
	logger zerolog.Logger,
	metrics Metrics,
	k6runner k6runner.Runner,
	labelsLimiter LabelsLimiter,
	telemeter *telemetry.Telemeter,
) (*Scraper, error)

func NewWithOpts added in v0.2.0

func NewWithOpts(ctx context.Context, check model.Check, opts ScraperOpts) (*Scraper, error)

func (Scraper) CheckType

func (s Scraper) CheckType() sm.CheckType

func (Scraper) ConfigVersion

func (s Scraper) ConfigVersion() string

func (Scraper) LastModified added in v0.10.0

func (s Scraper) LastModified() float64

func (*Scraper) Run

func (s *Scraper) Run(ctx context.Context)

func (*Scraper) Stop

func (s *Scraper) Stop()

type ScraperOpts added in v0.2.0

type ScraperOpts struct {
	Probe         sm.Probe
	Publisher     pusher.Publisher
	Logger        zerolog.Logger
	Metrics       Metrics
	ProbeFactory  prober.ProberFactory
	LabelsLimiter LabelsLimiter
	Telemeter     Telemeter
}

type Streams

type Streams = []logproto.Stream

type Telemeter added in v0.22.0

type Telemeter interface {
	AddExecution(e telemetry.Execution)
}

type TimeSeries

type TimeSeries = []prompb.TimeSeries

Jump to

Keyboard shortcuts

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