Skip to content

fix(tracing): report late spans under nested sent spans - #1160

Draft
solnic wants to merge 1 commit into
fix/otel-orphan-span-promotionfrom
fix/otel-nested-orphan-promotion
Draft

fix(tracing): report late spans under nested sent spans#1160
solnic wants to merge 1 commit into
fix/otel-orphan-span-promotionfrom
fix/otel-nested-orphan-promotion

Conversation

@solnic

@solnic solnic commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Async work often continues from a context captured inside a nested span (a handler deep in the trace), not the root. Sent markers now cover every span of a sent transaction, and post-send storage cleanup removes sent descendants at every depth — previously only direct children were removed, leaving stale records that swallowed late spans.

Screenshots are based on an e2e scenario where finalize_batch is reported as a follow-up transaction under the nested process_batch span, starting ~0.5s after the 9ms request:

Before

Notice that finalize_batch is missing here.

image

After

🎉 finalize_batch is correctly under the trace.

image

@solnic
solnic force-pushed the fix/otel-nested-orphan-promotion branch from 5eea88b to ab63148 Compare August 7, 2026 12:40
@solnic solnic changed the title fix(tracing): report late spans under nested sent spans (#1011) fix(tracing): report late spans under nested sent spans Aug 7, 2026
@solnic
solnic force-pushed the fix/otel-nested-orphan-promotion branch from ab63148 to 40a2ec1 Compare August 7, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant