PerfTrace core: span API, ring buffer, tag allowlist (CL-5160) - #303
Merged
Conversation
Always-on in-process span API (start/end/mark) using monotonic hrtime, a fixed 4096-span ring, and privacy-sanitized tags. No network or PostHog; snapshot/clear for tests.
Accept parentId only as opaque span ids (known open/ring or OPAQUE_ID_RE); return shallow snapshot copies; cap open spans with oldest-first eviction; mark() takes StartOptions; cover double-end, clear, and overflow paths.
TheGreatAxios
force-pushed
the
stack/w1a-cl-5160-perftrace-core
branch
from
August 4, 2026 18:10
f76e8cb to
8575c45
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.
Stack
PerfTrace stack 1/8 — base of the always-on performance tracing series.
stack/w1a-cl-5160-perftrace-corestack/w2a-cl-5171-auto-spansstack/w2b-cl-5175-otel-settingsstack/w3a-cl-5169-dump-rollupstack/w3b-cl-5170-perm-subagentstack/w4a-cl-5173-otel-sinkstack/w4b-cl-5174-eval-harnessstack/w5-cl-5167-attributionLinear
https://linear.app/abklabs/issue/CL-5160/perftrace-core-span-api-ring-buffer-and-local-tag-allowlist
Summary
Local PerfTrace core: start/end/mark span API, fixed-size ring buffer, privacy-strict tag allowlist. No network, no OTEL yet.
Test evidence
Merge note
Do not merge out of order. Merge this first; then stack dependents.