Documentation
¶
Index ¶
- func CheckExporterLogs(_ TestTelemetry, exporter config.ComponentID, ...) error
- func CheckExporterMetrics(_ TestTelemetry, exporter config.ComponentID, ...) error
- func CheckExporterTraces(_ TestTelemetry, exporter config.ComponentID, sentSpans, sendFailedSpans int64) error
- func CheckProcessorLogs(_ TestTelemetry, processor config.ComponentID, ...) error
- func CheckProcessorMetrics(_ TestTelemetry, processor config.ComponentID, ...) error
- func CheckProcessorTraces(_ TestTelemetry, processor config.ComponentID, ...) error
- func CheckReceiverLogs(_ TestTelemetry, receiver config.ComponentID, protocol string, ...) error
- func CheckReceiverMetrics(_ TestTelemetry, receiver config.ComponentID, protocol string, ...) error
- func CheckReceiverTraces(_ TestTelemetry, receiver config.ComponentID, protocol string, ...) error
- func CheckScraperMetrics(_ TestTelemetry, receiver config.ComponentID, scraper config.ComponentID, ...) error
- type TestTelemetry
- func (tts *TestTelemetry) Shutdown(ctx context.Context) error
- func (tts *TestTelemetry) ToExporterCreateSettings() component.ExporterCreateSettings
- func (tts *TestTelemetry) ToProcessorCreateSettings() component.ProcessorCreateSettings
- func (tts *TestTelemetry) ToReceiverCreateSettings() component.ReceiverCreateSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckExporterLogs ¶ added in v0.25.0
func CheckExporterLogs(_ TestTelemetry, exporter config.ComponentID, sentLogRecords, sendFailedLogRecords 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(_ TestTelemetry, exporter config.ComponentID, sentMetricsPoints, sendFailedMetricsPoints 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(_ TestTelemetry, exporter config.ComponentID, sentSpans, sendFailedSpans 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(_ TestTelemetry, 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(_ TestTelemetry, 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(_ TestTelemetry, 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(_ TestTelemetry, 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(_ TestTelemetry, 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(_ TestTelemetry, 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(_ TestTelemetry, 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