Documentation
¶
Index ¶
- Constants
- Variables
- func Active() bool
- func CtxGetScope(ctx context.Context) string
- func CtxScope(ctx context.Context, scope string) context.Context
- func CtxSubScope(ctx context.Context, subscope string) context.Context
- func InjectImpl(newimpl InternalNew) error
- type Counter
- type Creator
- type Gauge
- type Histogram
- type InternalNew
- type Summary
- type SummaryOpts
Constants ¶
View Source
const CtxScopeKey = "ipfs.metrics.scope"
Variables ¶
View Source
var ErrImplemented = errors.New("there is implemenation already injected")
Functions ¶
func CtxGetScope ¶
func InjectImpl ¶
func InjectImpl(newimpl InternalNew) error
Types ¶
type Creator ¶
type Creator interface { Counter() Counter Gauge() Gauge Histogram(buckets []float64) Histogram // opts cannot be nil, use empty summary instance Summary(opts SummaryOpts) Summary }
type Gauge ¶
type Gauge interface { Set(float64) // Introduced discontinuity Inc() Dec() Add(float64) Sub(float64) }
Increse and decrese metric
type InternalNew ¶
type SummaryOpts ¶
type SummaryOpts struct { Objectives map[float64]float64 MaxAge time.Duration AgeBuckets uint32 BufCap uint32 }
Consult http://godoc.org/github.com/prometheus/client_golang/prometheus#SummaryOpts
Click to show internal directories.
Click to hide internal directories.