-
Alec Holmes authored
This fixes issue #6344, in which an attempted clean shutdown of the metrics SDK using PeriodicReader's Shutdown method can produce and emit wildly incorrect data point values that are orders of magnitude too large. The root of the issue is that the pipeline produce method changed in this PR cannot safely return early, which was happening in the callback loops that were checking for context cancellation. Early return is not safe since callbacks and aggregations are tightly coupled in practice: invoking callbacks without also invoking aggregations corrupts internal data point value accounting. The linked issue more concretely walks through the sequence of steps that were causing this issue. --------- Co-authored-by:
Damien Mathieu <42@dmathieu.com>
Alec Holmes authoredThis fixes issue #6344, in which an attempted clean shutdown of the metrics SDK using PeriodicReader's Shutdown method can produce and emit wildly incorrect data point values that are orders of magnitude too large. The root of the issue is that the pipeline produce method changed in this PR cannot safely return early, which was happening in the callback loops that were checking for context cancellation. Early return is not safe since callbacks and aggregations are tightly coupled in practice: invoking callbacks without also invoking aggregations corrupts internal data point value accounting. The linked issue more concretely walks through the sequence of steps that were causing this issue. --------- Co-authored-by:
Damien Mathieu <42@dmathieu.com>
To find the state of this project's repository at the time of any of these versions, check out the tags.
Loading