Documentation ¶
Index ¶
- Variables
- type MockContextKeyValue
- type MockEvent
- type MockSpan
- func (s *MockSpan) AddEvent(ctx context.Context, msg string, attrs ...otelcore.KeyValue)
- func (s *MockSpan) AddEventWithTimestamp(ctx context.Context, timestamp time.Time, msg string, ...)
- func (s *MockSpan) AddLink(link oteltrace.Link)
- func (s *MockSpan) End(options ...oteltrace.EndOption)
- func (s *MockSpan) IsRecording() bool
- func (s *MockSpan) Link(sc otelcore.SpanContext, attrs ...otelcore.KeyValue)
- func (s *MockSpan) OverrideTracer(tracer oteltrace.Tracer)
- func (s *MockSpan) SetAttribute(attribute otelcore.KeyValue)
- func (s *MockSpan) SetAttributes(attributes ...otelcore.KeyValue)
- func (s *MockSpan) SetError(v bool)
- func (s *MockSpan) SetName(name string)
- func (s *MockSpan) SetStatus(status codes.Code)
- func (s *MockSpan) SpanContext() otelcore.SpanContext
- func (s *MockSpan) Tracer() oteltrace.Tracer
- type MockTracer
- func (t *MockTracer) DeferredContextSetupHook(ctx context.Context, span oteltrace.Span) context.Context
- func (t *MockTracer) Start(ctx context.Context, name string, opts ...oteltrace.SpanOption) (context.Context, oteltrace.Span)
- func (t *MockTracer) WithSpan(ctx context.Context, name string, body func(context.Context) error) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type MockContextKeyValue ¶
type MockContextKeyValue struct { Key interface{} Value interface{} }
type MockSpan ¶
type MockSpan struct { SpanKind oteltrace.SpanKind Attributes oteldctx.Map StartTime time.Time EndTime time.Time ParentSpanID otelcore.SpanID Events []MockEvent // contains filtered or unexported fields }
func (*MockSpan) AddEventWithTimestamp ¶
func (*MockSpan) IsRecording ¶
func (*MockSpan) Link ¶
func (s *MockSpan) Link(sc otelcore.SpanContext, attrs ...otelcore.KeyValue)
func (*MockSpan) OverrideTracer ¶
func (*MockSpan) SetAttribute ¶
func (*MockSpan) SetAttributes ¶
func (*MockSpan) SpanContext ¶
func (s *MockSpan) SpanContext() otelcore.SpanContext
type MockTracer ¶
type MockTracer struct { Resources oteldctx.Map FinishedSpans []*MockSpan SpareTraceIDs []otelcore.TraceID SpareSpanIDs []otelcore.SpanID SpareContextKeyValues []MockContextKeyValue // contains filtered or unexported fields }
func NewMockTracer ¶
func NewMockTracer() *MockTracer
func (*MockTracer) DeferredContextSetupHook ¶
Click to show internal directories.
Click to hide internal directories.