Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory interface { // NewCounter creates a new Counter based on the provided CounterOpts. NewCounter(opts prometheus.CounterOpts) prometheus.Counter // NewCounterVec creates a new CounterVec based on the provided CounterOpts and // partitioned by the given label names. NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec // NewGauge creates a new Gauge based on the provided GaugeOpts. NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge // NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and // partitioned by the given label names. NewGaugeVec(opts prometheus.GaugeOpts, labelNames []string) *prometheus.GaugeVec // NewHistogram creates a new Histogram based on the provided HistogramOpts. It // panics if the buckets in HistogramOpts are not in strictly increasing order. NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram // NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and // partitioned by the given label names. NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec }
Factory is the interface to create some native prometheus metric.
func NewDefaultFactory ¶
func NewDefaultFactory() Factory
NewDefaultFactory returns a default implementation of Factory.
type Registry ¶
type Registry = prometheus.Registerer
Registry is the interface to register or unregister metrics.
func NewDefaultRegistry ¶
func NewDefaultRegistry() Registry
NewDefaultRegistry returns a default implementation of Registry.
func NewNoopRegistry ¶
func NewNoopRegistry() Registry
NewNoopRegistry returns a Registry that does nothing. It is used for the case where metrics have been registered in factory automatically.
Click to show internal directories.
Click to hide internal directories.