internal

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertContainsAttribute

func AssertContainsAttribute(t *testing.T, attr pcommon.Map, key string)

func AssertDescriptorEqual

func AssertDescriptorEqual(t *testing.T, expected pmetric.Metric, actual pmetric.Metric)

func AssertGaugeMetricHasAttribute added in v0.45.0

func AssertGaugeMetricHasAttribute(t *testing.T, metric pmetric.Metric, index int, labelName string)

func AssertGaugeMetricHasAttributeValue added in v0.45.0

func AssertGaugeMetricHasAttributeValue(t *testing.T, metric pmetric.Metric, index int, labelName string, expectedVal pcommon.Value)

func AssertGaugeMetricStartTimeEquals added in v0.45.0

func AssertGaugeMetricStartTimeEquals(t *testing.T, metric pmetric.Metric, startTime pcommon.Timestamp)

func AssertSameTimeStampForAllMetrics

func AssertSameTimeStampForAllMetrics(t *testing.T, metrics pmetric.MetricSlice)

func AssertSameTimeStampForMetrics

func AssertSameTimeStampForMetrics(t *testing.T, metrics pmetric.MetricSlice, startIdx, endIdx int)

func AssertSumMetricHasAttribute

func AssertSumMetricHasAttribute(t *testing.T, metric pmetric.Metric, index int, labelName string)

func AssertSumMetricHasAttributeValue

func AssertSumMetricHasAttributeValue(t *testing.T, metric pmetric.Metric, index int, labelName string, expectedVal pcommon.Value)

func AssertSumMetricStartTimeEquals

func AssertSumMetricStartTimeEquals(t *testing.T, metric pmetric.Metric, startTime pcommon.Timestamp)

Types

type Config

type Config interface {
	SetRootPath(rootPath string)
	SetEnvMap(envMap common.EnvMap)
}

Config is the configuration of a scraper.

type ScraperConfig added in v0.64.0

type ScraperConfig struct {
	RootPath string        `mapstructure:"-"`
	EnvMap   common.EnvMap `mapstructure:"-"`
}

func (*ScraperConfig) SetEnvMap added in v0.82.0

func (p *ScraperConfig) SetEnvMap(envMap common.EnvMap)

func (*ScraperConfig) SetRootPath added in v0.64.0

func (p *ScraperConfig) SetRootPath(rootPath string)

type ScraperFactory

type ScraperFactory interface {
	// CreateDefaultConfig creates the default configuration for the Scraper.
	CreateDefaultConfig() Config

	// CreateMetricsScraper creates a scraper based on this config.
	// If the config is not valid, error will be returned instead.
	CreateMetricsScraper(ctx context.Context, settings receiver.CreateSettings, cfg Config) (scraperhelper.Scraper, error)
}

ScraperFactory can create a MetricScraper.

Directories

Path Synopsis
Package perfcounters is a thin wrapper around https://godoc.org/github.com/leoluk/perflib_exporter/perflib that provides functions to scrape raw performance counter data, without calculating rates or formatting them, from the registry.
Package perfcounters is a thin wrapper around https://godoc.org/github.com/leoluk/perflib_exporter/perflib that provides functions to scrape raw performance counter data, without calculating rates or formatting them, from the registry.
scraper

Jump to

Keyboard shortcuts

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