metrics

package
v0.0.0-...-db75bb6 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 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 MetricRegistry

type MetricRegistry interface {
	// Record adds a new metric value to the registry
	Record(spec *MetricSpec, value float64, dimensions map[string]string)
	// Emit sends all registered metric values to cloudwatch, emptying the registry
	Emit() error
}

func NewCloudWatchRegistry

func NewCloudWatchRegistry(cw *cloudwatch.Client) MetricRegistry

NewCloudWatchRegistry creates a new metric registry that will emit values using the specified cloudwatch client

func NewNoopMetricRegistry

func NewNoopMetricRegistry() MetricRegistry

type MetricSpec

type MetricSpec struct {
	Namespace string
	Metric    string
	Unit      types.StandardUnit
}

Jump to

Keyboard shortcuts

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