Documentation
¶
Index ¶
- func CheckScraperMetrics(tts TestTelemetry, receiver component.ID, scraper component.ID, ...) error
- type TestTelemetry
- func (tts *TestTelemetry) CheckExporterEnqueueFailedLogs(enqueueFailed int64) error
- func (tts *TestTelemetry) CheckExporterEnqueueFailedMetrics(enqueueFailed int64) error
- func (tts *TestTelemetry) CheckExporterEnqueueFailedTraces(enqueueFailed int64) error
- func (tts *TestTelemetry) CheckExporterLogs(sentLogRecords, sendFailedLogRecords int64) error
- func (tts *TestTelemetry) CheckExporterMetricGauge(metric string, val int64) error
- func (tts *TestTelemetry) CheckExporterMetrics(sentMetricsPoints, sendFailedMetricsPoints int64) error
- func (tts *TestTelemetry) CheckExporterTraces(sentSpans, sendFailedSpans int64) error
- func (tts *TestTelemetry) CheckProcessorLogs(acceptedLogRecords, refusedLogRecords, droppedLogRecords int64) error
- func (tts *TestTelemetry) CheckProcessorMetrics(acceptedMetricPoints, refusedMetricPoints, droppedMetricPoints int64) error
- func (tts *TestTelemetry) CheckProcessorTraces(acceptedSpans, refusedSpans, droppedSpans int64) error
- func (tts *TestTelemetry) CheckReceiverLogs(protocol string, acceptedLogRecords, droppedLogRecords int64) error
- func (tts *TestTelemetry) CheckReceiverMetrics(protocol string, acceptedMetricPoints, droppedMetricPoints int64) error
- func (tts *TestTelemetry) CheckReceiverTraces(protocol string, acceptedSpans, droppedSpans int64) error
- func (tts *TestTelemetry) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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(id component.ID) (TestTelemetry, error)
SetupTelemetry does setup the testing environment to check the metrics recorded by receivers, producers or exporters. The caller must pass the ID of the component that intends to test, so the CreateSettings and Check methods will use. The caller should defer a call to Shutdown the returned TestTelemetry.
func (*TestTelemetry) CheckExporterEnqueueFailedLogs ¶ added in v0.88.0
func (tts *TestTelemetry) CheckExporterEnqueueFailedLogs(enqueueFailed int64) error
func (*TestTelemetry) CheckExporterEnqueueFailedMetrics ¶ added in v0.88.0
func (tts *TestTelemetry) CheckExporterEnqueueFailedMetrics(enqueueFailed int64) error
func (*TestTelemetry) CheckExporterEnqueueFailedTraces ¶ added in v0.88.0
func (tts *TestTelemetry) CheckExporterEnqueueFailedTraces(enqueueFailed int64) error
func (*TestTelemetry) CheckExporterLogs ¶ added in v0.67.0
func (tts *TestTelemetry) CheckExporterLogs(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 (*TestTelemetry) CheckExporterMetricGauge ¶ added in v0.89.0
func (tts *TestTelemetry) CheckExporterMetricGauge(metric string, val int64) error
func (*TestTelemetry) CheckExporterMetrics ¶ added in v0.67.0
func (tts *TestTelemetry) CheckExporterMetrics(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 (*TestTelemetry) CheckExporterTraces ¶ added in v0.67.0
func (tts *TestTelemetry) CheckExporterTraces(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 (*TestTelemetry) CheckProcessorLogs ¶ added in v0.67.0
func (tts *TestTelemetry) CheckProcessorLogs(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 (*TestTelemetry) CheckProcessorMetrics ¶ added in v0.67.0
func (tts *TestTelemetry) CheckProcessorMetrics(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 (*TestTelemetry) CheckProcessorTraces ¶ added in v0.67.0
func (tts *TestTelemetry) CheckProcessorTraces(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 (*TestTelemetry) CheckReceiverLogs ¶ added in v0.67.0
func (tts *TestTelemetry) CheckReceiverLogs(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 (*TestTelemetry) CheckReceiverMetrics ¶ added in v0.67.0
func (tts *TestTelemetry) CheckReceiverMetrics(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 (*TestTelemetry) CheckReceiverTraces ¶ added in v0.67.0
func (tts *TestTelemetry) CheckReceiverTraces(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.