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

Write description for Gauge metric type in DataModel Specification #1661

Merged
merged 12 commits into from
May 11, 2021
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ release.

### Metrics

- Expand `Gauge` metric description in the data model ([#1661](https://github.com/open-telemetry/opentelemetry-specification/pull/1661))

### Logs

### Semantic Conventions
Expand Down
26 changes: 25 additions & 1 deletion specification/metrics/datamodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,31 @@ best tradeoff for their use case.

### Gauge

Pending
A [Gauge](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto#L174)
in OTLP represents a sampled value at a given time. A Gauge stream consists of:

- A set of data points, each containing:
- An independent set of Attribute name-value pairs.
- A sampled value (e.g. current cpu temperature)
- A timestamp when the value was sampled (`time_unix_nano`)
- (optional) A timestamp (`start_time_unix_nano`) which has [TBD semantics](https://github.com/open-telemetry/opentelemetry-proto/pull/295).

In OTLP, a point within a Gauge stream represents the last-sampled event for a
given time window.

![Gauge](img/model-gauge.png)

In this example, we can see an underlying timeseries we are sampling with our
Gauge. While the event model *can* sample more than once for a given metric
reporting interval, only the last value is reported in the metric stream via
OTLP.

Gauges do not provide an aggregation semantic, instead "last sample value" is
used when performing operations like temporal alignment or adjusting resolution.

Gauges can be aggregated through transformation into histograms, or other
jsuereth marked this conversation as resolved.
Show resolved Hide resolved
metric types. These operations are not done by default, and require direct
user configuration.

### Histogram

Expand Down
Binary file added specification/metrics/img/model-gauge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.