Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RegisterMetric = NewMetricsRegister()
)
Functions ¶
This section is empty.
Types ¶
type CounterMetric ¶
type CounterMetric struct {
Metric
Counter prometheus.Counter
}
func NewCounterWithOpts ¶
func NewCounterWithOpts(opts prometheus.CounterOpts) CounterMetric
type CounterVecMetric ¶
type CounterVecMetric struct {
Metric
CounterVec *prometheus.CounterVec
}
func NewCounterVecWithOpts ¶
func NewCounterVecWithOpts(opts prometheus.CounterOpts, labelNames []string) CounterVecMetric
type GaugeMetric ¶
type GaugeMetric struct {
Metric
Gauge prometheus.Gauge
}
func NewGaugeWithOpts ¶
func NewGaugeWithOpts(opts prometheus.GaugeOpts) GaugeMetric
type Metric ¶
type Metric struct {
Type string
Namespace string
Subsystem string
Name string
Help string
FQDN string
}
type MetricRegistry ¶
type MetricRegistry struct {
Registerer prometheus.Registerer
Metrics []*Metric
// contains filtered or unexported fields
}
func NewMetricsRegister ¶
func NewMetricsRegister() *MetricRegistry
func (*MetricRegistry) MustRegister ¶
func (m *MetricRegistry) MustRegister(cs IMetric)
MustRegister registers a metric if it hasn't been registered yet.
Usage: MustRegister(...) Example:
func init() {
metrics.RegisterMetric.MustRegister(errorsTotal)
}
Click to show internal directories.
Click to hide internal directories.