Documentation ¶
Overview ¶
Package multitracer provides a way to run more than one OpenTracing tracers, by multiplexing calls across multiple Tracer, Span, and SpanContext implementations. The goal is to support a user sending data to two tracing vendors simultaneously (e.g., AppOptics and another implementation).
Currently, baggage propagation is not supported, and the two tracers must use distinct HTTP header names, so as not to clobber each other.
Index ¶
- type MultiSpan
- func (m *MultiSpan) BaggageItem(restrictedKey string) string
- func (m *MultiSpan) Context() ot.SpanContext
- func (m *MultiSpan) Finish()
- func (m *MultiSpan) FinishWithOptions(opts ot.FinishOptions)
- func (m *MultiSpan) Log(data ot.LogData)
- func (m *MultiSpan) LogEvent(event string)
- func (m *MultiSpan) LogEventWithPayload(event string, payload interface{})
- func (m *MultiSpan) LogFields(fields ...log.Field)
- func (m *MultiSpan) LogKV(alternatingKeyValues ...interface{})
- func (m *MultiSpan) SetBaggageItem(restrictedKey, value string) ot.Span
- func (m *MultiSpan) SetOperationName(operationName string) ot.Span
- func (m *MultiSpan) SetTag(key string, value interface{}) ot.Span
- func (m *MultiSpan) Tracer() ot.Tracer
- type MultiSpanContext
- type MultiTracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiSpan ¶
MultiSpan represents a list of Spans returned from multiple Tracers, managed by a MultiTracer.
func (*MultiSpan) BaggageItem ¶
BaggageItem does nothing: baggage propagation is not supported.
func (*MultiSpan) Context ¶
func (m *MultiSpan) Context() ot.SpanContext
func (*MultiSpan) FinishWithOptions ¶
func (m *MultiSpan) FinishWithOptions(opts ot.FinishOptions)
func (*MultiSpan) LogEventWithPayload ¶
func (*MultiSpan) SetBaggageItem ¶
SetBaggageItem does nothing: baggage propagation is not supported.
func (*MultiSpan) SetOperationName ¶
type MultiSpanContext ¶
type MultiSpanContext struct { SpanContexts []ot.SpanContext // contains filtered or unexported fields }
MultiSpanContext represents a list of SpanContext returned from multiple Spans, managed by a MultiTracer.
func (*MultiSpanContext) ForeachBaggageItem ¶
func (m *MultiSpanContext) ForeachBaggageItem(handler func(k, v string) bool)
ForeachBaggageItem does nothing: baggage propagation is not supported.
type MultiTracer ¶
MultiTracer multiplexes OpenTracing API calls across multiple Tracer implementations.
func (*MultiTracer) Extract ¶
func (m *MultiTracer) Extract(format interface{}, carrier interface{}) (ot.SpanContext, error)
Extract reads context propagated using multiple tracers. Errors from individual tracers are dropped.
func (*MultiTracer) Inject ¶
func (m *MultiTracer) Inject(sm ot.SpanContext, format interface{}, carrier interface{}) error
Inject propagates context using multiple tracers. Errors from individual tracers are dropped.
func (*MultiTracer) StartSpan ¶
func (m *MultiTracer) StartSpan(operationName string, opts ...ot.StartSpanOption) ot.Span