Documentation
¶
Index ¶
- func CheckExporterLogs(tts TestTelemetry, exporter component.ID, ...) error
- func CheckExporterMetrics(tts TestTelemetry, exporter component.ID, ...) error
- func CheckExporterTraces(tts TestTelemetry, exporter component.ID, sentSpans, sendFailedSpans int64) error
- func CheckProcessorLogs(_ TestTelemetry, processor component.ID, ...) error
- func CheckProcessorMetrics(_ TestTelemetry, processor component.ID, ...) error
- func CheckProcessorTraces(_ TestTelemetry, processor component.ID, ...) error
- func CheckReceiverLogs(tts TestTelemetry, receiver component.ID, protocol string, ...) error
- func CheckReceiverMetrics(tts TestTelemetry, receiver component.ID, protocol string, ...) error
- func CheckReceiverTraces(tts TestTelemetry, receiver component.ID, protocol string, ...) error
- func CheckScraperMetrics(tts TestTelemetry, receiver component.ID, scraper component.ID, ...) 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(tts TestTelemetry, exporter component.ID, 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(tts TestTelemetry, exporter component.ID, 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(tts TestTelemetry, exporter component.ID, 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 component.ID, 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 component.ID, 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 component.ID, 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(tts TestTelemetry, receiver component.ID, 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(tts TestTelemetry, receiver component.ID, 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(tts TestTelemetry, receiver component.ID, 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(tts TestTelemetry, receiver component.ID, scraper component.ID, 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