Documentation
¶
Index ¶
- Constants
- func ErrorOnly() counter.Provider
- func ErrorWrap(err error) errorWrap
- func NewCache() counter.Provider
- func NewClient() counter.Provider
- func NewCtxErrOnly() counter.Provider
- func NewHttp() counter.Provider
- func NewWrite() counter.Provider
- func TestMapping(t *testing.T, builder func() counter.Provider)
- type Count
- type Dir
- type E
- type GMeter
- type Occupancy
- type Sum
- type TopK
- type Values
Constants ¶
View Source
const ( // Not deprecated since still used in other metrics NoSuchKey = "noKey" // Deprecated due to complications HasValue = "hasValue" CacheHit = "cacheHit" CacheCollision = "collision" CacheExpired = "expired" LocalHasValue = "localHasValue" LocalNoSuchKey = "localNoKey" L1NoSuchKey = "L1NoKey" L1HasValue = "L1HasValue" L2NoSuchKey = "L2NoKey" L1Copy = "L1Copy" // Aerospike Errors - still complicated Timeout = "timeout" Down = "down" )
View Source
const ( ErrorKey = "error" // Context errors Canceled = "canceled" DeadlineExceeded = "deadlineExceeded" )
View Source
const ( Enter = Dir(true) Exit = Dir(false) )
View Source
const ( L1Write = "L1Write" L2Write = "L2Write" )
View Source
const (
EarlyCtxError = "ctx"
)
View Source
const Pending = "pending"
Variables ¶
This section is empty.
Functions ¶
func NewCtxErrOnly ¶ added in v0.13.0
Types ¶
type Dir ¶ added in v0.13.0
type Dir bool
Dir (direction) should be true if this is an enter event; otherwise should be false. It is expected that every Dir has an Exit, but that may not always happen.
type GMeter ¶ added in v0.13.1
type GMeter struct { *gmetric.Service Unit time.Duration RecentDuration time.Duration NumRecent int }
func DefaultGMeter ¶ added in v0.13.1
type Occupancy ¶ added in v0.13.0
type Occupancy struct { // Members are exposed due to how gmetrics operates. Max uint64 `json:",omitempty"` // contains filtered or unexported fields }
Occupancy keeps track of in-out metrics (not input-output); in-out counters are numbers that track the number of start and end events; with a focus on tracking the maximum number of starts without an end event.
type Sum ¶ added in v0.13.0
type Sum struct {
Total uint64 `json:",omitempty"`
}
TODO consider https://github.com/beorn7/perks
type Values ¶
type Values []interface{}
Values is a utility to pass multiple events to gmetric.
func (*Values) AppendError ¶ added in v0.9.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.