instrumentation

package
v0.0.0-...-20fe154 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instrumentation

type Instrumentation struct {
	sync.Mutex
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL