Skip to content

feat(sdk): AggregationRowSampledSketch — SDK-side row-admission sampling - #539

Merged
zzylol merged 1 commit into
mainfrom
split/pr-sdk-row-sampling-types
Jul 17, 2026
Merged

zzylol merged 1 commit into
mainfrom
split/pr-sdk-row-sampling-types

Conversation

@zzylol

@zzylol zzylol commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New RowSampledSketch 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.

Context

Second of the 5-PR split extracting #518's remaining unmerged scope (see #538). Depends on #538's AggregationIdentity/AggregationRouter types, so this PR is based on split/pr-aggid-policyfingerprint, not main — 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 ./... in opentelemetry-go/sdk/metric (via restore_all.sh) — all pass

🤖 Generated with Claude Code

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
zzylol force-pushed the split/pr-sdk-row-sampling-types branch from 3d7bf08 to 4475568 Compare July 17, 2026 17:52
@zzylol
zzylol changed the base branch from split/pr-aggid-policyfingerprint to main July 17, 2026 17:55
@zzylol
zzylol merged commit ff6c74b into main Jul 17, 2026
@zzylol
zzylol deleted the split/pr-sdk-row-sampling-types branch July 17, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant