trace

package
v0.0.0-...-b2a0db9 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package tag adds support for telemetry tracins.

Package trace adds support for telemetry tracing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detach

func Detach(ctx context.Context) context.Context

Detach returns a context without an associated span. This allows the creation of spans that are not children of the current span.

func RegisterObservers

func RegisterObservers(o ...Observer)

func StartSpan

func StartSpan(ctx context.Context, name string, tags ...tag.Tag) (context.Context, func())

Types

type Event

type Event struct {
	Time time.Time
	Tags tag.List
}

type Observer

type Observer func(*Span)

type Span

type Span struct {
	Name     string
	TraceID  TraceID
	SpanID   SpanID
	ParentID SpanID
	Start    time.Time
	Finish   time.Time
	Tags     tag.List
	Events   []Event
	// contains filtered or unexported fields
}

func (*Span) Format

func (s *Span) Format(f fmt.State, r rune)

type SpanID

type SpanID [8]byte

func (SpanID) IsValid

func (s SpanID) IsValid() bool

func (SpanID) String

func (s SpanID) String() string

type TraceID

type TraceID [16]byte

func (TraceID) String

func (t TraceID) String() string

Jump to

Keyboard shortcuts

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