Documentation ¶
Index ¶
- Variables
- func BuildFinishConfigV2(opts ...ddtrace.FinishOption) *v2.FinishConfig
- func BuildStartSpanConfigV2(opts ...ddtrace.StartSpanOption) *v2.StartSpanConfig
- func GetGlobalTracer() ddtrace.Tracer
- func SetGlobalTracer(t ddtrace.Tracer)
- type NoopSpan
- func (NoopSpan) BaggageItem(_ string) string
- func (NoopSpan) Context() ddtrace.SpanContext
- func (NoopSpan) Finish(_ ...ddtrace.FinishOption)
- func (NoopSpan) SetBaggageItem(_, _ string)
- func (NoopSpan) SetOperationName(_ string)
- func (NoopSpan) SetTag(_ string, _ interface{})
- func (NoopSpan) Tracer() ddtrace.Tracer
- type NoopSpanContext
- type SpanContextV1Adapter
- func (sca *SpanContextV1Adapter) ForeachBaggageItem(handler func(k string, v string) bool)
- func (sca *SpanContextV1Adapter) SpanID() uint64
- func (sca *SpanContextV1Adapter) TraceID() string
- func (sca *SpanContextV1Adapter) TraceIDBytes() [16]byte
- func (sca *SpanContextV1Adapter) TraceIDLower() uint64
- type SpanContextV2Adapter
- type SpanV2Adapter
- func (sa SpanV2Adapter) BaggageItem(key string) string
- func (sa SpanV2Adapter) Context() ddtrace.SpanContext
- func (sa SpanV2Adapter) Finish(opts ...ddtrace.FinishOption)
- func (sa SpanV2Adapter) Format(f fmt.State, c rune)
- func (sa SpanV2Adapter) Root() ddtrace.Span
- func (sa SpanV2Adapter) SetBaggageItem(key string, val string)
- func (sa SpanV2Adapter) SetOperationName(operationName string)
- func (sa SpanV2Adapter) SetTag(key string, value interface{})
- type TracerV2Adapter
- func (ta TracerV2Adapter) Extract(carrier interface{}) (ddtrace.SpanContext, error)
- func (ta TracerV2Adapter) Inject(context ddtrace.SpanContext, carrier interface{}) error
- func (ta TracerV2Adapter) StartSpan(operationName string, opts ...ddtrace.StartSpanOption) ddtrace.Span
- func (ta TracerV2Adapter) Stop()
Constants ¶
This section is empty.
Variables ¶
var ActiveSpanKey = contextKey{}
ActiveSpanKey is used to set tracer context on a context.Context objects with a unique key
var ( // ErrInvalidSpanContext is returned when the span context found in the // carrier is not of the expected type. ErrInvalidSpanContext = v2.ErrInvalidSpanContext )
var NoopTracerV2 = TracerV2Adapter{Tracer: v2.NoopTracer{}}
Functions ¶
func BuildFinishConfigV2 ¶
func BuildFinishConfigV2(opts ...ddtrace.FinishOption) *v2.FinishConfig
func BuildStartSpanConfigV2 ¶
func BuildStartSpanConfigV2(opts ...ddtrace.StartSpanOption) *v2.StartSpanConfig
func GetGlobalTracer ¶
GetGlobalTracer returns the currently active tracer.
func SetGlobalTracer ¶
SetGlobalTracer sets the global tracer to t.
Types ¶
type NoopSpan ¶
type NoopSpan struct{}
NoopSpan is an implementation of ddtrace.Span that is a no-op.
func (NoopSpan) BaggageItem ¶
BaggageItem implements ddtrace.Span.
func (NoopSpan) Context ¶
func (NoopSpan) Context() ddtrace.SpanContext
Context implements ddtrace.Span.
func (NoopSpan) Finish ¶
func (NoopSpan) Finish(_ ...ddtrace.FinishOption)
Finish implements ddtrace.Span.
func (NoopSpan) SetBaggageItem ¶
SetBaggageItem implements ddtrace.Span.
func (NoopSpan) SetOperationName ¶
SetOperationName implements ddtrace.Span.
type NoopSpanContext ¶
type NoopSpanContext struct{}
NoopSpanContext is an implementation of ddtrace.SpanContext that is a no-op.
func (NoopSpanContext) ForeachBaggageItem ¶
func (NoopSpanContext) ForeachBaggageItem(_ func(k, v string) bool)
ForeachBaggageItem implements ddtrace.SpanContext.
func (NoopSpanContext) SpanID ¶
func (NoopSpanContext) SpanID() uint64
SpanID implements ddtrace.SpanContext.
func (NoopSpanContext) TraceID ¶
func (NoopSpanContext) TraceID() uint64
TraceID implements ddtrace.SpanContext.
type SpanContextV1Adapter ¶
type SpanContextV1Adapter struct { Ctx ddtrace.SpanContext // contains filtered or unexported fields }
func (*SpanContextV1Adapter) ForeachBaggageItem ¶
func (sca *SpanContextV1Adapter) ForeachBaggageItem(handler func(k string, v string) bool)
ForeachBaggageItem implements ddtrace.SpanContext.
func (*SpanContextV1Adapter) SpanID ¶
func (sca *SpanContextV1Adapter) SpanID() uint64
SpanID implements ddtrace.SpanContext.
func (*SpanContextV1Adapter) TraceID ¶
func (sca *SpanContextV1Adapter) TraceID() string
TraceID implements ddtrace.SpanContext.
func (*SpanContextV1Adapter) TraceIDBytes ¶
func (sca *SpanContextV1Adapter) TraceIDBytes() [16]byte
TraceIDBytes implements ddtrace.SpanContext.
func (*SpanContextV1Adapter) TraceIDLower ¶
func (sca *SpanContextV1Adapter) TraceIDLower() uint64
TraceIDLower implements ddtrace.SpanContext.
type SpanContextV2Adapter ¶
type SpanContextV2Adapter struct {
Ctx *v2.SpanContext
}
func (SpanContextV2Adapter) ForeachBaggageItem ¶
func (sca SpanContextV2Adapter) ForeachBaggageItem(handler func(k string, v string) bool)
ForeachBaggageItem implements ddtrace.SpanContext.
func (SpanContextV2Adapter) SpanID ¶
func (sca SpanContextV2Adapter) SpanID() uint64
SpanID implements ddtrace.SpanContext.
func (SpanContextV2Adapter) TraceID ¶
func (sca SpanContextV2Adapter) TraceID() uint64
TraceID implements ddtrace.SpanContext.
func (SpanContextV2Adapter) TraceID128 ¶
func (sca SpanContextV2Adapter) TraceID128() string
TraceID implements ddtrace.SpanContextW3C.
func (SpanContextV2Adapter) TraceID128Bytes ¶
func (sca SpanContextV2Adapter) TraceID128Bytes() [16]byte
TraceID128Bytes implements ddtrace.SpanContextW3C.
type SpanV2Adapter ¶
func (SpanV2Adapter) BaggageItem ¶
func (sa SpanV2Adapter) BaggageItem(key string) string
BaggageItem implements ddtrace.Span.
func (SpanV2Adapter) Context ¶
func (sa SpanV2Adapter) Context() ddtrace.SpanContext
Context implements ddtrace.Span.
func (SpanV2Adapter) Finish ¶
func (sa SpanV2Adapter) Finish(opts ...ddtrace.FinishOption)
Finish implements ddtrace.Span.
func (SpanV2Adapter) Format ¶
func (sa SpanV2Adapter) Format(f fmt.State, c rune)
Format implements fmt.Formatter.
func (SpanV2Adapter) Root ¶
func (sa SpanV2Adapter) Root() ddtrace.Span
Root implements appsec.rooter.
func (SpanV2Adapter) SetBaggageItem ¶
func (sa SpanV2Adapter) SetBaggageItem(key string, val string)
SetBaggageItem implements ddtrace.Span.
func (SpanV2Adapter) SetOperationName ¶
func (sa SpanV2Adapter) SetOperationName(operationName string)
SetOperationName implements ddtrace.Span.
func (SpanV2Adapter) SetTag ¶
func (sa SpanV2Adapter) SetTag(key string, value interface{})
SetTag implements ddtrace.Span.
type TracerV2Adapter ¶
func (TracerV2Adapter) Extract ¶
func (ta TracerV2Adapter) Extract(carrier interface{}) (ddtrace.SpanContext, error)
Extract implements ddtrace.Tracer.
func (TracerV2Adapter) Inject ¶
func (ta TracerV2Adapter) Inject(context ddtrace.SpanContext, carrier interface{}) error
Inject implements ddtrace.Tracer.
func (TracerV2Adapter) StartSpan ¶
func (ta TracerV2Adapter) StartSpan(operationName string, opts ...ddtrace.StartSpanOption) ddtrace.Span
StartSpan implements ddtrace.Tracer.