feat(otel-app): whole-sketch F2 reporting mode (functional=f2) - #505
Merged
Merged
Conversation
Adds a third coordinated-sampling readout alongside cms_point/sum: functional=f2 reports the edge's local whole-sketch L2 mass F2_i = Σ_x f(x)² as the value, under identity (agg_id, "") (no per-point key). observe() tracks per-series window counts and maintains the running Σf² incrementally (an event on x with old count c adds 2c+1), so the coordinator sees F2 grow monotonically within the epoch and drives the same slack countdown. The coordinator allocation is unchanged — p_i ∝ √(F2_i/rate_i) keeps the WHOLE sketch within ε, the right signal when the queried point isn't known a priori (see ASAPQuery-backend#380 decision rule). Mode is learned from the controller config's functional, or overridden with -monitor-functional; empty infers cms_point (key set) else sum. Pairs with ASAPQuery-backend#feat-monitor-f2-live. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The flag was only consulted in the no-config fallback, so it couldn't force f2 when the controller config was learned but omitted/disagreed on functional (e.g. an older control plane that publishes functional=""). Apply -monitor-functional as an override on every monitor after learning; unset leaves the auto-learned functional intact. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Jun 17, 2026
…obey it Rewrites §Fig 9 to the unified result: per-edge sampling is the single whole-sketch ε-floor p=1/(1+ε²·rate) for EVERY monitor type. Re-ran both on the unified coordinator: cms_point collapses from the old √rate (0.0010/0.0022/0.0049) to the ε-floor (0.0001/0.0003/0.0013); F2 unchanged (0.0102/0.0026/0.0007, was already at the floor). All six points lie on one 1/(1+ε²·rate) curve (fig9_unified_sampling.png). The √(f/rate) law was the exact-count artifact, retired in ASAPQuery-backend#381. Requires #381 (backend unify) + #505 (F2 edge). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Stacked on #504 (base =
fix/otel-app-cms-point-monitor-key). Adds the whole-sketch F2 reporting mode to the coordinated-sampling edge.functional=f2: the edge reports its local whole-sketch L2 massF2_i = Σ_x f(x)²as the monitor value, under identity(agg_id,"")(no per-point key).observe()keeps per-series window counts and maintains the runningΣf²incrementally (an event onxwith old countcadds2c+1), so the coordinator sees F2 grow monotonically and drives the same slack countdown. Mode is auto-learned from the controller config'sfunctional(or forced with-monitor-functional; empty infers cms_point when a key is set, else sum).Pairs with ASAPQuery-backend#381 (F2 functional round-trip + the sampling unification). With the unification, the reported value (f_i / F2_i / sum) drives the monitor threshold, while per-edge sampling is the single whole-sketch ε-floor
p=1/(1+ε²·rate).Live-validated (8-node): edges auto-learn
f2, hot-reloadadded=1, 0 unconfigured, stable differentiated grants.🤖 Generated with Claude Code