Documentation ¶
Index ¶
- type Collector
- type Counter
- type DynamicGauge
- type Gauge
- type SelfTelemetryMetaFunc
- type Server
- func (s *Server) AfterSharingStart() error
- func (s *Server) Close() error
- func (s *Server) NewCounter(name, help string, labels ...string) telemetry.Counter
- func (s *Server) NewDynamicGauge(name, help string, labels ...string) telemetry.DynamicGauge
- func (s *Server) NewGauge(name, help string, getter func() float64, labels ...string) telemetry.Gauge
- func (s *Server) NewTimer(name, help string, labels ...string) telemetry.Timer
- func (s *Server) Register(meta ...SelfTelemetryMetaFunc)
- func (s *Server) Start(config *telemetry.Config) error
- func (s *Server) WithMeta(name string, collector prometheus.Collector) SelfTelemetryMetaFunc
- type TimeRecorder
- type Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct { Collector // contains filtered or unexported fields }
The counter metric.
type DynamicGauge ¶
type DynamicGauge struct { Collector // contains filtered or unexported fields }
func (*DynamicGauge) Dec ¶
func (i *DynamicGauge) Dec(labels ...string)
func (*DynamicGauge) Inc ¶
func (i *DynamicGauge) Inc(labels ...string)
type SelfTelemetryMetaFunc ¶
type SelfTelemetryMetaFunc func() (string, prometheus.Collector)
SelfTelemetryMetaFunc returns the metric name and the metric instance.
type Server ¶
type Server struct { telemetry.PrometheusConfig Gatherer prometheus.Gatherer // The gatherer is for fetching metrics from the registry. // contains filtered or unexported fields }
func (*Server) AfterSharingStart ¶
func (*Server) NewCounter ¶
NewCounter create a new counter if no metric with the same name exists.
func (*Server) NewDynamicGauge ¶
func (s *Server) NewDynamicGauge(name, help string, labels ...string) telemetry.DynamicGauge
func (*Server) Register ¶
func (s *Server) Register(meta ...SelfTelemetryMetaFunc)
Register registers the metric meta to the registerer.
func (*Server) WithMeta ¶
func (s *Server) WithMeta(name string, collector prometheus.Collector) SelfTelemetryMetaFunc
WithMeta is used as the param of the Register function.
type TimeRecorder ¶
type TimeRecorder struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.