Skip to content

Tracing #228

@wilkerlucio

Description

@wilkerlucio

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.

  • Tracing internal library
  • Trace planner
  • Trace read basics
  • Trace resolver error
  • Trace read nested
  • Trace read batches
  • Trace mutations
  • Trace async
  • Trace parallel
  • Render plan graph on click

Pathom Viz changes:

  • Basic support for new format
  • Support internal spans

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions