Specify how to stop and restart metrics reporting #2711
Labels
[label deprecated] triaged-needmoreinfo
[label deprecated] The issue is triaged - the OTel community needs more information to decide
spec:metrics
Related to the specification/metrics directory
What are you trying to achieve?
Trying to address
open-telemetry/opentelemetry-js#2997
and
#1891
There are situations when a metrics SDK wants to stop reporting data for a particular instrument and attribute set. This comes about differently for asynchronous/synchronous instruments, depending on cardinality choice.
In every combination of sync/async and delta/cumulative, we find the situation may arise. We find that to safely stop reporting metrics requires attention to what information is lost to the consumer, especially where it may lead to inaccurate rate calculations.
For example:
What did you expect to see?
In the 8/3 Prometheus-WG SIG meeting this was discussed. An idea to use the NO_DATA_PRESENT staleness marker as a way to communicate to the consumer. There appears to be some benefit to issuing NO_DATA_PRESENT data points for a period of time before being allowed to forget the value and erase it from memory.
Informally, I think we expect to see that in case the same instrument/attributes pair is re-used immediately, the new start time assigned will be no earlier than the last NO_DATA_PRESENT data point that was written. Ideally, the new start time assigned will be no later than the previous collection timestamp..
The text was updated successfully, but these errors were encountered: