Back to godoc.org
go.opentelemetry.io/collector/exporter/exportertest

package exportertest

v0.4.0
Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module: go.opentelemetry.io/collector

Index

func NewNopMetricsExporter

func NewNopMetricsExporter() component.MetricsExporter

NewNopMetricsExporterOld creates an MetricsExporter that just drops the received data.

func NewNopMetricsExporterOld

func NewNopMetricsExporterOld() component.MetricsExporterOld

NewNopMetricsExporterOld creates an MetricsExporter that just drops the received data.

func NewNopTraceExporter

func NewNopTraceExporter() component.TraceExporter

NewNopTraceExporterOld creates an TraceExporter that just drops the received data.

func NewNopTraceExporterOld

func NewNopTraceExporterOld() component.TraceExporterOld

NewNopTraceExporterOld creates an TraceExporter that just drops the received data.

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) 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

func (sme *SinkMetricsExporter) Start(ctx context.Context, host component.Host) error

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 SinkMetricsExporterOld

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

SinkMetricsExporterOld acts as a metrics receiver for use in tests.

func (*SinkMetricsExporterOld) AllMetrics

func (sme *SinkMetricsExporterOld) AllMetrics() []consumerdata.MetricsData

AllMetrics returns the metrics sent to the test sink.

func (*SinkMetricsExporterOld) ConsumeMetricsData

func (sme *SinkMetricsExporterOld) ConsumeMetricsData(ctx context.Context, md consumerdata.MetricsData) error

ConsumeMetricsData stores traces for tests.

func (*SinkMetricsExporterOld) SetConsumeMetricsError

func (sme *SinkMetricsExporterOld) SetConsumeMetricsError(err error)

SetConsumeMetricsError sets an error that will be returned by ConsumeMetricsData

func (*SinkMetricsExporterOld) Shutdown

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

Shutdown stops the exporter and is invoked during shutdown.

func (*SinkMetricsExporterOld) Start

func (sme *SinkMetricsExporterOld) Start(ctx context.Context, host component.Host) error

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(ctx context.Context, td pdata.Traces) error

ConsumeTraceData stores traces for tests.

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) Start

func (ste *SinkTraceExporter) Start(ctx context.Context, host component.Host) error

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 SinkTraceExporterOld

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

SinkTraceExporterOld acts as a trace receiver for use in tests.

func (*SinkTraceExporterOld) AllTraces

func (ste *SinkTraceExporterOld) AllTraces() []consumerdata.TraceData

AllTraces returns the traces sent to the test sink.

func (*SinkTraceExporterOld) ConsumeTraceData

func (ste *SinkTraceExporterOld) ConsumeTraceData(ctx context.Context, td consumerdata.TraceData) error

ConsumeTraceData stores traces for tests.

func (*SinkTraceExporterOld) SetConsumeTraceError

func (ste *SinkTraceExporterOld) SetConsumeTraceError(err error)

SetConsumeTraceError sets an error that will be returned by ConsumeTraceData

func (*SinkTraceExporterOld) Shutdown

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

Shutdown stops the exporter and is invoked during shutdown.

func (*SinkTraceExporterOld) Start

func (ste *SinkTraceExporterOld) Start(ctx context.Context, host component.Host) error

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier