SMOODEV-2698: Session-scoped sampling + config-served telemetry settings (ADR-097 W1/W2)#75
Merged
Merged
Conversation
…ngs (ADR-097 W1/W2) Browser log volume had no control surface and, worse, no *safe* one: the obvious fix — line-level sampling — is the exact failure ADR-010 warns about, where you click a trace and see 5 of 47 lines with nothing telling you 42 are missing. So the decision is made ONCE per session (or inherited from the trace, where one exists) and applies to every line under it. Any trace you can open has 100% of its log lines. Warnings and errors are never sampled. Server logs are untouched. The decision is FNV-1a 32-bit over the UTF-8 bytes of the id, not random() — random() is neither stable across a page's lifetime nor reproducible by the four parity ports, and an unreproducible decision cannot be tested for drift. Telemetry settings move to @smooai/config public tier (a browser can never be served secret tier), read through an injectable provider seam so the SDK stays usable in a test or a bundle with no network. Every failure path — unreachable, throwing, malformed, out-of-range — lands on the compiled-in ADR-010 defaults, never on "sample everything out": telemetry that goes quiet when its config server hiccups is worse than useless. parity/sampling-corpus.json pins 170 golden vectors (ADR-089 pattern) so the Rust/Python/Go/.NET ports fail their own builds on drift rather than drifting invisibly, as ADR-007/009 already did. Corpus paths are added to every CI lane's change filter and to turbo's test inputs, or a corpus-only change would be served a cached green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S2bM94GAnVjYSSv1x7HKRB
🦋 Changeset detectedLatest commit: dda3e36 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
ADR-097 W1/W2: session-scoped sampling decisions and telemetry settings served from config, with a sampling parity corpus.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Ji3rA65cTfU9vPQh9HAASJ