opencensus-specs

Export API Overview

The stats library aggregates measurements into Views (which are essentially a collection of metrics, each with a different set of labels). All output objects are immutable. The core data types used are:

AggregationData

An AggregationData describes the result of data aggregation. The library SHOULD define an AggregationData for each Aggregation types defined.

The library SHOULD provide support for multiple types of Aggregations:

ViewData

A ViewData is defined from the following:

The library SHOULD provide a means of retrieving the ViewData for any registered view in the system.

ViewData is a language-specific data structure implementing the Metrics data model.

Aggregation to Metric

Aggregation Measure Type Metric Type Value Type Unit
Count Int64 or Double CUMULATIVE INT64 Dimensionless Unit
Sum Double CUMULATIVE DOUBLE Measure Unit
Sum Int64 CUMULATIVE INT64 Measure Unit
LastValue Double GAUGE DOUBLE Measure Unit
LastValue Int64 GAUGE INT64 Measure Unit
Distribution Int64 or Double CUMULATIVE DISTRIBUTION Measure Unit

Dimensionless Unit can be represented as “1”.