Handle `Network.requestWillBeSentExtraInfo` to capture missed HTTP requests
gunesacar opened this issue · 2 comments
In handleResponseExtraInfo
, tracker-radar-collector sometimes cannot find a corresponding request for a given response. We get logs like the following in such cases:
google.com: ⚠️ unmatched extra info 1000003503.13
I found that this happens when Network.requestWillBeSentExtraInfo
fires before Network.requestWillBeSent
(or when a request event arrives after the corresponding response event. See, #21).
Note that the CDP documentation explicitly says:
there is no guarantee whether requestWillBeSent or requestWillBeSentExtraInfo will be fired first for the same request.
So, handling requestWillBeSentExtraInfo
event, and keeping a mapping similar to this._unmatched_extra_info
for the unmatched requests would solve the problem.
Thanks.
Thanks a lot for reporting! That's definitely a bug and I'll address it early next week.
#21 seems to be strictly related to this and should be addressed by the same fix, so I'll go ahead and close it.
@gunesacar thank you again for reporting. The bug was fixed via #22 . Please let us know if anything still seems off.