feat(collector): decode SDK row-sampled points, route to ApplyAdmittedOccurrence - #541
Merged
Merged
Conversation
5 tasks
…dOccurrence ingest.go: decode the 3 reserved wire attributes an SDK running AggregationRowSampledSketch stamps on an individually-admitted raw occurrence (admitted-rows bitmask, row count, sample_p), strip them before building series identity, and skip cold-archiving a row-sampled point (it's a raw occurrence, not an aggregate sample). warm_sketch.go: observe() takes rowSampled/admittedRows/sampleP and, when set, tags the ObservationValue so CMS/CountSketch route through Sketch.ApplyAdmittedOccurrence (the SDK's admission decision applied verbatim) instead of the plain insert path. Families with no *AtRows sketchlib primitive (DDSketch/KLL/HLL) drop rather than silently misapply an unrelated observer — this can only happen if the SDK's AggregationRouter and this collector's AggID disagreed about which family a PolicyFingerprint targets. Built fresh against current main's warm_sketch.go/ingest.go (not merged wholesale from feat/gos-unified-monitoring, which independently regressed the insert-time GOS wake/anisotropic-threshold work already merged here via #524-#532) — only the row-sampled-specific decode/ route logic was ported; the isotropic GOS priming, wakeCh wiring, and sub-window trigger logic already on main are unchanged. Extracted from #518 (stale base); depends on PR-A's aggID/config plumbing (split/pr-aggid-policyfingerprint) — based on that branch. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
zzylol
force-pushed
the
split/pr-collector-row-sampled-decode
branch
from
July 17, 2026 17:52
cd4e1ee to
35da68d
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
ingest.go: decodes the 3 reserved wire attributes an SDK runningAggregationRowSampledSketchstamps on an individually-admitted raw occurrence (admitted-rows bitmask, row count, sample_p), strips them before building series identity, and skips cold-archiving a row-sampled point (it's a raw occurrence, not an aggregate sample).warm_sketch.go:observe()takesrowSampled/admittedRows/samplePand, when set, tags theObservationValueso CMS/CountSketch route throughSketch.ApplyAdmittedOccurrence(the SDK's admission decision applied verbatim) instead of the plain insert path. Families with no*AtRowssketchlib primitive (DDSketch/KLL/HLL) drop rather than silently misapply an unrelated observer — this can only happen if the SDK'sAggregationRouterand this collector's AggID disagreed about which family aPolicyFingerprinttargets.row_sampled_test.go: rescale-by-p correctness, unsupported-family drop, and end-to-endConsumeMetricsreserved-attribute stripping.Context
Fourth of the 5-PR split extracting #518's remaining unmerged scope (see #538, #539, #540). Highest conflict risk of the 5 —
feat/gos-unified-monitoring(the source branch) is 33 commits behind currentmainhere and its ownwarm_sketch.go/ingest.go/config.go/processor.gohad independently regressed relative to main's insert-time GOS wake mechanism (wakeCh/SetWakeHook) and per-family GOS priming (merged via #524-#532) — those exist only in an intermediate, superseded form on that branch. This PR was built fresh against currentmain(viasplit/pr-aggid-policyfingerprint): only the row-sampled-specific decode/route logic was ported fromfeat/gos-unified-monitoring; the mature GOS wake wiring and per-family priming already onmainare untouched.config.go/processor.goneeded no changes at all — their diffs against the source branch were pure regression noise (aGosAnisotropicfield from an abandoned design iteration, doc-comment casing), not real PR-D scope.Depends on #538's
aggID/config plumbing — based onsplit/pr-aggid-policyfingerprint, notmain.Test plan
go build ./... && go vet ./... && go test ./...in the processor (viarestore_all.sh) — all pass, including the 3 new row-sampled tests🤖 Generated with Claude Code