v1.19.1 Latest Latest

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

Go to latest
Published: Jan 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0




This section is empty.


This section is empty.


func Cumulative

func Cumulative(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

Cumulative creates a cumulative metric.

func CumulativeDist

func CumulativeDist(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

CumulativeDist creates a cumulative distribution metric.

func CumulativeInt

func CumulativeInt(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

CumulativeInt creates a cumulative metric of type int64.

func DistPt

func DistPt(ts time.Time, bounds []float64, counts []int64) *metricspb.Point

DistPt creates a distribution point. It takes the time stamp, the bucket boundaries for the distribution, and the and counts for the individual buckets as input.

func Double

func Double(ts time.Time, value float64) *metricspb.Point

Double creates a double point.

func Gauge

func Gauge(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

Gauge creates a gauge metric.

func GaugeDist

func GaugeDist(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

GaugeDist creates a gauge distribution metric.

func GaugeInt

func GaugeInt(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

GaugeInt creates a gauge metric of type int64.

func SortedMetrics

func SortedMetrics(metrics pdata.Metrics) pdata.Metrics

SortedMetrics is mainly useful for tests. It gets all of the attributes and labels in sorted order so they can be consistently tested.

func SummPt

func SummPt(ts time.Time, count int64, sum float64, percent, vals []float64) *metricspb.Point

SummPt creates a summary point.

func Summary

func Summary(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

Summary creates a summary metric.

func Timeseries

func Timeseries(sts time.Time, vals []string, point *metricspb.Point) *metricspb.TimeSeries

Timeseries creates a timeseries. It takes the start time stamp, a sequence of label values (associated with the label keys in the overall metric), and the value of the timeseries.

func Timestamp

func Timestamp(ts time.Time) *timestamppb.Timestamp

Timestamp creates a timestamp.


This section is empty.

Jump to

Keyboard shortcuts

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