Class PhobosActorSettings
Internal settings used to determine how we are going to trace or monitor a specific actor
Inheritance
Namespace:Phobos.Actor.Configuration
Assembly:Phobos.Actor.dll
Syntax
public class PhobosActorSettings
Constructors
PhobosActorSettings(Boolean, Boolean, TraceFilteringSettings, Boolean, Double, Double, Boolean, Boolean, Boolean, Boolean, Boolean)
Creates a new PhobosActorSettings instance.
Declaration
public PhobosActorSettings(bool trace, bool monitor, TraceFilteringSettings filterSettings = null, bool customFiltering = false, double phobosMonitorSampleRate = 1, double phobosTracingSampleRate = 1, bool phobosNotInstalled = false, bool logTraces = false, bool mailboxDepth = false, bool propagateSettingsToChildren = false, bool customTracingSampleRate = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | trace | Toggles tracing on or off for this actor. |
System.Boolean | monitor | Toggles monitoring on or off for this actor. |
TraceFilteringSettings | filterSettings | Determines how this actor filters incoming messages for tracing purposes. |
System.Boolean | customFiltering | When set to true, indicates that this actor is running with custom filtering. |
System.Double | phobosMonitorSampleRate | The sample rate used to instrument monitoring inside of this actor. |
System.Double | phobosTracingSampleRate | The sample rate used to instrument tracing inside of this actor. |
System.Boolean | phobosNotInstalled | Optional. Use to indicate when Akka.Remote is enabled that the actors on the other side of the network don't have Phobos installed. |
System.Boolean | logTraces | Optional. When enabled the actor will log all of its received traces. Intended for debugging purposes. |
System.Boolean | mailboxDepth | Optional. When enabled turns on monitoring of the mailbox depth of this actor. |
System.Boolean | propagateSettingsToChildren | When set to true, proagates the current monitoring settings down to children. |
System.Boolean | customTracingSampleRate | When |
Fields
Empty
Default settings - has instrumentation disabled by default.
Declaration
public static readonly PhobosActorSettings Empty
Field Value
Type | Description |
---|---|
PhobosActorSettings |
Properties
HasCustomTraceFilteringSettings
Returns true
if this actor has filtering settings
that differ from the Akka.Actor.ActorSystem defaults.
Declaration
public bool HasCustomTraceFilteringSettings { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasCustomTracingSampleRate
When true
, indicates that this actor has a custom sampling rate distinct
from whatever the system default is.
Declaration
public bool HasCustomTracingSampleRate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LogTraces
Used to log traces as they're received from other actors
Declaration
public bool LogTraces { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Monitor
If true
, this actor will monitor
Declaration
public bool Monitor { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MonitorMailbox
Used to monitor the depth of the mailbox queue
Declaration
public bool MonitorMailbox { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MonitorSampleRate
The sample rate we're going to use in our monitoring instrumentation.
Declaration
public double MonitorSampleRate { get; }
Property Value
Type | Description |
---|---|
System.Double |
PhobosNotInstalled
Used when communicating with remote Akka.Actor.ActorSystem instances.
When true
, it means that Phobos is not installed on the target system.
Declaration
public bool PhobosNotInstalled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
PropagateSettingsToChildren
Used in cases where we want to DISABLE tracing for an entire portion of the hierarchy.
Declaration
public bool PropagateSettingsToChildren { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Trace
If true
, this actor will use tracing on all message processing internally.
Declaration
public bool Trace { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
TraceFiltering
The settings used to filter incoming traces.
Declaration
public TraceFilteringSettings TraceFiltering { get; }
Property Value
Type | Description |
---|---|
TraceFilteringSettings |
TracingSampleRate
The sample rate we're going to use in our tracing instrumentation.
Declaration
public double TracingSampleRate { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
ForSystemActors(TracingSettings, MonitoringSettings)
Creates a default configuration for /system actors
Declaration
public static PhobosActorSettings ForSystemActors(TracingSettings tracing, MonitoringSettings monitoring)
Parameters
Type | Name | Description |
---|---|---|
TracingSettings | tracing | The |
MonitoringSettings | monitoring | The |
Returns
Type | Description |
---|---|
PhobosActorSettings | Phobos default settings for /system actors. |
ForUserActors(TracingSettings, MonitoringSettings)
Creates a default configuration for /user actors
Declaration
public static PhobosActorSettings ForUserActors(TracingSettings tracing, MonitoringSettings monitoring)
Parameters
Type | Name | Description |
---|---|---|
TracingSettings | tracing | The |
MonitoringSettings | monitoring | The |
Returns
Type | Description |
---|---|
PhobosActorSettings | Phobos default settings for /user actors. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
WithFiltering(TraceFilteringSettings, Boolean)
Modifies the settings to change whether tracing is enabled or not.
Declaration
public PhobosActorSettings WithFiltering(TraceFilteringSettings filteringSettings, bool customTracing = true)
Parameters
Type | Name | Description |
---|---|---|
TraceFilteringSettings | filteringSettings | The tracing filtering settings. |
System.Boolean | customTracing | Optional. Defaults to |
Returns
Type | Description |
---|---|
PhobosActorSettings | An immutable replica of the original PhobosActorSettings instance. |
WithMonitoring(Boolean)
Modifies the settings to change whether monitoring is enabled or not.
Declaration
public PhobosActorSettings WithMonitoring(bool monitoring)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | monitoring | Toggles monitoring on or off. |
Returns
Type | Description |
---|---|
PhobosActorSettings | An immutable replica of the original PhobosActorSettings instance. |
WithTracing(Boolean)
Modifies the settings to change whether tracing is enabled or not.
Declaration
public PhobosActorSettings WithTracing(bool tracing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | tracing | Toggles tracing on or off. |
Returns
Type | Description |
---|---|
PhobosActorSettings | An immutable replica of the original PhobosActorSettings instance. |