tristanls/tart-tracing — pull request #7 by tristanls (2013-12-14 17:02:49+00:00)
Title: Refactoring to make tart-tracing pluggable as well.

'constructConfig' can now be passed in options. Also, 'effect' is
now attached to options so that it can be accessed all the way in
tart.pluggable.

This came up as I wanted to instrument the actor reference itself for testing (in a new testing module that depends on tart-tracing) and I realized that I can't touch it. When I initiated the first attempt at simply passing constructConfig in options, I ran into a problem where the tart-tracing version of constructConfig was accessing its closure, mainly "exports.effect". So, when I replaced constructConfig, I had no access to "exports.effect" and could not plug in a different implementation. The next step in making that possible was to let "effect" be part of options (as options are passed all the way down into tart.pluggable). Then the exports.effect is initialized from options.effect.

A side effect of making tart-tracing pluggable is that it might point a way to getting rid of how the globals are expressed. Attaching them to options seems less hard-baked to me.