tracing

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPP

func AddPP(span *Span, begin time.Time)

func EndPP

func EndPP(span *Span)

func Finish

func Finish(spans ...*Span)

func NewContextWithSpan

func NewContextWithSpan(ctx context.Context, c *Span) context.Context

func NewContextWithTrace

func NewContextWithTrace(ctx context.Context, t *Trace) context.Context

func NewTrace

func NewTrace(name string, opt ...tracing.StartSpanOption) (*Trace, *Span)

func SpanElapsed

func SpanElapsed(span *Span, fn func())

func StartPP

func StartPP(span *Span)

Types

type ContextKey

type ContextKey string

type Span

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

func SpanFromContext

func SpanFromContext(ctx context.Context) *Span

func Start

func Start(span *Span, name string, withPP bool) *Span

func (*Span) AddIntField

func (s *Span) AddIntField(key string, val int)

func (*Span) AddIntFields

func (s *Span) AddIntFields(key []string, val []int)

func (*Span) AddStringField

func (s *Span) AddStringField(key, val string)

func (*Span) AppendNameValue

func (s *Span) AppendNameValue(key string, val interface{})

func (*Span) Context

func (s *Span) Context() tracing.SpanContext

func (*Span) Count

func (s *Span) Count(name string, x int64)

func (*Span) CreateCounter

func (s *Span) CreateCounter(name string, unit string) *SpanCounter

func (*Span) EndPP

func (s *Span) EndPP()

func (*Span) Finish

func (s *Span) Finish()

func (*Span) MergeFields

func (s *Span) MergeFields(args ...fields.Field)

func (*Span) MergeLabels

func (s *Span) MergeLabels(args ...string)

func (*Span) SetFields

func (s *Span) SetFields(set fields.Fields)

func (*Span) SetLabels

func (s *Span) SetLabels(args ...string)

func (*Span) SetNameValue

func (s *Span) SetNameValue(val string)

func (*Span) StartPP

func (s *Span) StartPP() *Span

func (*Span) StartSpan

func (s *Span) StartSpan(name string, opt ...tracing.StartSpanOption) *Span

type SpanCounter

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

func (*SpanCounter) Name

func (c *SpanCounter) Name() string

func (*SpanCounter) Value

func (c *SpanCounter) Value() string

type Trace

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

func TraceFromContext

func TraceFromContext(ctx context.Context) *Trace

func (*Trace) AddSub

func (t *Trace) AddSub(trace *Trace, span *Span)

func (*Trace) MarshalBinary

func (t *Trace) MarshalBinary() ([]byte, error)

func (*Trace) String

func (t *Trace) String() string

func (*Trace) Tree

func (t *Trace) Tree() *tracing.TreeNode

func (*Trace) UnmarshalBinary

func (t *Trace) UnmarshalBinary(data []byte) error

Jump to

Keyboard shortcuts

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