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

Specify LastValue for ValueObserver, TBD for ValueRecorder #984

Merged
merged 4 commits into from
Sep 23, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Updates:
and `RECORD_AND_SAMPLE` for consistency
([#938](https://github.com/open-telemetry/opentelemetry-specification/pull/938),
[#956](https://github.com/open-telemetry/opentelemetry-specification/pull/956))
- Metrics SDK: Specify LastValue default aggregation for ValueObserver
([#984](https://github.com/open-telemetry/opentelemetry-specification/pull/984)
- Metrics SDK: Specify TBD default aggregation for ValueRecorder
([#984](https://github.com/open-telemetry/opentelemetry-specification/pull/984)

## v0.6.0 (07-01-2020)

Expand Down
20 changes: 11 additions & 9 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,13 @@ distinction between synchronous and asynchronous instruments is
crucial to specifying how exporters work, a topic that is covered in
the [SDK specification (WIP)](https://github.com/open-telemetry/opentelemetry-specification/pull/347).

The non-additive instruments (`ValueRecorder`, `ValueObserver`) use
a MinMaxSumCount aggregation, by default. This aggregation keeps track
of the minimum value, the maximum value, the sum of values, and the
count of values. These four values support monitoring the range of
values, the rate of events, and the average event value.
The `ValueRecorder` instrument uses [TBD issue
636](https://github.com/open-telemetry/opentelemetry-specification/issues/636)
aggregation by default.

The `ValueObserver` instrument uses LastValue aggregation by default.
This aggregation keeps track of the last value that was observed and
its timestamp.

Other standard aggregations are available, especially for non-additive
instruments, where we are generally interested in a variety of
Expand Down Expand Up @@ -457,8 +459,8 @@ are inexpensively aggregated into a single number per collection interval
without loss of information. This property makes additive instruments
higher performance, in general, than non-additive instruments.

Non-additive instruments use a relatively inexpensive aggregation
method default (MinMaxSumCount), but still more expensive than the
Non-additive instruments use a relatively inexpensive aggregation,
by default, compared with recording full data, but still more expensive aggregation than the
default for additive instruments (Sum). Unlike additive instruments,
where only the sum is of interest by definition, non-additive
instruments can be configured with even more expensive aggregators.
Expand Down Expand Up @@ -699,10 +701,10 @@ individual instruments is summarized in the table below.
| ----------------------- | ----- | --------- | ------------- | --- |
| **Counter** | Synchronous additive monotonic | Add(increment) | Sum | Per-request, part of a monotonic sum |
| **UpDownCounter** | Synchronous additive | Add(increment) | Sum | Per-request, part of a non-monotonic sum |
| **ValueRecorder** | Synchronous | Record(value) | MinMaxSumCount | Per-request, any non-additive measurement |
| **ValueRecorder** | Synchronous | Record(value) | [TBD issue 636](https://github.com/open-telemetry/opentelemetry-specification/issues/636) | Per-request, any non-additive measurement |
| **SumObserver** | Asynchronous additive monotonic | Observe(sum) | Sum | Per-interval, reporting a monotonic sum |
| **UpDownSumObserver** | Asynchronous additive | Observe(sum) | Sum | Per-interval, reporting a non-monotonic sum |
| **ValueObserver** | Asynchronous | Observe(value) | MinMaxSumCount | Per-interval, any non-additive measurement |
| **ValueObserver** | Asynchronous | Observe(value) | LastValue | Per-interval, any non-additive measurement |

### Constructors

Expand Down