Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Count ¶
type Count interface {
// Add adds value "v" to the metric and returns the result.
Add(v uint64) uint64
// WithOverriddenTags returns scoped Count with replaced tags to be reported with the metrics.
//
// In terms of Prometheus the "tags" are called "labels".
WithOverriddenTags(Fields) Count
}
Count is a counter metric.
type Gauge ¶
type Gauge interface {
// Add adds value "v" to the metric and returns the result.
Add(v float64) float64
// WithOverriddenTags returns scoped Gauge with replaced tags to be reported with the metrics.
//
// In terms of Prometheus the "tags" are called "labels".
WithOverriddenTags(fields.Fields) Gauge
}
Gauge is a float64 gauge metric.
type IntGauge ¶
type IntGauge interface {
// Add adds value "v" to the metric and returns the result.
Add(v int64) int64
// WithOverriddenTags returns scoped IntGauge with replaced tags to be reported with the metrics.
//
// In terms of Prometheus the "tags" are called "labels".
WithOverriddenTags(Fields) IntGauge
}
IntGauge is a int64 gauge metric.
type Metrics ¶
type Metrics interface {
// Gauge returns the float64 gauge metric with key "key".
Gauge(key string) Gauge
// IntGauge returns the int64 gauge metric with key "key".
IntGauge(key string) IntGauge
// Count returns the counter metric with key "key".
Count(key string) Count
// WithTag returns scoped Metrics with an added tag to be reported with the metrics.
//
// In terms of Prometheus the "tags" are called "labels".
WithTag(key string, value interface{}) Metrics
// WithTags returns scoped Metrics with added tags to be reported with the metrics.
//
// In terms of Prometheus the "tags" are called "labels".
//
// Value "nil" resets tags.
WithTags(fields Fields) Metrics
}
Metrics is a handler of metrics (like Prometheus, ODS)
Click to show internal directories.
Click to hide internal directories.