Documentation
¶
Overview ¶
Package metric provides types and functions for recording and exporting metrics.
Use this package to collect dimensional metric data points with timestamps and values, and export them to a metrics backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dimension ¶
type Dimension struct {
// contains filtered or unexported fields
}
Dimension represents a set of string labels for categorizing metrics.
func (*Dimension) Record ¶
Record creates a metric point with this dimension and the given value at the current time, and exports it using the exporter stored in the context.
type Exporter ¶
type Exporter interface {
// Export sends a metric data point to the metrics backend.
// Implementations should manage their own context.
// No error is returned because the metric package does not handle them.
Export(p *Point)
}
Exporter defines the interface for exporting metric data points to a backend.
Click to show internal directories.
Click to hide internal directories.