profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Export network requests as HAR

Open bgrins opened this issue 1 year ago • 4 comments

I'd like to be able to get the requests in the HAR format. Either a button to download from the network panel (example https://share.firefox.dev/4eEUs8H), or some kind of URL convention where tacking .har onto the end of a share link loads the JSON for the active thread instead of rendering the profiler UI (example https://share.firefox.dev/4eEUs8H.har)

┆Issue is synchronized with this Jira Task

bgrins avatar Jun 28 '24 17:06 bgrins

Could you give a few more details about your use case?

  • What do you want to use the HAR file for? Is it ok if some of the information in it is incomplete? For example, profiles currently do not contain information about cookies; would an incomplete HAR file still be useful for your purposes?
  • Why do you want to get the HAR file out of a profile, and not directly from the network panel in the devtools? Is it because you got a profile from someone else with an issue you can't reproduce, or because you want to make sure that the HAR analysis you're doing is about exactly the scenario that was captured in the profile, or is it because sharing profiles is easier than sharing HAR files? Or maybe something else?
  • Are there features we can add to the profiler's network panel that would reduce the need for this export functionality? (I'm not saying we shouldn't add exporting functionality - actually I think it makes sense to add it before adding features because we want to empower users to remix the raw data with their own tooling.)

mstange avatar Jun 28 '24 17:06 mstange

My primary usecase was to allow inspecting headers in the devtools UI for an existing profile (it's also definitely easier to share a profile than a HAR), although after we chatted briefly I realize we don't have the headers in the profile in the first place so this is maybe less interesting for my specific usecase.

bgrins avatar Jun 28 '24 17:06 bgrins

If had a mode where the profile was able to store more expansive data about the network requests (for example, in a profile generated by CI), it may also be valuable to export enough detail to be able to "replay" the page load using a proxy for further debugging & testing.

bgrins avatar Jun 28 '24 17:06 bgrins

not****

Melyzor avatar Jun 28 '24 21:06 Melyzor