tracing

package
v0.0.0-...-9575350 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSpanName

func CreateSpanName(gitProjectPath, pkg, method string) string

Types

type Config

type Config interface {
	NewTracer(ctx context.Context) (Tracer, error)
}

type Span

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

func NewSpan

func NewSpan(span *trace.Span) *Span

func (*Span) AddAnnotation

func (s *Span) AddAnnotation(key string, value interface{}) *Span

AddAnnotation creates an annotation. The annotation will not be added to the tracing use Annotate(msg) afterwards

func (*Span) Annotate

func (s *Span) Annotate(message string) *Span

Annotate creates an annotation in tracing. Before added annotations will be set

func (*Span) Annotatef

func (s *Span) Annotatef(format string, addiations ...interface{}) *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, pkg, method string) (context.Context, *Span)
	NewClientSpan(ctx context.Context, pkg, method string) (context.Context, *Span)
	NewServerSpan(ctx context.Context, pkg, method 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, pkg, method string) (*http.Request, *Span)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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