Versions in this module Expand all Collapse all v1 v1.1.2 Dec 8, 2023 Changes in this version + var DefaultMetricsHandler = PrometheusHandler() + func Initialize(s string, buildInfo BuildInfo, option *Opts) + func NewWebService(basePath string) *serviceBuilder + func PrometheusHandler() http.Handler + func RestfulFilter() restful.FilterFunction + func ServePrometheus(addr, endpoint string) error + func SetProvider(p Provider) + type BuildInfo struct + BuildDate string + GitHash string + RevisionID string + RoleSeedingVersion string + Version string + type CounterMetric interface + Add func(float64) + Inc func() + func Counter(name string, help string) CounterMetric + type CounterVecMetric interface + With func(labels map[string]string) CounterMetric + func CounterVec(name string, help string, labels []string) CounterVecMetric + type DBMetrics struct + func NewDBMetrics(metricsProvider Provider, dbName string, labels ...string) *DBMetrics + func (d *DBMetrics) NewCall(action string) *dbCallMetrics + type GaugeMetric interface + Add func(float64) + Dec func() + Inc func() + Set func(float64) + SetToCurrentTime func() + Sub func(float64) + func Gauge(name string, help string) GaugeMetric + type GaugeVecMetric interface + With func(labels map[string]string) GaugeMetric + func GaugeVec(name string, help string, labels []string) GaugeVecMetric + type ObserverMetric interface + Observe func(float64) + func Histogram(name string, help string) ObserverMetric + func HistogramWithBuckets(name, help string, buckets []float64) ObserverMetric + func Summary(name string, help string) ObserverMetric + type ObserverVecMetric interface + With func(labels map[string]string) ObserverMetric + func HistogramVec(name string, help string, labels []string) ObserverVecMetric + func HistogramVecWithBuckets(name, help string, buckets []float64, labels []string) ObserverVecMetric + func SummaryVec(name string, help string, labels []string) ObserverVecMetric + type Opts struct + CustomHTTPMetrics *ObserverVecMetric + EnableRuntimeMetrics bool + NamespacePath string + type PrometheusProvider struct + func NewPrometheusProvider(opts PrometheusProviderOpts) PrometheusProvider + func (p PrometheusProvider) NewCounter(name, help string, labels ...string) CounterVecMetric + func (p PrometheusProvider) NewGauge(name, help string, labels ...string) GaugeVecMetric + func (p PrometheusProvider) NewHistogram(name, help string, buckets []float64, labels ...string) ObserverVecMetric + func (p PrometheusProvider) NewSummary(name, help string, labels ...string) ObserverVecMetric + type PrometheusProviderOpts struct + DisableGoCollector bool + DisableProcessCollector bool + type Provider interface + NewCounter func(name, help string, labels ...string) CounterVecMetric + NewGauge func(name, help string, labels ...string) GaugeVecMetric + NewHistogram func(name, help string, buckets []float64, labels ...string) ObserverVecMetric + NewSummary func(name, help string, labels ...string) ObserverVecMetric + var DefaultProvider Provider = NewPrometheusProvider(PrometheusProviderOpts{})