brownsys / tracing-framework

Projects related to end-to-end tracing and causal metadata propagation, such as X-Trace, Retro, and Pivot Tracing
http://brownsys.github.io/tracing-framework
BSD 3-Clause "New" or "Revised" License
86 stars 21 forks source link

Retro refactoring #2

Open JonathanMace opened 7 years ago

JonathanMace commented 7 years ago

In general, it's cool and useful to be able to attach callbacks to resource consumption events.

Retro does this using aspects. It would be nice to refactor some of this code so that:

  1. Retro's callbacks aren't tied in to the instrumentation code (eg, have them explicitly attached), so that others can reuse the code
  2. Implement some sort of general way to define events, and then allow people to attach to them.

For example, the simplest use would be:

on("disk-read", myCallback);

For this to 'just work' would be marvellous. We're pretty much there -- we have the working code and instrumentation -- we just now need it to be organized in the right way.