Skip to content

Fix threading issues around idleTimer

7a0395a
Select commit
Loading
Failed to load commit list.
Open

feat: Auto-create traces for MAUI navigation events #5111

Fix threading issues around idleTimer
7a0395a
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: find-bugs completed Apr 9, 2026 in 6m 40s

2 issues

find-bugs: Found 2 issues (2 low)

Low

ReaderWriterLockSlim _finishLock is never disposed - `src/Sentry/TransactionTracer.cs:21`

The ReaderWriterLockSlim introduced in line 21 holds native kernel synchronization objects (especially on Windows) but is never disposed. While the class comment says Disposing is not required, the Dispose() method only calls Finish() which disposes _idleTimer but not _finishLock. In high-throughput scenarios with many short-lived transactions, this could lead to gradual handle exhaustion.

Debug log message references transaction SpanId instead of child span SpanId - `src/Sentry/TransactionTracer.cs:340`

When discarding a child span due to the span limit, the debug log message at line 340 logs SpanId (the transaction's SpanId) instead of span.SpanId (the child span being discarded). This causes misleading debug output that references the wrong span, making troubleshooting more difficult.

Also found at:

  • src/Sentry/TransactionTracer.cs:349

Duration: 6m 26s · Tokens: 8.7M in / 84.3k out · Cost: $13.89 (+extraction: $0.01, +merge: $0.00, +fix_gate: $0.00)