Show / Hide Table of Contents

    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:

    1. If the phobos.tracing.provider-type is set to ANYTHING OTHER THAN default then Phobos.Tracing will try to load that tracing provider implementation.
    2. If the phobos.tracing.provider-type is set to default then Phobos.Tracing will automatically try to load the GlobalTracer.Register is available.
    3. If Phobos.Tracing tries to load the GlobalTracer and no tracer is registered then Phobos.Tracing will fall back to the default tracer, 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.

    • Monitoring Akka.NET with Datadog and Phobos: Tracing
    Back to top Copyright © 2015-2018 Petabridge®