tracing

package
v0.106.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCaller

func GetCaller() string

func Sampler

func Sampler() sdk_trace.Sampler

func TraceHandler

func TraceHandler(handler http.Handler, ignoredEndpoints ...string) http.Handler

func TraceIDFromCtx added in v0.104.9

func TraceIDFromCtx(ctx context.Context) string

Types

type Config

type Config interface {
	NewTracer() error
}

type Span

type Span struct {
	// contains filtered or unexported fields
}

func CreateSpan

func CreateSpan(span api_trace.Span) *Span

func NewClientInterceptorSpan

func NewClientInterceptorSpan(ctx context.Context) (context.Context, *Span)

func NewClientSpan

func NewClientSpan(ctx context.Context) (context.Context, *Span)

func NewNamedSpan added in v0.97.0

func NewNamedSpan(ctx context.Context, name string) (context.Context, *Span)

func NewServerInterceptorSpan

func NewServerInterceptorSpan(ctx context.Context) (context.Context, *Span)

func NewServerSpan

func NewServerSpan(ctx context.Context) (context.Context, *Span)

func NewSpan

func NewSpan(ctx context.Context) (context.Context, *Span)

func NewSpanHTTP

func NewSpanHTTP(r *http.Request) (*http.Request, *Span)

func (*Span) End

func (s *Span) End()

func (*Span) EndWithError

func (s *Span) EndWithError(err error)

func (*Span) SetStatusByError

func (s *Span) SetStatusByError(err error)

type Tracer

type Tracer interface {
	NewSpan(ctx context.Context, caller string) (context.Context, *Span)
	NewClientSpan(ctx context.Context, caller string) (context.Context, *Span)
	NewServerSpan(ctx context.Context, caller string) (context.Context, *Span)
	NewClientInterceptorSpan(ctx context.Context, name string) (context.Context, *Span)
	NewServerInterceptorSpan(ctx context.Context, name string) (context.Context, *Span)
	NewSpanHTTP(r *http.Request, caller string) (*http.Request, *Span)
	Sampler() sdk_trace.Sampler
}
var T Tracer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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