Skip to content

ref(span-buffer): Update path compression for existing span ids#117890

Draft
cmanallen wants to merge 2 commits into
masterfrom
cmanallen/span-buffer-path-compression
Draft

ref(span-buffer): Update path compression for existing span ids#117890
cmanallen wants to merge 2 commits into
masterfrom
cmanallen/span-buffer-path-compression

Conversation

@cmanallen

@cmanallen cmanallen commented Jun 16, 2026

Copy link
Copy Markdown
Member

We need to traverse to the root-node in order to build the tree. For spans received in the current segment they will all be cached in redis with this span-id pointing to the best-known root node. Previously once inserted they were not updated again. However, this led to repeated traversals across nodes whose root was previously known. With this change we cache the root span id on the traversed nodes not in the segment set. This requires a few more operations (appended to the batch hset op) but no additional memory.

The diff is a little messed up. The old loop is untouched. A new loop is the only addition.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 16, 2026
@cmanallen cmanallen changed the title ref(span-buffer): Add path compression for existing span ids ref(span-buffer): Update path compression for existing span ids Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant