Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNopMetricsExporter ¶
func NewNopMetricsExporter(options ...NopExporterOption) exporter.MetricsExporter
NewNopMetricsExporter creates an MetricsExporter that just drops the received data.
func NewNopTraceExporter ¶
func NewNopTraceExporter(options ...NopExporterOption) exporter.TraceExporter
NewNopTraceExporter creates an TraceExporter that just drops the received data.
Types ¶
type NopExporterOption ¶
type NopExporterOption func(*nopExporter)
NopExporterOption represents options that can be applied to a NopExporter.
func WithReturnError ¶
func WithReturnError(retError error) NopExporterOption
WithReturnError returns a NopExporterOption that enforces the nop Exporters to return the given error.
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() []consumerdata.MetricsData
AllMetrics returns the metrics sent to the test sink.
func (*SinkMetricsExporter) ConsumeMetricsData ¶
func (sme *SinkMetricsExporter) ConsumeMetricsData(ctx context.Context, md consumerdata.MetricsData) error
ConsumeMetricsData stores traces for tests.
func (*SinkMetricsExporter) Shutdown ¶
func (sme *SinkMetricsExporter) Shutdown() error
Shutdown stops the exporter and is invoked during shutdown.
func (*SinkMetricsExporter) Start ¶ added in v0.2.2
func (sme *SinkMetricsExporter) Start(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() []consumerdata.TraceData
AllTraces returns the traces sent to the test sink.
func (*SinkTraceExporter) ConsumeTraceData ¶
func (ste *SinkTraceExporter) ConsumeTraceData(ctx context.Context, td consumerdata.TraceData) error
ConsumeTraceData stores traces for tests.
func (*SinkTraceExporter) Shutdown ¶
func (ste *SinkTraceExporter) Shutdown() error
Shutdown stops the exporter and is invoked during shutdown.
func (*SinkTraceExporter) Start ¶ added in v0.2.2
func (ste *SinkTraceExporter) Start(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.