Documentation ¶
Overview ¶
Package metric aggregates stats into metrics that can be exported.
Index ¶
- type Float64Data
- type HistogramFloat64
- type HistogramFloat64Data
- type HistogramFloat64Row
- type HistogramInt64
- type HistogramInt64Data
- type HistogramInt64Row
- type Int64Data
- type Scalar
- func (info Scalar) CountFloat64(measure *stats.Float64Measure) string
- func (info Scalar) CountInt64(measure *stats.Int64Measure) string
- func (info Scalar) LatestFloat64(measure *stats.Float64Measure) string
- func (info Scalar) LatestInt64(measure *stats.Int64Measure) string
- func (info Scalar) SumFloat64(measure *stats.Float64Measure) string
- func (info Scalar) SumInt64(measure *stats.Int64Measure) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Float64Data ¶
type Float64Data struct { // Info holds the original consruction information. Info *Scalar // IsGauge is true for metrics that track values, rather than increasing over time. IsGauge bool // Rows holds the per group values for the metric. Rows []float64 // End is the last time this metric was updated. EndTime *time.Time // contains filtered or unexported fields }
Float64Data is a concrete implementation of Data for float64 scalar metrics.
func (*Float64Data) Groups ¶
func (data *Float64Data) Groups() []telemetry.TagList
func (*Float64Data) Handle ¶
func (data *Float64Data) Handle() string
type HistogramFloat64 ¶
type HistogramFloat64 struct { // Name is the unique name of this metric. Name string // Description can be used by observers to describe the metric to users. Description string // Keys is the set of tags that collectively describe rows of the metric. Keys []interface{} // Buckets holds the inclusive upper bound of each bucket in the histogram. Buckets []float64 }
HistogramFloat64 represents the construction information for an float64 histogram metric.
func (HistogramFloat64) Record ¶
func (info HistogramFloat64) Record(measure *stats.Float64Measure) string
Record creates a new metric based on the HistogramFloat64 information that tracks the bucketized counts of values recorded on the float64 measure. Metrics of this type will use HistogramFloat64Data.
type HistogramFloat64Data ¶
type HistogramFloat64Data struct { // Info holds the original consruction information. Info *HistogramFloat64 // Rows holds the per group values for the metric. Rows []*HistogramFloat64Row // End is the last time this metric was updated. EndTime *time.Time // contains filtered or unexported fields }
HistogramFloat64Data is a concrete implementation of Data for float64 histogram metrics.
func (*HistogramFloat64Data) Groups ¶
func (data *HistogramFloat64Data) Groups() []telemetry.TagList
func (*HistogramFloat64Data) Handle ¶
func (data *HistogramFloat64Data) Handle() string
type HistogramFloat64Row ¶
type HistogramFloat64Row struct { // Values is the counts per bucket. Values []int64 // Count is the total count. Count int64 // Sum is the sum of all the values recorded. Sum float64 // Min is the smallest recorded value. Min float64 // Max is the largest recorded value. Max float64 }
HistogramFloat64Row holds the values for a single row of a HistogramFloat64Data.
type HistogramInt64 ¶
type HistogramInt64 struct { // Name is the unique name of this metric. Name string // Description can be used by observers to describe the metric to users. Description string // Keys is the set of tags that collectively describe rows of the metric. Keys []interface{} // Buckets holds the inclusive upper bound of each bucket in the histogram. Buckets []int64 }
HistogramInt64 represents the construction information for an int64 histogram metric.
func (HistogramInt64) Record ¶
func (info HistogramInt64) Record(measure *stats.Int64Measure) string
Record creates a new metric based on the HistogramInt64 information that tracks the bucketized counts of values recorded on the int64 measure. Metrics of this type will use HistogramInt64Data.
type HistogramInt64Data ¶
type HistogramInt64Data struct { // Info holds the original consruction information. Info *HistogramInt64 // Rows holds the per group values for the metric. Rows []*HistogramInt64Row // End is the last time this metric was updated. EndTime *time.Time // contains filtered or unexported fields }
HistogramInt64Data is a concrete implementation of Data for int64 histogram metrics.
func (*HistogramInt64Data) Groups ¶
func (data *HistogramInt64Data) Groups() []telemetry.TagList
func (*HistogramInt64Data) Handle ¶
func (data *HistogramInt64Data) Handle() string
type HistogramInt64Row ¶
type HistogramInt64Row struct { // Values is the counts per bucket. Values []int64 // Count is the total count. Count int64 // Sum is the sum of all the values recorded. Sum int64 // Min is the smallest recorded value. Min int64 // Max is the largest recorded value. Max int64 }
HistogramInt64Row holds the values for a single row of a HistogramInt64Data.
type Int64Data ¶
type Int64Data struct { // Info holds the original consruction information. Info *Scalar // IsGauge is true for metrics that track values, rather than increasing over time. IsGauge bool // Rows holds the per group values for the metric. Rows []int64 // End is the last time this metric was updated. EndTime *time.Time // contains filtered or unexported fields }
Int64Data is a concrete implementation of Data for int64 scalar metrics.
type Scalar ¶
type Scalar struct { // Name is the unique name of this metric. Name string // Description can be used by observers to describe the metric to users. Description string // Keys is the set of tags that collectively describe rows of the metric. Keys []interface{} }
Scalar represents the construction information for a scalar metric.
func (Scalar) CountFloat64 ¶
func (info Scalar) CountFloat64(measure *stats.Float64Measure) string
CountFloat64 creates a new metric based on the Scalar information that counts the number of times the supplied float64 measure is set. Metrics of this type will use Int64Data.
func (Scalar) CountInt64 ¶
func (info Scalar) CountInt64(measure *stats.Int64Measure) string
CountInt64 creates a new metric based on the Scalar information that counts the number of times the supplied int64 measure is set. Metrics of this type will use Int64Data.
func (Scalar) LatestFloat64 ¶
func (info Scalar) LatestFloat64(measure *stats.Float64Measure) string
LatestFloat64 creates a new metric based on the Scalar information that tracks the most recent value recorded on the float64 measure. Metrics of this type will use Float64Data.
func (Scalar) LatestInt64 ¶
func (info Scalar) LatestInt64(measure *stats.Int64Measure) string
LatestInt64 creates a new metric based on the Scalar information that tracks the most recent value recorded on the int64 measure. Metrics of this type will use Int64Data.
func (Scalar) SumFloat64 ¶
func (info Scalar) SumFloat64(measure *stats.Float64Measure) string
SumFloat64 creates a new metric based on the Scalar information that sums all the values recorded on the float64 measure. Metrics of this type will use Float64Data.