Repository navigation
Replace a span's attribute rows and search entry only when an export repeats it - #9
Draft
RhysSullivan wants to merge 1 commit into
Draft
RhysSullivan wants to merge 1 commit into
RhysSullivan wants to merge 1 commit into
Conversation
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.
Each trace export ran
DELETE FROM span_operation_fts WHERE (trace_id, span_id) IN (…)for every span it carried.trace_idandspan_idareUNINDEXEDFTS5 columns, so that delete read every search entry in the store: each export cost more as the store grew. It also deleted and reinserted each span's attribute rows, one statement per span.A span is stored again only when an export repeats it. The store now checks the span's primary key first, and only for a repeated span deletes its attribute rows and search entry. New spans, nearly all of them, skip both. An export's attribute rows go in one statement. When one export lists a span twice, only its last listing is kept; before, both operation names stayed searchable.
Executor's e2e Cloud suite runs one collector for 40+ concurrent scenarios. The collector refused 540–1,828 exports per CI run as
queueFull(16 pending), and spans the scenarios assert went missing.Measured with 4,000 exports captured from that suite (16 concurrent senders, a fresh workerd collector each run, interleaved, n=4 each):
Throughput per 1,000 exports also no longer falls as the store grows.
Verified:
bun test(218 pass; the daemon health timing test fails intermittently on this machine, also on main), typecheck. The test is in the PR above this one.