Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertContainsAttribute

func AssertContainsAttribute(t *testing.T, attr pdata.AttributeMap, key string)

func AssertDescriptorEqual

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

func AssertDoubleSumMetricLabelExists

func AssertDoubleSumMetricLabelExists(t *testing.T, metric pdata.Metric, index int, labelName string)

func AssertDoubleSumMetricLabelHasValue

func AssertDoubleSumMetricLabelHasValue(t *testing.T, metric pdata.Metric, index int, labelName string, expectedVal string)

func AssertDoubleSumMetricStartTimeEquals

func AssertDoubleSumMetricStartTimeEquals(t *testing.T, metric pdata.Metric, startTime pdata.TimestampUnixNano)

func AssertIntGaugeMetricLabelHasValue

func AssertIntGaugeMetricLabelHasValue(t *testing.T, metric pdata.Metric, index int, labelName string, expectedVal string)

func AssertIntSumMetricLabelExists

func AssertIntSumMetricLabelExists(t *testing.T, metric pdata.Metric, index int, labelName string)

func AssertIntSumMetricLabelHasValue

func AssertIntSumMetricLabelHasValue(t *testing.T, metric pdata.Metric, index int, labelName string, expectedVal string)

func AssertIntSumMetricStartTimeEquals

func AssertIntSumMetricStartTimeEquals(t *testing.T, metric pdata.Metric, startTime pdata.TimestampUnixNano)

func AssertSameTimeStampForAllMetrics

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

func AssertSameTimeStampForMetrics

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

func TimeToUnixNano

func TimeToUnixNano(t time.Time) pdata.TimestampUnixNano

Types

type BaseFactory

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

    BaseFactory for creating Scrapers.

    type Config

    type Config interface {
    }

      Config is the configuration of a scraper.

      type ConfigSettings

      type ConfigSettings struct {
      }

        ConfigSettings provides common settings for scraper configuration.

        type ResourceScraperFactory

        type ResourceScraperFactory interface {
        	BaseFactory
        
        	// CreateResourceMetricsScraper creates a resource scraper based on this
        	// config. If the config is not valid, error will be returned instead.
        	CreateResourceMetricsScraper(ctx context.Context, logger *zap.Logger, cfg Config) (scraperhelper.ResourceMetricsScraper, error)
        }

          ResourceScraperFactory can create a ResourceScraper.

          type ScraperFactory

          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) (scraperhelper.MetricsScraper, 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