Skip to content

Commit

Permalink
Remove default keys from metrics spec (open-telemetry#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacd authored Apr 16, 2020
1 parent c7b1e52 commit b228895
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* [Meter Interface](#meter-interface)
* [Aggregations](#aggregations)
* [Time](#time)
* [WithRecommendedKeys declaration on metric instruments](#withrecommendedkeys-declaration-on-metric-instruments)
* [Metric Event Format](#metric-event-format)
- [Three kinds of instrument](#three-kinds-of-instrument)
* [Counter](#counter)
Expand Down Expand Up @@ -198,38 +197,6 @@ use of this term for the SDK specification, to refer to parts of a
data format that express explicitly timestamped values, in a sequence,
resulting from an aggregation of raw measurements over time.

### WithRecommendedKeys declaration on metric instruments

A standard feature of metric SDKs is to pre-aggregate metric events
according to a specified set of label keys (i.e., dimensions). To
perform this task, the SDK must aggregate metric events over the
collection interval: (1) across time, (2) across key dimensions in
_label space_.

When aggregating across spatial dimensions, metric events for different sets of
labels are combined into an aggregated value for each distinct "group" of
values for the key dimensions. It means that measurements are combined for all
metric events having the same values for selected keys, explicitly disregarding
any additional labels with keys not in the set of aggregation keys. Some
exporters are known to require pre-specifying the label keys used for
aggregation (e.g., Prometheus).

For example, if `[ak1, ak2]` are the aggregation keys and `[ik1,
ik2]` are the ignored keys, then a metric event having labels
`{ak1=A, ak2=B, ik1=C, ik1=D}` will be combined with a metric
event having labels `{ak1=A, ak2=B, ik1=Y, ik1=Z}` because they
have identical label values for all of the aggregation keys.

The API provides a `WithRecommendedKeys` option for the user to declare the
recommended aggregation keys when declaring new metric instruments,
intended as the default way to configure an exporter for
pre-aggregation, if it is expected. Since this is only expected in
some exporters, it is regarded as an option relevant to the exporter,
whether keys configured through `WithRecommendedKeys` are applied for aggregation
purposes or not. This allows the user to influence the standard
implementation behavior, especially for exporters that require
pre-specified aggregation keys.

### Metric Event Format

Metric events have the same logical representation, regardless of
Expand Down

0 comments on commit b228895

Please sign in to comment.