Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return just observed sample for Histogram observeAndSample
The Histogram metric has a function `observeAndSample`, which lets you add a new observation, and sample it at the same time. Before this commit, this `observeAndSample` function would return the _previous_ sample, _not_ the sample you just added. This commit changes the behavior of `observeAndSample` so that it returns the sample that was just added. This matches the behavior of `addAndSample` (from `Counter`), and `modifyAndSample` (from `Gauge`), which both return the value of the sample that was just added.
- Loading branch information