-
Notifications
You must be signed in to change notification settings - Fork 9.5k
core(network-requests): add initiators to debugData #16605
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
core(network-requests): add initiators to debugData #16605
Conversation
Follow up from #16599
|
I noticed that What do you think about this approach? Should it be handled differently, such as by amending the existing types? Or should the initiators be left as-is to maintain alignment with audit.details.items, even when some have no |
I'd update the failing test |
core/audits/network-requests.js
Outdated
type, | ||
...(url && {url: UrlUtils.elideDataURI(url)}), | ||
...(lineNumber && {lineNumber}), | ||
...(columnNumber && {columnNumber}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line/col are zero based, so this would not include the properties when 0.
I think just including the properties as-is ({type, url: url ? UrlUtils.elideDataURI(url) : undefined, lineNumber, columnNumber}
) should be fine (for example). If they are undefined then they get dropped when we serialize to JSON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks. I'd make the changes shortly.
Good point about the details type not supporting arbitrary object shapes. Forgot about that :) debugData was a good idea!
it should be fine to include always in the debugData. When serialized to JSON, if they were undefined they will get dropped. |
FYI you can ignore the failing smoke test, it's unrelated. |
Thanks! |
Summary
This is a feature request for #11123 to identify a network request initiator from the network-requests audit log