tracing

package
v1.83.7 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 8 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 TraceIDFromCtx

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 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

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