metrics

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 152

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

Metrics contains the set of Prometheus metric objects used to store counter and histograms for a variety of data points

func NewMetrics

func NewMetrics(serviceID string) *Metrics

NewMetrics returns a pointer to a Metrics struct that can be used to collect and expose various Prometheus metrics

func (*Metrics) Collectors

func (m *Metrics) Collectors() []prometheus.Collector

Collectors simply provides an iterator over the `prometheus.Collector` interface pointers of the underlying metrics. This allows a `prometheus.Registerer` (like controller-runtime's metrics.Registry) to register the metrics.

func (*Metrics) RecordAPICall

func (m *Metrics) RecordAPICall(

	opType string,

	opID string,

	err error,
)

RecordAPICall increments appropriate metrics tracking the count and duration of a supplied outbound AWS API call

Jump to

Keyboard shortcuts

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