feat(sdk): AggregationRowSampledSketch — SDK-side row-admission sampling - #539
Merged
Merged
Conversation
Adds RowSampledSketch as a new Aggregation kind: the SDK decides per-occurrence row admission at Record() time (NitroSketch model) instead of the collector deciding after the fact. LiveSampleGrant dials the coordinator directly per precompute.AggregationIdentity and tracks the live sample_p grant; rowSampledSketchValues routes each occurrence through the grant before feeding admitted rows into the underlying CMS/CountSketch/DDSketch aggregate. Depends on PR-A's AggregationIdentity/AggregationRouter types (split/pr-aggid-policyfingerprint) — based on that branch rather than main directly. Extracted from #518 (stale base); sourced from feat/gos-unified-monitoring where this is already wired and tested, confirmed byte-identical between the two source branches. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
zzylol
force-pushed
the
split/pr-sdk-row-sampling-types
branch
from
July 17, 2026 17:52
3d7bf08 to
4475568
Compare
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
RowSampledSketchAggregation kind: the SDK decides per-occurrence row admission atRecord()time (NitroSketch model) instead of the collector deciding after the fact.LiveSampleGrantdials the coordinator directly perprecompute.AggregationIdentityand tracks the livesample_pgrant.rowSampledSketchValuesroutes each occurrence through the grant before feeding admitted rows into the underlying CMS/CountSketch/DDSketch aggregate.Context
Second of the 5-PR split extracting #518's remaining unmerged scope (see #538). Depends on #538's
AggregationIdentity/AggregationRoutertypes, so this PR is based onsplit/pr-aggid-policyfingerprint, notmain— stack it behind #538.Sourced from
feat/gos-unified-monitoring, confirmed byte-identical to #518's own branch for this subtree.Test plan
go build ./... && go vet ./... && go test ./...inopentelemetry-go/sdk/metric(viarestore_all.sh) — all pass🤖 Generated with Claude Code