trace

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Span

type Span struct {
	Name      string
	Started   time.Time
	Duration  time.Duration
	Aggregate int
	Spans     []*Span
}

An individual span

func (*Span) Finish

func (s *Span) Finish()

Finish a span

func (*Span) Start

func (s *Span) Start(n string) *Span

Begin a sub-span

type Trace

type Trace struct {
	Name  string
	Spans []*Span
	// contains filtered or unexported fields
}

A trace, which manages a set of related spans

func New

func New(n string) *Trace

Create a trace

func (*Trace) Finish

func (t *Trace) Finish()

Finish a trace

func (*Trace) Start

func (t *Trace) Start(n string) *Span

Begin a new span

func (*Trace) Warn

func (t *Trace) Warn(d time.Duration) *Trace

Set the warning threshold

func (*Trace) Write

func (t *Trace) Write(w io.Writer) (int, error)

Write a trace to the specified writer

Jump to

Keyboard shortcuts

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