Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunEndToEndTest ¶
func RunEndToEndTest(ctx context.Context, t *testing.T, exp *otlptrace.Exporter, tracesCollector TracesCollector)
RunEndToEndTest can be used by otlptrace.Client tests to validate themselves.
func RunExporterShutdownTest ¶
func SingleReadOnlySpan ¶
func SingleReadOnlySpan() []tracesdk.ReadOnlySpan
SingleReadOnlySpan returns a one-element slice with a read-only span. It may be useful for testing driver's trace export.
Types ¶
type SpansStorage ¶
type SpansStorage struct {
// contains filtered or unexported fields
}
SpansStorage stores the spans. Mock collectors can use it to store spans they have received.
func NewSpansStorage ¶
func NewSpansStorage() SpansStorage
NewSpansStorage creates a new spans storage.
func (*SpansStorage) AddSpans ¶
func (s *SpansStorage) AddSpans(request *collectortracepb.ExportTraceServiceRequest)
AddSpans adds spans to the spans storage.
func (*SpansStorage) GetResourceSpans ¶
func (s *SpansStorage) GetResourceSpans() []*tracepb.ResourceSpans
GetResourceSpans returns the stored resource spans.
func (*SpansStorage) GetSpans ¶
func (s *SpansStorage) GetSpans() []*tracepb.Span
GetSpans returns the stored spans.
type TracesCollector ¶
type TracesCollector interface { Stop() error GetResourceSpans() []*tracepb.ResourceSpans }
TracesCollector mocks a collector for the end-to-end testing.
Click to show internal directories.
Click to hide internal directories.