telemetry

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ok    = StatusCode("Ok")
	Error = StatusCode("Error")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Span

type Span struct {
	Ctx context.Context

	Level int
	Num   int
	// contains filtered or unexported fields
}

func SpanFromContext

func SpanFromContext(ctx context.Context) (span *Span, ok bool)

func Start

func Start(ctx context.Context, name string) (context.Context, *Span)

func (*Span) End

func (s *Span) End()

func (*Span) SetAttributes

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

func (*Span) SetStatus

func (s *Span) SetStatus(code StatusCode, description string)

func (*Span) TimeEstimate

func (s *Span) TimeEstimate() time.Duration

type StateItem

type StateItem struct {
	Name         string
	Num          int
	Start        time.Time
	End          *time.Time
	TimeEstimate time.Duration
	Attributes   map[string]string
	Status       StatusCode
	Level        int
}

type StatusCode

type StatusCode string

type Telemetry

type Telemetry []*StateItem

func Unpack

func Unpack(ctx context.Context) Telemetry

func (Telemetry) Len

func (s Telemetry) Len() int

func (Telemetry) Less

func (s Telemetry) Less(i, j int) bool

func (Telemetry) Swap

func (s Telemetry) Swap(i, j int)

Jump to

Keyboard shortcuts

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