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 |
| type, | ||
| ...(url && {url: UrlUtils.elideDataURI(url)}), | ||
| ...(lineNumber && {lineNumber}), | ||
| ...(columnNumber && {columnNumber}), |
There was a problem hiding this comment.
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.
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