Skip to content

Commit f426c11

Browse files
authored
Add data point flags to the metric data model (#4135)
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.
1 parent 5381b55 commit f426c11

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

specification/metrics/data-model.md

+26
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ aliases: [/docs/reference/specification/metrics/datamodel]
4141
+ [ExponentialHistogram: Bucket inclusivity](#exponentialhistogram-bucket-inclusivity)
4242
* [Summary (Legacy)](#summary-legacy)
4343
- [Exemplars](#exemplars)
44+
- [Data point flags](#data-point-flags)
45+
* [No recorded value](#no-recorded-value)
4446
- [Single-Writer](#single-writer)
4547
- [Temporality](#temporality)
4648
- [Resets and Gaps](#resets-and-gaps)
@@ -412,6 +414,7 @@ in OTLP consist of the following:
412414
- Times are specified in Value is UNIX Epoch time in nanoseconds since
413415
`00:00:00 UTC on 1 January 1970`
414416
- (optional) a set of examplars (see [Exemplars](#exemplars)).
417+
- (optional) Data point flags (see [Data point flags](#data-point-flags)).
415418

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

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

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

1003+
## Data point flags
1004+
1005+
**Status**: [Stable](../document-status.md)
1006+
1007+
Certain flags can be applied to denote special data points. A flag is a
1008+
boolean property which can either be set to `true` or `false`. Currently the
1009+
following flag is supported.
1010+
1011+
### No recorded value
1012+
1013+
If this flag is set on a data point, then this data point reflects explicitly
1014+
missing data in a series. It serves as an indicator that a previously present
1015+
timeseries was removed and that this timeseries SHOULD NOT be returned in
1016+
queries after such an indicator was received. It is an equivalent of the
1017+
[Prometheus staleness marker](https://prometheus.io/docs/prometheus/2.52/querying/basics/#staleness).
1018+
1019+
If this flag is set, all other data point properties except attributes, time
1020+
stamps, or time windows, SHOULD be ignored.
1021+
1022+
This flag defaults to `false`.
1023+
9981024
## Single-Writer
9991025

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

0 commit comments

Comments
 (0)