exportertest

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: Apache-2.0 Imports: 6 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNopLogsExporter added in v0.6.0

func NewNopLogsExporter() component.LogsExporter

NewNopLogsExporter creates an LogsExporter that just drops the received data.

func NewNopMetricsExporter

func NewNopMetricsExporter() component.MetricsExporter

NewNopMetricsExporter creates an MetricsExporter that just drops the received data.

func NewNopTraceExporter

func NewNopTraceExporter() component.TraceExporter

NewNopTraceExporter creates an TraceExporter that just drops the received data.

Types

type SinkLogsExporter added in v0.7.0

type SinkLogsExporter struct {
	// contains filtered or unexported fields
}

SinkLogsExporter acts as a metrics receiver for use in tests.

func (*SinkLogsExporter) AllLogs added in v0.7.0

func (sle *SinkLogsExporter) AllLogs() []pdata.Logs

AllLog returns the metrics sent to the test sink.

func (*SinkLogsExporter) ConsumeLogs added in v0.7.0

func (sle *SinkLogsExporter) ConsumeLogs(_ context.Context, ld pdata.Logs) error

ConsumeLogData stores traces for tests.

func (*SinkLogsExporter) LogRecordsCount added in v0.7.0

func (sle *SinkLogsExporter) LogRecordsCount() int

LogRecordsCount return the number of log records sent to the test sing.

func (*SinkLogsExporter) Reset added in v0.7.0

func (sle *SinkLogsExporter) Reset()

Reset deletes any existing logs.

func (*SinkLogsExporter) SetConsumeLogError added in v0.7.0

func (sle *SinkLogsExporter) SetConsumeLogError(err error)

SetConsumeLogError sets an error that will be returned by ConsumeLog

func (*SinkLogsExporter) Shutdown added in v0.7.0

func (sle *SinkLogsExporter) Shutdown(context.Context) error

Shutdown stops the exporter and is invoked during shutdown.

func (*SinkLogsExporter) Start added in v0.7.0

Start tells the exporter to start. The exporter may prepare for exporting by connecting to the endpoint. Host parameter can be used for communicating with the host after Start() has already returned.

type SinkMetricsExporter

type SinkMetricsExporter struct {
	// contains filtered or unexported fields
}

SinkMetricsExporter acts as a metrics receiver for use in tests.

func (*SinkMetricsExporter) AllMetrics

func (sme *SinkMetricsExporter) AllMetrics() []pdata.Metrics

AllMetrics returns the metrics sent to the test sink.

func (*SinkMetricsExporter) ConsumeMetrics

func (sme *SinkMetricsExporter) ConsumeMetrics(_ context.Context, md pdata.Metrics) error

ConsumeMetricsData stores traces for tests.

func (*SinkMetricsExporter) MetricsCount added in v0.6.0

func (sme *SinkMetricsExporter) MetricsCount() int

MetricsCount return the number of metrics sent to the test sing.

func (*SinkMetricsExporter) Reset added in v0.9.0

func (sme *SinkMetricsExporter) Reset()

Reset deletes any existing metrics.

func (*SinkMetricsExporter) SetConsumeMetricsError

func (sme *SinkMetricsExporter) SetConsumeMetricsError(err error)

SetConsumeMetricsError sets an error that will be returned by ConsumeMetrics

func (*SinkMetricsExporter) Shutdown

func (sme *SinkMetricsExporter) Shutdown(context.Context) error

Shutdown stops the exporter and is invoked during shutdown.

func (*SinkMetricsExporter) Start

Start tells the exporter to start. The exporter may prepare for exporting by connecting to the endpoint. Host parameter can be used for communicating with the host after Start() has already returned.

type SinkTraceExporter

type SinkTraceExporter struct {
	// contains filtered or unexported fields
}

SinkTraceExporter acts as a trace receiver for use in tests.

func (*SinkTraceExporter) AllTraces

func (ste *SinkTraceExporter) AllTraces() []pdata.Traces

AllTraces returns the traces sent to the test sink.

func (*SinkTraceExporter) ConsumeTraces

func (ste *SinkTraceExporter) ConsumeTraces(_ context.Context, td pdata.Traces) error

ConsumeTraceData stores traces for tests.

func (*SinkTraceExporter) Reset added in v0.9.0

func (ste *SinkTraceExporter) Reset()

Reset deletes any existing metrics.

func (*SinkTraceExporter) SetConsumeTraceError

func (ste *SinkTraceExporter) SetConsumeTraceError(err error)

SetConsumeTraceError sets an error that will be returned by ConsumeTraces

func (*SinkTraceExporter) Shutdown

func (ste *SinkTraceExporter) Shutdown(context.Context) error

Shutdown stops the exporter and is invoked during shutdown.

func (*SinkTraceExporter) SpansCount added in v0.6.0

func (ste *SinkTraceExporter) SpansCount() int

SpansCount return the number of spans sent to the test sing.

func (*SinkTraceExporter) Start

Start tells the exporter to start. The exporter may prepare for exporting by connecting to the endpoint. Host parameter can be used for communicating with the host after Start() has already returned.

Jump to

Keyboard shortcuts

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