Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
// AcceptMetrics is called when new metrics become available
AcceptMetrics(message *metrics_pb.MetricsMessage)
}
Handler represents a sink for metric events
type Histogram ¶
Histogram represents a metric which is measuring the distribution of values for some measurement
type IntervalCounter ¶
IntervalCounter allows tracking counters which are bucketized by some interval
type Metric ¶
type Metric interface {
Dispose()
}
Metric is the base functionality for all metrics types
type Registry ¶
type Registry interface {
SourceId() string
Gauge(name string) Gauge
FuncGauge(name string, f func() int64) Gauge
Meter(name string) Meter
Histogram(name string) Histogram
Timer(name string) Timer
EachMetric(visitor func(name string, metric Metric))
IsValidMetric(name string) bool
Poll() *metrics_pb.MetricsMessage
DisposeAll()
}
Registry allows for configuring and accessing metrics for a fabric application
type UsageCounter ¶ added in v1.1.0
type UsageCounter interface {
Metric
Update(source UsageSource, usageType string, time time.Time, value uint64)
}
A UsageCounter allows tracking usage bucketized by some interval
type UsageRegistry ¶
type UsageRegistry interface {
Registry
PollWithoutUsageMetrics() *metrics_pb.MetricsMessage
IntervalCounter(name string, intervalSize time.Duration) IntervalCounter
UsageCounter(name string, intervalSize time.Duration) UsageCounter
FlushToHandler(handler Handler)
StartReporting(eventSink Handler, reportInterval time.Duration, msgQueueSize int)
}
UsageRegistry extends registry to allow collecting usage metrics
func NewUsageRegistry ¶
func NewUsageRegistry(sourceId string, tags map[string]string, closeNotify <-chan struct{}) UsageRegistry
type UsageSource ¶ added in v1.1.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.