Skip to content

Conversation

@sohankshirsagar
Copy link
Contributor

@sohankshirsagar sohankshirsagar commented Oct 23, 2025

Add 10 minute timeout safeguard to automatically close leaked spans


Note

Introduce a 10-minute timeout that auto-ends spans and clears the timer on normal span termination.

  • Tracing (src/core/tracing/SpanUtils.ts):
    • Add 10-minute auto-end safeguard for spans via WeakMap<Span, Timeout> and SPAN_TIMEOUT_MS.
    • On timeout: log warning, set SpanStatusCode.ERROR, span.end(), and cleanup WeakMap; timer uses unref().
    • On normal endSpan(): clear and remove associated timeout before ending.

Written by Cursor Bugbot for commit b955368. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

@sohankshirsagar sohankshirsagar marked this pull request as draft October 23, 2025 20:31
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.

2 participants