Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StoreObserver ¶
type StoreObserver struct {
// contains filtered or unexported fields
}
StoreObserver encapsulates exposing of store specific metrics to Prometheus.
func NewStoreObserver ¶
func NewStoreObserver() *StoreObserver
NewStoreObserver creates a new StoreObserver
func (*StoreObserver) Observe ¶
func (s *StoreObserver) Observe(method string) func()
Observe immediately increments the counter for method and returns a func which will observe an metric item in duration based on the duration.
func (*StoreObserver) Preload ¶
func (m *StoreObserver) Preload(s interface{}, extraIgnoredMethods ...string)
Preload counters and histograms for each method defined on s. You can optionally supply extra ignoreMethods which will be added to the defaultIgnoredMethods array.
Click to show internal directories.
Click to hide internal directories.