internal

package
v1.999.0-beta.14 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActiveSpanKey = contextKey{}

ActiveSpanKey is used to set tracer context on a context.Context objects with a unique key

View Source
var (
	// ErrInvalidSpanContext is returned when the span context found in the
	// carrier is not of the expected type.
	ErrInvalidSpanContext = v2.ErrInvalidSpanContext
)
View Source
var NoopTracerV2 = TracerV2Adapter{Tracer: v2.NoopTracer{}}

Functions

func ApplyV1FinishOptions

func ApplyV1FinishOptions(opts ...ddtrace.FinishOption) v2.FinishOption

func ApplyV1Options

func ApplyV1Options(opts ...ddtrace.StartSpanOption) v2.StartSpanOption

ApplyV1Options consumes a list of v1 StartSpanOptions and returns a function that can be used to set the corresponding v2 StartSpanConfig fields. This is used to adapt the v1 StartSpanOptions to the v2 StartSpanConfig.

func GetGlobalTracer

func GetGlobalTracer() ddtrace.Tracer

GetGlobalTracer returns the currently active tracer.

func SetGlobalTracer

func SetGlobalTracer(t ddtrace.Tracer)

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

func (NoopSpan) BaggageItem(_ string) string

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

func (NoopSpan) SetBaggageItem(_, _ string)

SetBaggageItem implements ddtrace.Span.

func (NoopSpan) SetOperationName

func (NoopSpan) SetOperationName(_ string)

SetOperationName implements ddtrace.Span.

func (NoopSpan) SetTag

func (NoopSpan) SetTag(_ string, _ interface{})

SetTag implements ddtrace.Span.

func (NoopSpan) Tracer

func (NoopSpan) Tracer() ddtrace.Tracer

Tracer 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

type SpanV2Adapter struct {
	Span *v2.Span
}

func WrapSpan

func WrapSpan(span *v2.Span) 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

type TracerV2Adapter struct {
	Tracer v2.Tracer
}

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.

func (TracerV2Adapter) Stop

func (ta TracerV2Adapter) Stop()

Stop implements ddtrace.Tracer.

Jump to

Keyboard shortcuts

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