ash-project / reactor

Reactor is a dynamic, concurrent, dependency resolving saga orchestrator.
https://ash-hq.org/
MIT License
44 stars 6 forks source link

Support tracing #63

Closed jimsynz closed 7 months ago

jimsynz commented 1 year ago

At the very least honour Ash's tracing configuration?

jimsynz commented 1 year ago

@zachdaniel can you provide some advice/points to how I might add this when you have some time?

zachdaniel commented 1 year ago

There are two important parts:

process context

whenever you would start a process you need to call a function on a provided module to

  1. get the context from the current process (i.e before starting the process)
  2. set the context to the next process (in the process you started)

This right here would be great all on its own. But then alternatively you can also add callbacks to that module like start_span end_span (essentially the same callbacks that Ash.Tracer has TBH).

Then in Ash for Ash.Reactor we can create a Reactor.Tracer that calls the correct Ash.Tracers. If you want to be extra you might also support passing tracer: {Tracer, opts} so that we can parameterize it depending on what resource we are calling from, as sometimes tracers are added for specific actions (or at least, it could be).

jimsynz commented 7 months ago

Closed by #90