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

Add data point flags to the metric data model #4135

Merged
merged 13 commits into from
Aug 8, 2024
1 change: 1 addition & 0 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,7 @@ for the interaction between the API and SDK.

* A value
* [`Attributes`](../common/README.md#attribute)
* [since 1.36.0] [Data point flags](./data-model.md#data-point-flags)
MrAlias marked this conversation as resolved.
Show resolved Hide resolved

### Multiple-instrument callbacks

Expand Down
26 changes: 26 additions & 0 deletions specification/metrics/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ aliases: [/docs/reference/specification/metrics/datamodel]
+ [ExponentialHistogram: Bucket inclusivity](#exponentialhistogram-bucket-inclusivity)
* [Summary (Legacy)](#summary-legacy)
- [Exemplars](#exemplars)
- [Data point flags](#data-point-flags)
* [No recorded value](#no-recorded-value)
- [Single-Writer](#single-writer)
- [Temporality](#temporality)
- [Resets and Gaps](#resets-and-gaps)
Expand Down Expand Up @@ -412,6 +414,7 @@ in OTLP consist of the following:
- Times are specified in Value is UNIX Epoch time in nanoseconds since
`00:00:00 UTC on 1 January 1970`
- (optional) a set of examplars (see [Exemplars](#exemplars)).
- (optional) Data point flags (see [Data point flags](#data-point-flags)).

The aggregation temporality is used to understand the context in which the sum
was calculated. When the aggregation temporality is "delta", we expect to have
Expand Down Expand Up @@ -447,6 +450,7 @@ in OTLP represents a sampled value at a given time. A Gauge stream consists of:
first possible moment a measurement could be recorded. This is commonly
set to the timestamp when a metric collection system started.
- (optional) a set of examplars (see [Exemplars](#exemplars)).
- (optional) Data point flags (see [Data point flags](#data-point-flags)).

In OTLP, a point within a Gauge stream represents the last-sampled event for a
given time window.
Expand Down Expand Up @@ -493,6 +497,7 @@ Histograms consist of the following:
bucket.
- A count of the number of observations that fell within this bucket.
- (optional) a set of examplars (see [Exemplars](#exemplars)).
- (optional) Data point flags (see [Data point flags](#data-point-flags)).

Like Sums, Histograms also define an aggregation temporality. The picture above
denotes Delta temporality where accumulated event counts are reset to zero after reporting
Expand Down Expand Up @@ -995,6 +1000,27 @@ sum.
For Gauges, when an exemplar exists, its value was seen at some point within
the gauge interval for the same source.

## Data point flags
pyohannes marked this conversation as resolved.
Show resolved Hide resolved

**Status**: [Experimental](../document-status.md)
carlosalberto marked this conversation as resolved.
Show resolved Hide resolved
carlosalberto marked this conversation as resolved.
Show resolved Hide resolved

Certain flags can be applied to denote special data points. A flag is a
boolean property which can either be set to `true` or `false`. Currently the
following flag is supported.

### No recorded value

If this flag is set on a data point, then this data point reflects explicitly
missing data in a series. It serves as an indicator that a previously present
timeseries was removed and that this timeseries should not be returned in
queries after such an indicator was received. It is an equivalent of the
[Prometheus staleness marker](https://prometheus.io/docs/prometheus/2.52/querying/basics/#staleness).

If this flag is set, all other data point properties except attributes, time
stamps, or time windows, should be ignored.
carlosalberto marked this conversation as resolved.
Show resolved Hide resolved

This flags defaults to `false`.
carlosalberto marked this conversation as resolved.
Show resolved Hide resolved

## Single-Writer

**Status**: [Stable](../document-status.md)
Expand Down
Loading