[1617] Add ConstnativeHistogram
Fixes: #1617 Add exported ConstNativeHistogram - this can be used to build native histograms if one already has the relevant data without calling the observe function. A viable use case is while converting exponential histograms to nativehistograms.
@ArthurSens Maybe you can take a look at this PR.
Will have a look ASAP (which won't be before next week, sorry).
Thanks for the comments. I'll resolve them this weekend
Oh, looks like some commits weren't signed and there's one test failing 🤔
The test seems to be flaky, it's also failing in other PRs
I can sign the commits once the PR is approved, It seems signing will need a force push
I can sign the commits once the PR is approved, It seems signing will need a force push
Yes, it changes the commits and therefore needs a force-push. However, it is essential to sign before approval. That's kind of the point.
Force pushed with signed commits.
@shivanthzen, looks like you accidentally added unrelated commits to your PR, could you keep only the ones that you've authored here?
@ArthurSens Removed other commits from the branch
@beorn7 could you have another look at it?
This is very close to the top of my review queue now. Will have a look soon, hopefully today.
Looks good to me, but there are lint warnings now. (They are coming from a recently added check, but they are still relevant.) Also, DCO signing is missing. @shivanthzen could you address the lint warnings and sign the commits? (Feel free to squash commits into fewer or just one before doing that.)
@beorn7 Done
Follow-up here would be to tackle the addition of exemplars!
To clarify: This means making withExemplarsMetric.Write aware of native histogram exemplars. Then, we only need to update the doc comment of NewMetricWithExemplar and everything should work fine.