Class ActorTracing
Binds a specific ActorSystem with an OpenTracing.ITracer implementation.
Inheritance
Implements
Inherited Members
Namespace: Phobos.Tracing
Assembly: Phobos.Tracing.dll
Syntax
public sealed class ActorTracing : IExtension
Constructors
ActorTracing(ExtendedActorSystem)
Creates a new ActorTracing instance />
Declaration
public ActorTracing(ExtendedActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ExtendedActorSystem | system | The ActorSystem for which this tracer is being added. |
Fields
PhobosActivitySourceName
The name of the Phobos.Tracing.ActorTracing.ActivitySource used by Phobos to generate trace events.
Declaration
public const string PhobosActivitySourceName = "Phobos"
Field Value
Type | Description |
---|---|
System.String |
Properties
Settings
The tracing settings.
Declaration
public TracingSettings Settings { get; }
Property Value
Type | Description |
---|---|
TracingSettings |
Tracer
The current OpenTelemetry Tracer used to create OpenTelemetry.Trace.TelemetrySpans, which wrap around System.Diagnostics.Activity instances. This can be used for distributed tracing operations within actors and non-actor parts of your application.
Declaration
public Tracer Tracer { get; }
Property Value
Type | Description |
---|---|
OpenTelemetry.Trace.Tracer |
Remarks
For more information about OpenTelemetry, please visit https://opentelemetry.io/
Methods
DefaultConfig()
Returns the default Config for the Phobos.Tracing plugin.
Declaration
public static Config DefaultConfig()
Returns
Type | Description |
---|---|
Config | A Config object read from the embedded defaults defined in this DLL. |
For(ActorSystem)
Gets the current ActorTracing instance registered with the ActorSystem.
Declaration
public static ActorTracing For(ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | The actor system. |
Returns
Type | Description |
---|---|
ActorTracing | An ActorTracing instance if one is registered. A default ActorTracing implementation that uses the NoOpTracer if none is currently registered. |