instrument

package
v0.0.0-...-728d7d2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//Tracer = trace.NewNoopTracerProvider().Tracer("noop") // no op by default (for tests, dev)
	Tracer = otel.Tracer("autoupdate-server")
)

Functions

func FromContext

func FromContext(ctx context.Context) context.Context

func Get

func Get(ctx context.Context, k any) any

func NewOTELMiddleware

func NewOTELMiddleware(tp *sdktrace.TracerProvider) (func(next http.Handler) http.Handler, func() error)

func UserContext

func UserContext(ctx context.Context) context.Context

func Value

func Value(ctx context.Context, k any) string

Types

type Opts

type Opts struct {
	HoneycombSampleRate int
	ReportingInterval   time.Duration
}

Jump to

Keyboard shortcuts

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