Documentation ¶
Index ¶
- func AssertContainsAttribute(t *testing.T, attr pdata.AttributeMap, key string)
- func AssertDescriptorEqual(t *testing.T, expected pdata.Metric, actual pdata.Metric)
- func AssertDoubleSumMetricLabelExists(t *testing.T, metric pdata.Metric, index int, labelName string)
- func AssertDoubleSumMetricLabelHasValue(t *testing.T, metric pdata.Metric, index int, labelName string, ...)
- func AssertDoubleSumMetricStartTimeEquals(t *testing.T, metric pdata.Metric, startTime pdata.TimestampUnixNano)
- func AssertIntGaugeMetricLabelHasValue(t *testing.T, metric pdata.Metric, index int, labelName string, ...)
- func AssertIntSumMetricLabelExists(t *testing.T, metric pdata.Metric, index int, labelName string)
- func AssertIntSumMetricLabelHasValue(t *testing.T, metric pdata.Metric, index int, labelName string, ...)
- func AssertIntSumMetricStartTimeEquals(t *testing.T, metric pdata.Metric, startTime pdata.TimestampUnixNano)
- func AssertSameTimeStampForAllMetrics(t *testing.T, metrics pdata.MetricSlice)
- func AssertSameTimeStampForMetrics(t *testing.T, metrics pdata.MetricSlice, startIdx, endIdx int)
- func InitializeMetricSlice(metricData pdata.Metrics) pdata.MetricSlice
- func TimeToUnixNano(t time.Time) pdata.TimestampUnixNano
- type BaseFactory
- type BaseScraper
- type Config
- type ConfigSettings
- type ResourceScraper
- type ResourceScraperFactory
- type Scraper
- type ScraperFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertContainsAttribute ¶ added in v0.5.0
func AssertContainsAttribute(t *testing.T, attr pdata.AttributeMap, key string)
func AssertDescriptorEqual ¶
func AssertDoubleSumMetricLabelExists ¶ added in v0.10.0
func AssertDoubleSumMetricLabelHasValue ¶ added in v0.10.0
func AssertDoubleSumMetricStartTimeEquals ¶ added in v0.10.0
func AssertIntGaugeMetricLabelHasValue ¶ added in v0.10.0
func AssertIntSumMetricLabelExists ¶ added in v0.10.0
func AssertIntSumMetricLabelHasValue ¶ added in v0.10.0
func AssertIntSumMetricStartTimeEquals ¶ added in v0.10.0
func AssertSameTimeStampForAllMetrics ¶ added in v0.8.0
func AssertSameTimeStampForAllMetrics(t *testing.T, metrics pdata.MetricSlice)
func AssertSameTimeStampForMetrics ¶ added in v0.8.0
func AssertSameTimeStampForMetrics(t *testing.T, metrics pdata.MetricSlice, startIdx, endIdx int)
func InitializeMetricSlice ¶
func InitializeMetricSlice(metricData pdata.Metrics) pdata.MetricSlice
Initializes a metric with a metric slice and returns it.
func TimeToUnixNano ¶ added in v0.8.0
func TimeToUnixNano(t time.Time) pdata.TimestampUnixNano
Types ¶
type BaseFactory ¶ added in v0.5.0
type BaseFactory interface { // CreateDefaultConfig creates the default configuration for the Scraper. CreateDefaultConfig() Config }
BaseFactory for creating Scrapers.
type BaseScraper ¶ added in v0.5.0
type BaseScraper interface { // Initialize performs any timely initialization tasks such as // setting up performance counters for initial collection. Initialize(ctx context.Context) error // Close should clean up any unmanaged resources such as // performance counter handles. Close(ctx context.Context) error }
BaseScraper gathers metrics from the host machine.
type ConfigSettings ¶
type ConfigSettings struct { }
ConfigSettings provides common settings for scraper configuration.
type ResourceScraper ¶ added in v0.5.0
type ResourceScraper interface { BaseScraper // ScrapeMetrics returns relevant scraped metrics per resource. // If errors occur scraping some metrics, an error should be // returned, but any metrics that were successfully scraped // should still be returned. ScrapeMetrics(ctx context.Context) (pdata.ResourceMetricsSlice, error) }
ResourceScraper gathers metrics from a low-level resource such as a process.
type ResourceScraperFactory ¶ added in v0.5.0
type ResourceScraperFactory interface { BaseFactory // CreateMetricsScraper creates a resource scraper based on this // config. If the config is not valid, error will be returned instead. CreateMetricsScraper(ctx context.Context, logger *zap.Logger, cfg Config) (ResourceScraper, error) }
ResourceScraperFactory can create a ResourceScraper.
type Scraper ¶
type Scraper interface { BaseScraper // ScrapeMetrics returns relevant scraped metrics. If errors occur // scraping some metrics, an error should be returned, but any // metrics that were successfully scraped should still be returned. ScrapeMetrics(ctx context.Context) (pdata.MetricSlice, error) }
Scraper gathers metrics from the host machine.
type ScraperFactory ¶ added in v0.5.0
type ScraperFactory interface { BaseFactory // CreateMetricsScraper creates a scraper based on this config. // If the config is not valid, error will be returned instead. CreateMetricsScraper(ctx context.Context, logger *zap.Logger, cfg Config) (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
|
|
Click to show internal directories.
Click to hide internal directories.