The implementation for tracking process data in Pathom 3 is based on entity metadata. It seemed like a good idea when I was making Pathom 3 to make this part of the entity itself; it seemed clever at the time, but now I think it was a mistake.
The consequence of this approach is that it makes it very hard to add custom tracing info, since this approach requires all keys related to timing to be known.
To improve it, I'm going to revert to the approach used in Pathom 2, which involves having a single atom with a vector where new events can be added at any time. This approach will improve tracing in the following ways:
- More flexible tracking, any plugin can add more events to improve the debugging while using Pathom Viz
- The tracing vector becomes a stream of detailed data of processing, allowing it to be used to find occurrences of specific events programmatically
- Lighweight event capture, since capturing only means adding to the trace, it's cheap, and we can decide when (and if) to process that as a tree
- Enable capture of incomplete events. Suppose a part of the process fails to complete, and we can't track the finish event. In that case, we still have the starting event and the events in between, which help with debugging, even when dealing with partial information (and error scenarios).
- Make it easier to handle distributed tracing, for example, when delegating parts of the process to a foreign Pathom instance
Given that, Pathom will move back to tracing, and the entity stats will be deprecated and removed.
Pathom Viz changes:
The implementation for tracking process data in Pathom 3 is based on entity metadata. It seemed like a good idea when I was making Pathom 3 to make this part of the entity itself; it seemed clever at the time, but now I think it was a mistake.
The consequence of this approach is that it makes it very hard to add custom tracing info, since this approach requires all keys related to timing to be known.
To improve it, I'm going to revert to the approach used in Pathom 2, which involves having a single atom with a vector where new events can be added at any time. This approach will improve tracing in the following ways:
Given that, Pathom will move back to tracing, and the
entity statswill be deprecated and removed.Pathom Viz changes: