profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Proposed tweak to marker JSON format: Move type outside of data, into its own column

Open mstange opened this issue 2 years ago • 1 comments

The schema of a marker is currently indicated by a type property on the data object of a marker.

It would be nice if the type was stored outside of the data object. This would mean that type is no longer a reserved key name that cannot be used for fields, so it would avoid bugs like bug 1939499.

My proposal is:

  1. Move the data.type value out of the data object, into a separate marker table type column.
  2. Optional: Instead of a string, make it an integer which indexes into the global marker schema array.

Edit 2025-01-06: I rewrote this comment to mention the collision issue and removed the Rust API justification

┆Issue is synchronized with this Jira Task

mstange avatar Feb 27 '23 17:02 mstange

This could also make "type" a normal field name inside the data object (more than once when adding a new marker I tried to have a "type" field and that ended up messing with the marker schema used by the front-end).

fqueze avatar Feb 28 '23 18:02 fqueze