Documentation
¶
Index ¶
- func ClearSpanProcessor(t *testing.T, ctx context.Context)
- func FetchNormalizedSpans(t *testing.T, keepSpanID, keepTraceID, sortSpansByID bool) []map[string]any
- func FetchOrderedSpans(sortSpansByID bool) []tracing.Span
- func FetchTraces() []tracing.Trace
- func RequireNoSpans(t *testing.T)
- func RequireNoTraces(t *testing.T)
- func Setup(t *testing.T)
- func SetupCtx(t *testing.T, ctx context.Context)
- func SetupSpanProcessor()
- func ShutdownTraceProvider(ctx context.Context)
- type SpanProcessorEvent
- type SpanProcessorForTests
- func (p *SpanProcessorForTests) Clear()
- func (p *SpanProcessorForTests) ForceFlush(context.Context) error
- func (p *SpanProcessorForTests) GetOrderedSpans(includingEmpty, sortSpansByID bool) []tracing.Span
- func (p *SpanProcessorForTests) GetTraces(includingEmpty bool) []tracing.Trace
- func (p *SpanProcessorForTests) OnSpanEnd(_ context.Context, span tracing.Span) error
- func (p *SpanProcessorForTests) OnSpanStart(context.Context, tracing.Span) error
- func (p *SpanProcessorForTests) OnTraceEnd(context.Context, tracing.Trace) error
- func (p *SpanProcessorForTests) OnTraceStart(_ context.Context, trace tracing.Trace) error
- func (p *SpanProcessorForTests) Shutdown(context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchNormalizedSpans ¶
func FetchOrderedSpans ¶
func FetchTraces ¶
func RequireNoSpans ¶
func RequireNoTraces ¶
func SetupSpanProcessor ¶
func SetupSpanProcessor()
func ShutdownTraceProvider ¶
Types ¶
type SpanProcessorEvent ¶
type SpanProcessorEvent string
const ( TraceStart SpanProcessorEvent = "trace_start" TraceEnd SpanProcessorEvent = "trace_end" SpanStart SpanProcessorEvent = "span_start" SpanEnd SpanProcessorEvent = "span_end" )
func FetchEvents ¶
func FetchEvents() []SpanProcessorEvent
type SpanProcessorForTests ¶
type SpanProcessorForTests struct {
// contains filtered or unexported fields
}
SpanProcessorForTests is a simple processor that stores finished spans in memory. This is concurrency-safe and suitable for tests or basic usage.
func NewSpanProcessorForTests ¶
func NewSpanProcessorForTests() *SpanProcessorForTests
func SpanProcessorTesting ¶
func SpanProcessorTesting() *SpanProcessorForTests
func (*SpanProcessorForTests) Clear ¶
func (p *SpanProcessorForTests) Clear()
func (*SpanProcessorForTests) ForceFlush ¶
func (p *SpanProcessorForTests) ForceFlush(context.Context) error
func (*SpanProcessorForTests) GetOrderedSpans ¶
func (p *SpanProcessorForTests) GetOrderedSpans(includingEmpty, sortSpansByID bool) []tracing.Span
func (*SpanProcessorForTests) GetTraces ¶
func (p *SpanProcessorForTests) GetTraces(includingEmpty bool) []tracing.Trace
func (*SpanProcessorForTests) OnSpanStart ¶
func (*SpanProcessorForTests) OnTraceEnd ¶
func (*SpanProcessorForTests) OnTraceStart ¶
Click to show internal directories.
Click to hide internal directories.