Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default keys from metrics spec #565

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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