trace

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatadogTracer

type DatadogTracer struct{}

func (*DatadogTracer) SpanFromContext

func (t *DatadogTracer) SpanFromContext(ctx context.Context) Span

func (*DatadogTracer) StartSpan

func (t *DatadogTracer) StartSpan(ctx context.Context, resourceName string) (context.Context, Span)

type MultiTracer

type MultiTracer []Tracer

MultiTracer uses the first tracer that responds with a non-empty span

func (MultiTracer) SpanFromContext

func (ts MultiTracer) SpanFromContext(ctx context.Context) Span

func (MultiTracer) StartSpan

func (ts MultiTracer) StartSpan(ctx context.Context, resourceName string) (context.Context, Span)

type NilSpan

type NilSpan struct{}

func (*NilSpan) AddStringAttribute

func (s *NilSpan) AddStringAttribute(name, value string)

func (*NilSpan) Empty

func (s *NilSpan) Empty() bool

func (*NilSpan) End

func (s *NilSpan) End()

func (*NilSpan) Internal

func (s *NilSpan) Internal() any

type OpenCensusTracer

type OpenCensusTracer struct{}

func (*OpenCensusTracer) SpanFromContext

func (t *OpenCensusTracer) SpanFromContext(ctx context.Context) Span

func (*OpenCensusTracer) StartSpan

func (t *OpenCensusTracer) StartSpan(ctx context.Context, resourceName string) (context.Context, Span)

type Span

type Span interface {
	End()
	AddStringAttribute(name, value string)

	Empty() bool
	Internal() any
}

type Tracer

type Tracer interface {
	StartSpan(ctx context.Context, resourceName string) (context.Context, Span)
	SpanFromContext(ctx context.Context) Span
}

Jump to

Keyboard shortcuts

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