Documentation ¶
Index ¶
- func AssertDescriptorEqual(t *testing.T, expected pdata.MetricDescriptor, actual pdata.MetricDescriptor)
- func AssertDoubleMetricLabelDoesNotExist(t *testing.T, metric pdata.Metric, index int, labelName string)
- func AssertDoubleMetricLabelExists(t *testing.T, metric pdata.Metric, index int, labelName string)
- func AssertDoubleMetricLabelHasValue(t *testing.T, metric pdata.Metric, index int, labelName string, ...)
- func AssertInt64MetricLabelDoesNotExist(t *testing.T, metric pdata.Metric, index int, labelName string)
- func AssertInt64MetricLabelExists(t *testing.T, metric pdata.Metric, index int, labelName string)
- func AssertInt64MetricLabelHasValue(t *testing.T, metric pdata.Metric, index int, labelName string, ...)
- func InitializeMetricSlice(metricData data.MetricData) pdata.MetricSlice
- type Config
- type ConfigSettings
- type Factory
- type Scraper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertDescriptorEqual ¶
func AssertDescriptorEqual(t *testing.T, expected pdata.MetricDescriptor, actual pdata.MetricDescriptor)
func InitializeMetricSlice ¶
func InitializeMetricSlice(metricData data.MetricData) pdata.MetricSlice
Initializes a metric with a metric slice and returns it.
Types ¶
type ConfigSettings ¶
type ConfigSettings struct { }
ConfigSettings provides common settings for scraper configuration.
type Factory ¶
type Factory 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, logger *zap.Logger, cfg Config) (Scraper, error) }
Factory can create a Scraper.
type Scraper ¶
type Scraper 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 // 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 and converts these into internal metrics format.
Click to show internal directories.
Click to hide internal directories.