You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's been said, the Measurement values in asynchronous counters are absolute values and not increments. To SumAggregation, the arithmetic sum of Measurement values of asynchronous counters doesn't seem to be meaningful.
This issue also applies to the Asynchronous UpDownCounter.
The text was updated successfully, but these errors were encountered:
In the Java (early) prototype I actually had two types of measurements: Delta + Cumulative, where Async instruments (and Histogram) provided Cumulative measurements and Sync *Counter provided Delta measurements. This helped clarify what aggregation should do by default when it sees these measurements.
However, one thing that may not be clear, is that Sum-Aggregation is meaningful in the presence of Views. If I configure a View that removes a label from measurements of Async instruments, then I need to "sum" together any measurements I'm "joining" when removing the label.
So a quick table of Instrument => Measurement Type => Default Aggregation:
Instrument
Measurement Type
Default Aggregation
Async* Gauge
Cumulative
Last Value
Async* Counter
Cumulative
Sum
Async* UpDownCounter
Cumulative
Sum
Histogram
Cumulative
Explicit Bucket HIstogram
Counter
Delta
Sum
UpDownCounter
Delta
Sum
So, in all these cases, View can muck with how many measurements are seen. The Aggregation determines what to do, and it's the same regardless of measurement type. Might be worth a more in-depth discussion.
What are you trying to achieve?
In the SDK spec on DefaultAggregation, it suggests that for AsynchronousCounter a default SumAggregation is used for aggregation.
When implementing the SumAggregation for the asynchronous counter, I found that in the SumAggregation:
Whilst to the asynchronous counter, the
Measurement
values mean:That's been said, the
Measurement
values in asynchronous counters are absolute values and not increments. To SumAggregation, the arithmetic sum ofMeasurement
values of asynchronous counters doesn't seem to be meaningful.This issue also applies to the Asynchronous UpDownCounter.
The text was updated successfully, but these errors were encountered: