k

package
v0.0.0-...-b1f87eb Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCounter

func NewCounter(name string, opts ...metrics.MetricOption) (metrics.Counter, error)

func NewGauge

func NewGauge(name string, opts ...metrics.MetricOption) (metrics.Gauge, error)

func NewHistogram

func NewHistogram(name string, opts ...metrics.MetricOption) (metrics.Histogram, error)

func Register

func Register(ctx context.Context, attrs ...Attribute) context.Context

Types

type Attribute

type Attribute func(context.Context) context.Context

func Bool

func Bool(k string, b bool) Attribute

func Float32

func Float32(k string, f float32) Attribute

func Float64

func Float64(k string, f float64) Attribute

func Int16

func Int16(k string, i int16) Attribute

func Int32

func Int32(k string, i int32) Attribute

func Int64

func Int64(k string, i int64) Attribute

func Int8

func Int8(k string, i int8) Attribute

func Str

func Str(k, s string) Attribute

func Uint16

func Uint16(k string, u uint16) Attribute

func Uint32

func Uint32(k string, u uint32) Attribute

func Uint8

func Uint8(k string, u uint8) Attribute

type Done

type Done func(*context.Context, *error)

func Impure

func Impure(ctx context.Context) (context.Context, Done)

Impure will initiate a new span that can encounter an error during operation

func Operation

func Operation(ctx context.Context, operation string) (context.Context, Done)

Operation will bootstrap a short lived code path and report traces, metrics, and logs automatically.

An operation is assumed to have some failure condition due to side effects.

type NoErrDone

type NoErrDone func(*context.Context)

func Pure

Pure will initiate a new span that cannot encounter an error during operation

Jump to

Keyboard shortcuts

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