Make Network markers schema-based
Network markers currently don't have a schema.
For #5302, we'll need to create a schema which lists all useful fields. This will require an upgrader.
Furthermore, we have code when computing the derived markers, which treats Network markers in a special way and matches up markers based on data.status and data.id. If we have to upgrade these markers anyway, it may make sense to change them in such a way that we can remove this special handling.
This issue is only about making this change to the processed format. The Gecko format can be changed in a separate step. Once the Gecko format is changed, changing the Gecko C++ code for network markers will hopefully not require changing the front-end anymore.
I suggest the following:
- Add the field formats
network-request-status,network-request-priority, andnetwork-request-http-version, to preserve behavior in the tooltip which uses_getHumanReadableDataStatus,_getHumanReadablePriorityand_getHumanReadableHttpVersion. - Add the field format
network-request-redirect-infowhich expects values of type{ redirectType: string, isHttpToHttpsRedirect: bool }, again to preserve behavior in the tooltip which creates entries such as "Redirection type: Permanent (HTTP to HTTPS)". Or, alternatively, just put the combined string into a regular string field, and remove the extra bool field. - Add the field format
network-request-mime-typeso that the tooltip can have the colored square in front of the mime type value. - Add the field format
network-request-phase-timestampswhich is a JSON object containing all the timestamps of the various preflight/request/response phases. - Change the markers from interval markers to start/end markers, because the middle timestamp is ignored anyway. The middle timestamp being the end of the STATUS_START marker which is also the start of the STATUS_NOTSTART marker. (We currently put that middle timestamp into a
fetchStartfield which is unused.) Make sure that the marker name is just as unambiguous as thedata.idfield, so that the regular code for matching start/end markers based on the name works reliably. - Add some code to the upgrader to add
guessedMimeTypefields for markers from old profiles which didn't have amimeTypefield.
┆Issue is synchronized with this Jira Task