Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adding try-finally in instrumentClientFetch to ensure spans are … #178

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sathiya-s1
Copy link

…closed on non HTTP errors such as Network connection lost.

Fixes # [insert GH issue number(s)].

What this PR solves / how to test:
Errors in fetch that aren't handled by Cloudflare such as intermittent connection failures to other workers or durable objects currently result in the span remaining open. This small fix ensures that the spans are closed on any such unhandled errors.

@evanderkoogh
Copy link
Owner

Hey @sathiya-s1, thank you so much for this, this is exactly what is so awesome about open-source. You spotting a mistake, not just fixing it, but fixing it for everyone else who uses the API..

Apologies for the delay, it has been a few busy weeks.

Would you be able to run npm run format and push up that commit? That is the only thing that is failing atm and then I'll get it merged straight away.

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