Documentation
¶
Overview ¶
prometheus
Index ¶
- func DecrementGauge(i InstrumentationAPI, name string, labels ...string) error
- func IncrementCounter(i InstrumentationAPI, name string, labels ...string) error
- func IncrementGauge(i InstrumentationAPI, name string, labels ...string) error
- func ObserveHistogram(i InstrumentationAPI, value float64, name string, labels ...string) error
- type EmptyInterface
- type Instrumentation
- type InstrumentationAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecrementGauge ¶
func DecrementGauge(i InstrumentationAPI, name string, labels ...string) error
DecrementGauge, is the exported function responsible for decrementing a gauge by 1 using a InstrumentationAPI interface. If the InstrumentationAPI method noOp() returns true, then no instrumentation is performed by this function.
func IncrementCounter ¶
func IncrementCounter(i InstrumentationAPI, name string, labels ...string) error
IncrementCounter, is the exported function responsible for incrementing a counter defined in an InstrumentationAPI interface. If the InstrumentationAPI method noOp() returns true, then no instrumentation is performed by this function.
func IncrementGauge ¶
func IncrementGauge(i InstrumentationAPI, name string, labels ...string) error
IncrementGauge, is the exported function responsible for incrementing a gauge by 1 using an InstrumentationAPI interface. If the InstrumentationAPI method noOp() returns true, then no instrumentation is performed by this function.
func ObserveHistogram ¶
func ObserveHistogram(i InstrumentationAPI, value float64, name string, labels ...string) error
ObserveHistogram, is the exported function responsible for observing a value in a histogram defined in an InstrumentationAPI interface. If the InstrumentationAPI method noOp() returns true, then no instrumentation is performed by this function.
Types ¶
type EmptyInterface ¶
type EmptyInterface struct{}
func NoOpsInstrumentation ¶
func NoOpsInstrumentation() *EmptyInterface
NoOpsInstrumentation, returns an *EmptyInterface that can be used to not perform any instrumentation operations.
type Instrumentation ¶
type Instrumentation struct {
// contains filtered or unexported fields
}
Instrumentation, holds all the components used for instrumenting an application: counters, gauges, histograms, etc.
func ExposeMetrics ¶
func ExposeMetrics(infoLog, errorLog *log.Logger, addr string) (*Instrumentation, error)
ExposeMetrics, expose the metrics with an HTTP server.
type InstrumentationAPI ¶
type InstrumentationAPI interface {
// contains filtered or unexported methods
}