package internal
import "go.opentelemetry.io/otel/bridge/opentracing/internal"
Index ¶
- Variables
- type MockContextKeyValue
- type MockEvent
- type MockLink
- type MockSpan
- func (s *MockSpan) AddEvent(name string, o ...trace.EventOption)
- func (s *MockSpan) AddLink(link trace.Link)
- func (s *MockSpan) End(options ...trace.SpanEndOption)
- func (s *MockSpan) IsRecording() bool
- func (s *MockSpan) OverrideTracer(tracer trace.Tracer)
- func (s *MockSpan) RecordError(err error, opts ...trace.EventOption)
- func (s *MockSpan) SetAttributes(attributes ...attribute.KeyValue)
- func (s *MockSpan) SetError(v bool)
- func (s *MockSpan) SetName(name string)
- func (s *MockSpan) SetStatus(code codes.Code, msg string)
- func (s *MockSpan) SpanContext() trace.SpanContext
- func (s *MockSpan) Tracer() trace.Tracer
- func (s *MockSpan) TracerProvider() trace.TracerProvider
- type MockTracer
Variables ¶
var ( ComponentKey = attribute.Key("component") ServiceKey = attribute.Key("service") StatusCodeKey = attribute.Key("status.code") StatusMessageKey = attribute.Key("status.message") ErrorKey = attribute.Key("error") NameKey = attribute.Key("name") )
Types ¶
type MockContextKeyValue ¶
type MockContextKeyValue struct { Key interface{} Value interface{} }
type MockEvent ¶
type MockLink ¶
type MockLink struct { SpanContext trace.SpanContext Attributes []attribute.KeyValue }
type MockSpan ¶
type MockSpan struct { embedded.Span SpanKind trace.SpanKind Attributes []attribute.KeyValue StartTime time.Time EndTime time.Time ParentSpanID trace.SpanID Events []MockEvent Links []MockLink // contains filtered or unexported fields }
func (*MockSpan) AddEvent ¶
func (s *MockSpan) AddEvent(name string, o ...trace.EventOption)
func (*MockSpan) AddLink ¶
func (*MockSpan) End ¶
func (s *MockSpan) End(options ...trace.SpanEndOption)
func (*MockSpan) IsRecording ¶
func (*MockSpan) OverrideTracer ¶
func (*MockSpan) RecordError ¶
func (s *MockSpan) RecordError(err error, opts ...trace.EventOption)
func (*MockSpan) SetAttributes ¶
func (*MockSpan) SetError ¶
func (*MockSpan) SetName ¶
func (*MockSpan) SetStatus ¶
func (*MockSpan) SpanContext ¶
func (s *MockSpan) SpanContext() trace.SpanContext
func (*MockSpan) Tracer ¶
func (*MockSpan) TracerProvider ¶
func (s *MockSpan) TracerProvider() trace.TracerProvider
type MockTracer ¶
type MockTracer struct { embedded.Tracer FinishedSpans []*MockSpan SpareTraceIDs []trace.TraceID SpareSpanIDs []trace.SpanID SpareContextKeyValues []MockContextKeyValue TraceFlags trace.TraceFlags // contains filtered or unexported fields }
func NewMockTracer ¶
func NewMockTracer() *MockTracer
func (*MockTracer) DeferredContextSetupHook ¶
func (*MockTracer) Start ¶
func (t *MockTracer) Start(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
Source Files ¶
doc.go mock.go
- Version
- v1.35.0 (latest)
- Published
- Mar 5, 2025
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 2 weeks ago –
Tools for package owners.