Ensure forward-compatibility scenario works correctly
Consider the following scenario in Node:
- Application A has a dependency on package B
- A has a dependency on
[email protected] - B has a dependency on
[email protected]
All trace data recorded with in package B should be reported to (and be compatible) with the implementation set up in Application A.
This situation contains quite a few subtleties. For example, there will be two versions of opentracing within the global application and they need to ensure they share the same tracing implementation object (so data is all funneled to the same place). Explicitly ensuring this scenario is accounted for would be good since it's (unsurprisingly) very difficult to correct forwards-compatibility issues after the fact.
Closed this a bit prematurely. I do think this is a scenario that needs to be considered. Implementing a single shared tracer instance across different modules may be not-that-obvious. E.g. http://justjs.com/posts/singletons-in-node-js-modules-cannot-be-trusted-or-why-you-can-t-just-do-var-foo-require-baz-init