getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.97k stars 1.57k forks source link

Errors in Fetch/XHR requests associated with wrong span #3350

Closed rhcarvalho closed 1 year ago

rhcarvalho commented 3 years ago

Package + Version

Version:

6.3.0-beta.4

Description

Reported by @EvanPurkhiser:

Why is it that the pageload span has the error and not one of the http spans? Looking at the actual error here it’s a fetch error, so I would expect that to be tagged on the particular http operation span.

image

rhcarvalho commented 3 years ago

According to @kamilogorek there is a possible fix:

sentry-javascript/packages/tracing/src/browser/request.ts#L159-L168 this would have to be updated to not only handle response but also error, as Failed to fetch is not HTTP response error, but rather fetch API error.

rhcarvalho commented 3 years ago

https://github.com/getsentry/develop/issues/254#issuecomment-820306071 might well be the culprit here.

github-actions[bot] commented 3 years ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

smeubank commented 1 year ago

Closing this issue, unless someone can confirm that it still persists