-
Notifications
You must be signed in to change notification settings - Fork 25.5k
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
Allow late instrumentation of globalThis.fetch
#57527
Comments
Instead of using the reference that existing when `FetchBackend` is setup. fixes angular#57527
Hello, Thank you for your investigation, the fixed you suggested is in review in #57531 |
Instead of using the reference that existing when `FetchBackend` is setup. fixes angular#57527
Instead of using the reference that existed when `FetchBackend` was setup. fixes angular#57527
Instead of using the reference that existing when `FetchBackend` is setup. fixes angular#57527
Sadly this is still open as #57531 had to be reverted. |
I'm investigating why the fix made our tests flaky. |
Instead of using the reference that existing when `FetchBackend` is setup. fixes angular#57527
…7531) Instead of using the reference that existing when `FetchBackend` is setup. fixes angular#57527 PR Close angular#57531
…7531) Instead of using the reference that existing when `FetchBackend` is setup. fixes angular#57527 PR Close angular#57531
…7531) Instead of using the reference that existing when `FetchBackend` is setup. fixes angular#57527 PR Close angular#57531
…7531) Instead of using the reference that existing when `FetchBackend` is setup. fixes angular#57527 PR Close angular#57531
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are relevant/related to the feature request?
common
Description
I am working on the Datadog Browser SDK, and we have customers having issues when using
withFetch()
.Our RUM SDK, like many other RUM solutions, is replacing the
fetch
global with an instrumented version (see our code, Sentry code, OpenTelemetry code). This works fine most of the time, but because Angular 18 is storing a reference of thefetch
global internally, users willing to usewithFetch()
have to load and initialize our SDK before starting their Angular app, else Angular will use the nativefetch
instead of our instrumented version. This is not ideal as it forces the Angular app to wait for our SDK to be loaded and initialized before starting.Proposed solution
Keep using the global
fetch
variable. This could be done by replacingwith
here
Alternatives considered
Ask Angular 18 users to initialize third-party instrumentation libraries before starting their Angular app.
The text was updated successfully, but these errors were encountered: