open-telemetry/opentelemetry-dotnet

Disabling and later reenabling a metric stream does not reset the start time when using cumulative temporality

Open

#5064 aperta il 18 nov 2023

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)C# (889 fork)auto 404
bughelp wantedkeep-open

Metriche repository

Star
 (3725 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

With #4958, it is now possible to disable and later reenable a metric stream. A number of bugs were identified while in the process of working on #4958. Some were fixed, but this one remains.

Disabling a measurement can be thought of as introducing an intentional gap in a metric stream. When using cumulative temporality the current aggregated value depends on all prior measurements. The start time and current timestamp mark an unbroken sequence of measurements for that time period. When measurements stop - i.e., by disabling a metric stream - and then are later reenabled, the start time must be reset to when the measurements began again. This is important so that backends can accurately identify gaps in a metric stream.

For reference, see the documentation in the proto definition

Guida contributor