telemetry

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpSpan

type HttpSpan struct {
	StarterFunc           func(s *HttpSpan)
	FinisherFunc          func(s *HttpSpan, httpCode int, whoFinishes string)
	Id, Php, Path, Method string
	T0, T1                time.Time // when the span was created
	ExtraObject           any       // can be used to attach extra user context, e.g. to report data transferred, other attributed of a span
}

func (*HttpSpan) Finish

func (s *HttpSpan) Finish(httpCode int, whoFinishes string)

only calls a finisher, if T0 was set, else ignores it

func (*HttpSpan) Start added in v1.12.2

func (s *HttpSpan) Start()

type HttpSpanCreator

type HttpSpanCreator struct {
	StarterFunc  func(s *HttpSpan)
	FinisherFunc func(s *HttpSpan, httpCode int, whoFinishes string)
}

func NewHttpSpanCreator

func NewHttpSpanCreator(optFuncs ...func(c *HttpSpanCreator)) (c *HttpSpanCreator, err error)

func (*HttpSpanCreator) NewSpan

func (c *HttpSpanCreator) NewSpan(id, php, path, method string) (s *HttpSpan)

Jump to

Keyboard shortcuts

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