Skip to content

Commit

Permalink
Add data point flags to the metric data model (#4135)
Browse files Browse the repository at this point in the history
Fixes #4053

## Changes

This PR extends the metric data model with data point flags, which were
added to the protocol in
open-telemetry/opentelemetry-proto#316.
  • Loading branch information
pyohannes authored Aug 8, 2024
1 parent 5381b55 commit f426c11
Showing 1 changed file with 26 additions and 0 deletions.
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

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

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.

This flag defaults to `false`.

## Single-Writer

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

0 comments on commit f426c11

Please sign in to comment.