This repository was archived by the owner on Oct 3, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ parameter from the `View` and the aggregated data associated with those `columns
2828
2929The library SHOULD provide a means of retrieving the ViewData for any registered view in the system.
3030
31+ ViewData is a language-specific data structure implementing the [ Metrics data
32+ model] ( Metrics.md ) .
33+
3134### Aggregation to Metric
3235
3336| Aggregation | Measure Type | Metric Type | Value Type | Unit |
@@ -39,4 +42,4 @@ The library SHOULD provide a means of retrieving the ViewData for any registered
3942| LastValue | Int64 | GAUGE | INT64 | Measure Unit |
4043| Distribution | Int64 or Double | CUMULATIVE | DISTRIBUTION | Measure Unit |
4144
42- Dimensionless Unit can be represented as "1".
45+ Dimensionless Unit can be represented as "1".
Original file line number Diff line number Diff line change 1+ # Metrics
2+ Metrics are a data model for what stats exporters take as input.
3+
4+ Different exporters have different capabilities (e.g. which data types
5+ are supported) and different constraints (e.g. which characters are allowed in
6+ label keys). Metrics is intended to be a superset of what's possible, not a
7+ lowest common denominator that's supported everywhere.
8+
9+ Because of this, Metrics puts minimal constraints on the data (e.g. which
10+ characters are allowed in keys), and code dealing with Metrics should avoid
11+ validation and sanitization of the Metrics data. Instead, pass the data to the
12+ backend, rely on the backend to perform validation, and pass back any errors
13+ from the backend.
14+
15+ The Metrics data model is defined as
16+ [ metrics.proto] ( https://github.com/census-instrumentation/opencensus-proto/blob/master/opencensus/proto/stats/metrics/metrics.proto ) ,
17+ but the proto is just to illustrate the concepts. OpenCensus implementations
18+ don't have to use the actual proto, and can instead use a language-specific
19+ in-memory data structure that captures what exporters need. This structure
20+ should use the names and fields from the data model, for API consistency across
21+ languages.
Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ metrics.
1313data aggregation.
1414* [ Export API] ( Export.md ) : used by the specific vendors to define vendor specific exporters (e.g.
1515Prometheus, Stackdriver, SignalFx).
16+ * [ Metrics Data Model] ( Metrics.md ) : defines a data model for exporters.
1617
1718## Utils
1819* [ HTTP integration] ( HTTP.md ) : document about how to instrument http frameworks.
19- * [ gRPC integration] ( gRPC.md ) : document about how to instrument gRPC framework.
20+ * [ gRPC integration] ( gRPC.md ) : document about how to instrument gRPC framework.
You can’t perform that action at this time.
0 commit comments