Open Bug 1925313 Opened 11 months ago Updated 6 months ago

Make it easier to work with glean::Datetime within profiler code

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P4)

enhancement

Tracking

(Not tracked)

People

(Reporter: aabh, Unassigned)

Details

The glean::Datetime data structure is very useful for working within glean, but there are places where we would like to be able to use it within the profiler, but we need to re-implement glean functionality in order to do so. In no particular order:

  • It would be useful to be able to convert a glean::Datetime to a chrono::DateTime (e.g. glean::Datetime.into::<chrono::DateTime>()). There is a method that will convert from chrono -> glean, but not back in the other direction.
  • Some places within the Glean API will take a parameter of type Option<chrono::DateTime>, and will internally record the time "now" when the function is called with None. Adding markers to these APIs is difficult, as we need to re-implement that (internal to glean) method local_now_with_offset. Exposing this within the scope of FoG, or modifying the internal APIs to return the "now" time would be useful.
Summary: Implement glean::Datetime.into::<chrono::DateTime>() or equivalent. → Make it easier to work with glean::Datetime within profiler code
Priority: -- → P3
Priority: P3 → P4
You need to log in before you can comment on or make changes to this bug.