Skip to content

Conversation

giortzisg
Copy link
Contributor

Closes #669. The bug arises from early cleanup logic on the sentry span map. A span can finish before it's child starts, and then the span would be already deleted with the current implementation.

Introducing smarted cleanup, to actually keep track of finished spans on a tree and cleanup only if the whole subtree is finished, to actually correctly link the spans.

@giortzisg giortzisg requested a review from cleptric August 28, 2025 11:24
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 90.16393% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.82%. Comparing base (6013529) to head (040e654).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
otel/span_map.go 89.28% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1073      +/-   ##
==========================================
- Coverage   86.85%   86.82%   -0.03%     
==========================================
  Files          55       56       +1     
  Lines        5962     6013      +51     
==========================================
+ Hits         5178     5221      +43     
- Misses        641      647       +6     
- Partials      143      145       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@giortzisg giortzisg changed the title fix otel span being created as a transaction Fix otel span being created as a transaction Sep 10, 2025
@giortzisg giortzisg merged commit e9566db into master Sep 10, 2025
18 checks passed
@giortzisg giortzisg deleted the fix-otel-spans branch September 10, 2025 09:34
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.

[OTel] A transaction, not a span, is created when its parent span is already finished.

2 participants