multitracer

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiSpan

type MultiSpan struct {
	Spans []ot.Span
	// contains filtered or unexported fields
}

MultiSpan represents a list of Spans returned from multiple Tracers, managed by a MultiTracer.

func (*MultiSpan) BaggageItem

func (m *MultiSpan) BaggageItem(restrictedKey string) string

BaggageItem does nothing: baggage propagation is not supported.

func (*MultiSpan) Context

func (m *MultiSpan) Context() ot.SpanContext

func (*MultiSpan) Finish

func (m *MultiSpan) Finish()

func (*MultiSpan) FinishWithOptions

func (m *MultiSpan) FinishWithOptions(opts ot.FinishOptions)

func (*MultiSpan) Log

func (m *MultiSpan) Log(data ot.LogData)

func (*MultiSpan) LogEvent

func (m *MultiSpan) LogEvent(event string)

func (*MultiSpan) LogEventWithPayload

func (m *MultiSpan) LogEventWithPayload(event string, payload interface{})

func (*MultiSpan) LogFields

func (m *MultiSpan) LogFields(fields ...log.Field)

func (*MultiSpan) LogKV

func (m *MultiSpan) LogKV(alternatingKeyValues ...interface{})

func (*MultiSpan) SetBaggageItem

func (m *MultiSpan) SetBaggageItem(restrictedKey, value string) ot.Span

SetBaggageItem does nothing: baggage propagation is not supported.

func (*MultiSpan) SetOperationName

func (m *MultiSpan) SetOperationName(operationName string) ot.Span

func (*MultiSpan) SetTag

func (m *MultiSpan) SetTag(key string, value interface{}) ot.Span

func (*MultiSpan) Tracer

func (m *MultiSpan) Tracer() ot.Tracer

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

type MultiTracer struct {
	Tracers []ot.Tracer
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL