Skip to content
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

Make Network markers schema-based #5304

Open
mstange opened this issue Jan 10, 2025 · 0 comments
Open

Make Network markers schema-based #5304

mstange opened this issue Jan 10, 2025 · 0 comments
Labels
markers Anything to do with marker data structures, marker chart, or the marker table network panel Related to the networking panel

Comments

@mstange
Copy link
Contributor

mstange commented Jan 10, 2025

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:

  1. Add the field formats network-request-status, network-request-priority, and network-request-http-version, to preserve behavior in the tooltip which uses _getHumanReadableDataStatus, _getHumanReadablePriority and _getHumanReadableHttpVersion.
  2. Add the field format network-request-redirect-info which 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.
  3. Add the field format network-request-mime-type so that the tooltip can have the colored square in front of the mime type value.
  4. Add the field format network-request-phase-timestamps which is a JSON object containing all the timestamps of the various preflight/request/response phases.
  5. 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 fetchStart field which is unused.) Make sure that the marker name is just as unambiguous as the data.id field, so that the regular code for matching start/end markers based on the name works reliably.
  6. Add some code to the upgrader to add guessedMimeType fields for markers from old profiles which didn't have a mimeType field.

┆Issue is synchronized with this Jira Task

@canova canova added markers Anything to do with marker data structures, marker chart, or the marker table network panel Related to the networking panel labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
markers Anything to do with marker data structures, marker chart, or the marker table network panel Related to the networking panel
Projects
None yet
Development

No branches or pull requests

2 participants