Documentation ¶
Index ¶
- type Factory
- func (f *Factory) Counter(name string, tags map[string]string) metrics.Counter
- func (f *Factory) Gauge(name string, tags map[string]string) metrics.Gauge
- func (f *Factory) Namespace(name string, tags map[string]string) metrics.Factory
- func (f *Factory) Timer(name string, tags map[string]string) metrics.Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory implements metrics.Factory backed by Prometheus registry.
func New ¶
func New(registerer prometheus.Registerer, buckets []float64) *Factory
New creates a Factory backed by Prometheus registry. Typically the first argument should be prometheus.DefaultRegisterer.
Parameter buckets defines the buckets into which Timer observations are counted. Each element in the slice is the upper inclusive bound of a bucket. The values must be sorted in strictly increasing order. There is no need to add a highest bucket with +Inf bound, it will be added implicitly. The default value is prometheus.DefBuckets.
Click to show internal directories.
Click to hide internal directories.