OpenTracing Support
All tracing implementations that work with Phobos.Tracing are required to support the latest OpenTracing standard and as a result of this support we also have the ability to load OpenTracing ITracer implementations that aren't supported as first-party drivers in Phobos.
NOTE
In order to use any of the Phobos integrations, you will need to first configure your akka.actor.provider setting to use one of the ActorRefProvider implementations provided by the Phobos.Actor.* NuGet packages. Click here for details.
Using GlobalTracer
The OpenTracing .NET driver includes a global static class known as the GlobalTracer, which can be used to register a global static singleton ITracer that can be consumed by Phobos.Tracing and possibly other drivers.
Here's an example of how it can be used:
OpenTracing.Util.GlobalTracer.Register(new MockTracer());
// instantiates Phobos.Tracing for this ActorSystem if
// not already started
var actorTracing = Phobos.Tracing.ActorTracing.For(Sys);
Any tracer which implements the OpenTracing.ITracer interface can be registered using the GlobalTracer.Register method.
Backend Loading Order
Phobos.Tracing has a discrete process it uses for determining which tracing backend will be loaded, in the event that there are multiple sources of configuration available:
- If the
phobos.tracing.provider-typeis set to ANYTHING OTHER THANdefaultthenPhobos.Tracingwill try to load that tracing provider implementation. - If the
phobos.tracing.provider-typeis set todefaultthenPhobos.Tracingwill automatically try to load theGlobalTracer.Registeris available. - If
Phobos.Tracingtries to load theGlobalTracerand no tracer is registered thenPhobos.Tracingwill fall back to thedefaulttracer, which collects no traces.
Third Party Samples
Here are some examples of Phobos users making use of our OpenTracing integration in the wild. Please take a look at these if you would like to get an idea of how you can put this feature to use.