-
Notifications
You must be signed in to change notification settings - Fork 983
fix(instrumentation-fetch): removes CORS sub-span creation as it was not compliant with ResourceTiming spec #5130
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
Conversation
…not compliant with ResourceTiming spec mend
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
@mariomc not sure if you are still working on this, but there have been some new developments since. I worked on #5282, which completely rewrote the tests. They are now making real So I think the test changes from this PR is already taken care of (please double check, though). The refactor to remove the runtime code (that does nothing, as you pointed out), is still needed, as I didn't want to touch the implementation while doing a big test refactor. A slightly unfortunate thing is that, while the same refactor/general approach to would work for the XHR tests, and IMO a useful improvement, I ran out of time to do that myself. So the test suites have different paradigms, which may affect your plan to fix both, but it looks like you already figured out how to work with that anyway. |
I haven't kept up with the latest developments, but will keep up with them once I have an opening. |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
|
Closing this PR, as this was already addressed IIUC - please open a new PR if this is incorrect. Thanks! 🙂 |
Which problem is this PR solving?
Fixes #5122
In
instrumentation-fetchandinstrumentation-xhr, we're including logic to find preflight requests and create (nested) spans for them.However, that is unnecessary complexity as OPTIONS/preflight calls for a cross-domain request are not added as an additional entry in the PerformanceEntry list and, much like redirects and other preconditions, are accounted for in the main resource entry (despite not being able to differentiate between one and the other).
A simple test can be done by executing the following:
Short description of the changes
Removed CORS child span creation, filtering and other logic.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
instrumentation-fetchandinstrumentation-xhrin: Google Chrome 130, Safari 18, Firefox 131. Noticed there were no child spans being created for OPTIONS/preflight requests norperformanceentries being added for CORS-enabled requests.performanceentries.Checklist: