prometheus

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

prometheus

Index

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
}

Jump to

Keyboard shortcuts

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