feat(rust): SDK-side row-admission sampling mirror (asap-precompute-rs) - #537
Merged
Merged
Conversation
Ports asap-precompute-rs's producer-side geometric skip-sampling (sampling.rs, new) plus the WithSampleP wiring through precompute.rs and the CMS/CountSketch/DDSketch wrappers — the Rust/OTAP-path mirror of the Go SDK's NitroSketch-style row-admission sampling already merged on the Go side (AggregationRowSampledSketch, ApplyAdmittedOccurrence). Mirrors sketchlib-go's common.GeometricSampler; the SDK decides, per raw occurrence at Record() time, which rows of the target physical sketch get updated. Part of the #518 extraction (PR-E of 5); pulled from feat/gos-unified-monitoring, confirmed byte-identical to #518's stale branch for this subtree. cargo build/test clean against main.
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR-E of 5 in the #518 extraction effort (see plan context below). This is the
Rust/OTAP-path mirror of the Go SDK's NitroSketch-style row-admission
sampling — parallel to the already-merged Go SDK work (
AggregationRowSampledSketch,ApplyAdmittedOccurrencefrom #530).sampling.rs(new): producer-side geometric skip-sampling, mirroringsketchlib-go's
common.GeometricSampler.WithSamplePthroughprecompute.rsand theCountMinSketch/CountSketch/DDSketchwrappers (sketches/{cms,countsketch,ddsketch}.rs),plus a small
lib.rsexport update.Content pulled from
feat/gos-unified-monitoring(the long-lived integrationbranch), confirmed byte-identical to stale PR #518's version of this subtree —
so no functional changes from what #518 already proposed here, just a clean
rebase onto current
main. Independent of PR-A through PR-D; can be reviewed/mergedin any order relative to those.
No license header changes were needed: none of the 6 touched files carry a
copyright header in either source (they start directly with
//!doccomments), so there was nothing to correct per #534's convention.
Test plan
cargo buildclean against currentmaincargo test— all 96 tests pass (58 unit + 11 api_surface + 27 runtime + 0 otap-feature-gated)CLEAN/MERGEABLEagainstmain🤖 Generated with Claude Code