Respect sampling when aggregation is enabled for timing types of metrics (histograms, distributions, ms, etc).
🤔 Why
Not having sampling enabled for timings totally beats the purpose of aggregation, since aggregation is only value packing the observations together.
This behavior is used currently by Datadog in their implementation of user-space aggregation in golang: see code.
👩🔬 How to validate
Adding new test to test the new behavior, and old tests still pass.
Checklist
[x] I documented the changes in the CHANGELOG file.
✅ What
Respect sampling when aggregation is enabled for timing types of metrics (histograms, distributions, ms, etc).
🤔 Why
Not having sampling enabled for timings totally beats the purpose of aggregation, since aggregation is only value packing the observations together. This behavior is used currently by Datadog in their implementation of user-space aggregation in golang: see code.
👩🔬 How to validate
Adding new test to test the new behavior, and old tests still pass.
Checklist