OpenTracing
Remit supports OpenTracing-compatible tracers, pushing data to any compatible backend. More information on the OpenTracing API can be found at https://opentracing.io.
Officially supported tracers that provide Node.js clients are currently:
Adding a tracer
Using a tracer with Remit is exceedingly simple. When instantiating Remit, simply pass in a tracer
option. The example below uses the popular jaegertracing/jaeger-client-node.
All calls for this Remit instance will now be traced! Great!
Namespaces
If attempting to trace multiple libraries/frameworks, you’ll need to have them cooperating with each-other to make relevant traces. While the method to perform this hasn’t yet been nailed down, Remit will provide a solution that’s most likely in line with the resulting OpenTracing specification changes.
We currently use jeff-lewis/cls-hooked to infer span contexts between Remit calls. This has worked well even previous to the introduction of OpenTracing, so we’ll use it again here.
Remit allows you to pass in a namespace
upon instantiation, so you can have get
/set
access to the namespace providing the relevant contexts. If you don’t know how these contexts work, I strongly suggest you read the jeff-lewis/cls-hooked docs and get a grip on namespaces and contexts before use.
This namespace
API is currently seen as experimental and will change without a major version bump upon the OpenTracing specificaton decision.