obsreporttest

package
Version: v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExporterLogs added in v0.25.0

func CheckExporterLogs(exporter config.ComponentID, acceptedLogRecords, droppedLogRecords int64) error

CheckExporterLogs checks that for the current exported values for logs exporter metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckExporterMetrics added in v0.25.0

func CheckExporterMetrics(exporter config.ComponentID, acceptedMetricsPoints, droppedMetricsPoints int64) error

CheckExporterMetrics checks that for the current exported values for metrics exporter metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckExporterTraces added in v0.25.0

func CheckExporterTraces(exporter config.ComponentID, acceptedSpans, droppedSpans int64) error

CheckExporterTraces checks that for the current exported values for trace exporter metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckProcessorLogs added in v0.25.0

func CheckProcessorLogs(processor config.ComponentID, acceptedLogRecords, refusedLogRecords, droppedLogRecords int64) error

CheckProcessorLogs checks that for the current exported values for logs exporter metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckProcessorMetrics added in v0.25.0

func CheckProcessorMetrics(processor config.ComponentID, acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints int64) error

CheckProcessorMetrics checks that for the current exported values for metrics exporter metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckProcessorTraces added in v0.25.0

func CheckProcessorTraces(processor config.ComponentID, acceptedSpans, refusedSpans, droppedSpans int64) error

CheckProcessorTraces checks that for the current exported values for trace exporter metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckReceiverLogs added in v0.25.0

func CheckReceiverLogs(receiver config.ComponentID, protocol string, acceptedLogRecords, droppedLogRecords int64) error

CheckReceiverLogs checks that for the current exported values for logs receiver metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckReceiverMetrics added in v0.25.0

func CheckReceiverMetrics(receiver config.ComponentID, protocol string, acceptedMetricPoints, droppedMetricPoints int64) error

CheckReceiverMetrics checks that for the current exported values for metrics receiver metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckReceiverTraces added in v0.25.0

func CheckReceiverTraces(receiver config.ComponentID, protocol string, acceptedSpans, droppedSpans int64) error

CheckReceiverTraces checks that for the current exported values for trace receiver metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

func CheckScraperMetrics added in v0.25.0

func CheckScraperMetrics(receiver config.ComponentID, scraper config.ComponentID, scrapedMetricPoints, erroredMetricPoints int64) error

CheckScraperMetrics checks that for the current exported values for metrics scraper metrics match given values. When this function is called it is required to also call SetupTelemetry as first thing.

Types

type TestTelemetry added in v0.37.0

type TestTelemetry struct {
	component.TelemetrySettings
	SpanRecorder *tracetest.SpanRecorder
	// contains filtered or unexported fields
}

func SetupTelemetry added in v0.37.0

func SetupTelemetry() (TestTelemetry, error)

SetupTelemetry does setup the testing environment to check the metrics recorded by receivers, producers or exporters. The caller should defer a call to Shutdown the returned TestTelemetry.

func (*TestTelemetry) Shutdown added in v0.37.0

func (tts *TestTelemetry) Shutdown(ctx context.Context) error

Shutdown unregisters any views and shuts down the SpanRecorder

func (*TestTelemetry) ToExporterCreateSettings added in v0.37.0

func (tts *TestTelemetry) ToExporterCreateSettings() component.ExporterCreateSettings

ToExporterCreateSettings returns ExporterCreateSettings with configured TelemetrySettings

func (*TestTelemetry) ToProcessorCreateSettings added in v0.37.0

func (tts *TestTelemetry) ToProcessorCreateSettings() component.ProcessorCreateSettings

ToProcessorCreateSettings returns ProcessorCreateSettings with configured TelemetrySettings

func (*TestTelemetry) ToReceiverCreateSettings added in v0.37.0

func (tts *TestTelemetry) ToReceiverCreateSettings() component.ReceiverCreateSettings

ToReceiverCreateSettings returns ReceiverCreateSettings with configured TelemetrySettings

Jump to

Keyboard shortcuts

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