Documentation ¶
Index ¶
- type Instrumentation
- func (i *Instrumentation) Debug(msg string, fields ...zap.Field)
- func (i *Instrumentation) Error(msg string, fields ...zap.Field)
- func (i *Instrumentation) Hostname() string
- func (i *Instrumentation) Info(msg string, fields ...zap.Field)
- func (i *Instrumentation) Metric(name string) prometheus.Collector
- func (i *Instrumentation) RegisterCounter(name, help string, labels []string)
- func (i *Instrumentation) RegisterGauge(name, help string, labels []string)
- func (i *Instrumentation) RegisterHistogram(name, help string, labels []string, buckets []float64)
- func (i *Instrumentation) RegisterSummary(name, help string, labels []string)
- func (i *Instrumentation) Shutdown() error
- func (i *Instrumentation) Start() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instrumentation ¶
Instrumentation holds the instrumentation definitions and log on a package to
ensure every service behaves exactly the same.
func New ¶
func New(ipPort string, debug bool) (*Instrumentation, error)
New returns an Instrumentation object
func (*Instrumentation) Debug ¶
func (i *Instrumentation) Debug(msg string, fields ...zap.Field)
Debug uses the zap.Logger logging functionality
func (*Instrumentation) Error ¶
func (i *Instrumentation) Error(msg string, fields ...zap.Field)
Error uses the zap.Logger logging functionality
func (*Instrumentation) Hostname ¶
func (i *Instrumentation) Hostname() string
Hostname returns the name of the host being instrumented
func (*Instrumentation) Info ¶
func (i *Instrumentation) Info(msg string, fields ...zap.Field)
Info uses the zap.Logger logging functionality
func (*Instrumentation) Metric ¶
func (i *Instrumentation) Metric(name string) prometheus.Collector
Metric returns a metric from the map safely
func (*Instrumentation) RegisterCounter ¶
func (i *Instrumentation) RegisterCounter(name, help string, labels []string)
RegisterCounter registers gauges
func (*Instrumentation) RegisterGauge ¶
func (i *Instrumentation) RegisterGauge(name, help string, labels []string)
RegisterGauge registers gauges
func (*Instrumentation) RegisterHistogram ¶
func (i *Instrumentation) RegisterHistogram(name, help string, labels []string, buckets []float64)
RegisterHistogram registers a new histogram to be consumed by Prometheus
func (*Instrumentation) RegisterSummary ¶
func (i *Instrumentation) RegisterSummary(name, help string, labels []string)
RegisterSummary registers a new summany to be consumed by Prometheus
func (*Instrumentation) Shutdown ¶
func (i *Instrumentation) Shutdown() error
Shutdown stops the instrumentation server
func (*Instrumentation) Start ¶
func (i *Instrumentation) Start() error
Start the instrumentation server