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

rewrite of fetch is not exact #11466

Open
3 tasks done
cuijiudai opened this issue Apr 8, 2024 · 3 comments
Open
3 tasks done

rewrite of fetch is not exact #11466

cuijiudai opened this issue Apr 8, 2024 · 3 comments
Labels
Package: vue Issues related to the Sentry Vue SDK Type: Bug

Comments

@cuijiudai
Copy link

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/vue

SDK Version

7.49.0

Framework Version

@sentry/vue

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

sentry has rewrite fetch to call finish span when the fetch's then method been called .But the fetch request has no been completed yet, that called a problem that the transaction finished before the fetch complted 。in single-app or qiankun ,that caused transaction always send before the child app loaded when the network is not well or the vendors is large.

Expected Result

make fetch span finish span exact when fetch complete

Actual Result

transaction request send to early before fetch request complete

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Apr 8, 2024
@github-actions github-actions bot added the Package: vue Issues related to the Sentry Vue SDK label Apr 8, 2024
@AbhiPrasad
Copy link
Member

@cuijiudai what do you mean by

But the fetch request has no been completed yet

when the fetch result returns we can considering the network call to be finished. That is what the span is measuring. I recommend you bump your idleTimeout setting if you're encountering issues with transaction ending too early.

https://docs.sentry.io/platforms/javascript/performance/instrumentation/automatic-instrumentation/#idletimeout

@cuijiudai
Copy link
Author

by my test , then method of fetch will be called when the Response Object has been created. the data has not been fetched yet.
20240409-010031
in the image, the chunk-vendors.js is fetched by fetch method , it take 3s to load completely as showed in the waterfull, but it only take 40ms and thethen method of fetch was called.
that makes the 'idleTransaction' posted before other resources load , as idleTimeout is only 1s.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Apr 8, 2024
@cuijiudai cuijiudai changed the title rewrite on fetch is not exact rewrite of fetch is not exact Apr 8, 2024
@lforst
Copy link
Member

lforst commented Apr 10, 2024

Ah I see. I think this is the case when the response is streaming 🤔 We should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: vue Issues related to the Sentry Vue SDK Type: Bug
Projects
Status: No status
Development

No branches or pull requests

3 participants