Show / Hide Table of Contents

Class TracingSettings

Used to define all the settings for tracing.

Inheritance
object
TracingSettings
Implements
IEquatable<TracingSettings>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phobos.Actor.Configuration
Assembly: Phobos.Actor.dll
Syntax
public sealed record TracingSettings : IEquatable<TracingSettings>

Constructors

TracingSettings(Config)

Creates a new TracingSettings instance.

Declaration
public TracingSettings(Config config)
Parameters
Type Name Description
Config config

TracingSettings(TraceFilteringSettings, bool, bool, bool, bool, bool, bool, bool, bool, bool)

Creates a new TracingSettings instance.

Declaration
public TracingSettings(TraceFilteringSettings filteringSettings, bool traceUserActors = true, bool traceSystemActors = false, bool traceActorLifecycle = true, bool appendLogsToTrace = true, bool traceAkkaPersistence = true, bool createTraceUponReceive = true, bool logMessageEvents = true, bool traceAsk = true, bool phobosNotInstalled = false)
Parameters
Type Name Description
TraceFilteringSettings filteringSettings
bool traceUserActors
bool traceSystemActors
bool traceActorLifecycle
bool appendLogsToTrace
bool traceAkkaPersistence
bool createTraceUponReceive
bool logMessageEvents
bool traceAsk
bool phobosNotInstalled

Fields

Default

Declaration
public static readonly TracingSettings Default
Field Value
Type Description
TracingSettings

Properties

AppendLogsToTrace

This setting determines whether we're going to automatically add all logs generated by the ILoggingAdapter into Phobos traces.

Declaration
public bool AppendLogsToTrace { get; init; }
Property Value
Type Description
bool

CreateTraceUponReceive

Set to true by default.

Creates message-processing spans automatically when tracing is enabled. When this setting is disabled users will be able to manually create traces from SpanContexts received during tracing and traces will still be propagated.

This setting, when set to false and when tracing is disabled will also prevent UsableContext from being automatically propagated.

Declaration
public bool CreateTraceUponReceive { get; init; }
Property Value
Type Description
bool
Remarks

REMARKS: this setting should really only be used when attempting to suppress large amounts of noise from the tracing system by manually controlling when traces are created.

FilteringSettings

Settings which determine how we do or don't filter out messages used to start or stop traces.

Declaration
public TraceFilteringSettings FilteringSettings { get; init; }
Property Value
Type Description
TraceFilteringSettings

LogMessageEvents

In Phobos 2.0 we introduced latency tracking which includes logging two discrete events on all automatically created Phobos spans:

  • "waiting" - created when the message is first Tell(object, IActorRef)
  • "message" - created when the message is first processed by the actor and contains the messages' content. Turning this setting to "off" disables the productions of these events on all akka.msg.recv spans created by Phobos.
Declaration
public bool LogMessageEvents { get; init; }
Property Value
Type Description
bool
Remarks

Set to true by default.

PhobosNotInstalled

When set to true, Phobos will not attempt to propagate any tracing at all.

Declaration
public bool PhobosNotInstalled { get; init; }
Property Value
Type Description
bool
Remarks

This is helpful to set when you're running in an environment where Phobos is gradually being introduced and you want to avoid serialization errors.

TraceActorLifecycle

When true, traces PreStart / PostRestart activity for actors that have tracing enabled.

Declaration
public bool TraceActorLifecycle { get; init; }
Property Value
Type Description
bool
Remarks

This setting is enabled by default and is needed in order to trace Akka.Persistence Recovery.

TraceAkkaPersistence

When set to true, the default, this will enable Akka.Persistence journals and snapshot stores to be traced.

Declaration
public bool TraceAkkaPersistence { get; init; }
Property Value
Type Description
bool
Remarks

Akka.Persistence.Recovery tracing also requires TraceActorLifecycle to be set to true in order to function correctly. However, leaving this setting on and that one off means that you can still trace Persist operations without also tracing recoveries.

TraceAllSystemActors

When true, all /system actors will be monitored automatically.

Declaration
public bool TraceAllSystemActors { get; init; }
Property Value
Type Description
bool

TraceAllUserActors

When true, all /user actors will be monitored automatically.

Declaration
public bool TraceAllUserActors { get; init; }
Property Value
Type Description
bool

TraceAsk

Enables tracing of Ask{T} operations. Enabled by default.

Declaration
public bool TraceAsk { get; init; }
Property Value
Type Description
bool

Methods

WithActorLifecycleTracing(bool)

Declaration
public TracingSettings WithActorLifecycleTracing(bool traceActorLifecycle)
Parameters
Type Name Description
bool traceActorLifecycle
Returns
Type Description
TracingSettings

WithAkkaPersistenceTracing(bool)

Declaration
public TracingSettings WithAkkaPersistenceTracing(bool traceAkkaPersistence)
Parameters
Type Name Description
bool traceAkkaPersistence
Returns
Type Description
TracingSettings

WithAppendLogsToTrace(bool)

Declaration
public TracingSettings WithAppendLogsToTrace(bool appendLogsToTrace)
Parameters
Type Name Description
bool appendLogsToTrace
Returns
Type Description
TracingSettings

WithAskTracing(bool)

Declaration
public TracingSettings WithAskTracing(bool enableAskTrace)
Parameters
Type Name Description
bool enableAskTrace
Returns
Type Description
TracingSettings

WithCreateTraceUponReceive(bool)

Declaration
public TracingSettings WithCreateTraceUponReceive(bool createTraceUponReceive)
Parameters
Type Name Description
bool createTraceUponReceive
Returns
Type Description
TracingSettings

WithFilteringSettings(TraceFilteringSettings)

Declaration
public TracingSettings WithFilteringSettings(TraceFilteringSettings filtering)
Parameters
Type Name Description
TraceFilteringSettings filtering
Returns
Type Description
TracingSettings

WithLogMessageEvents(bool)

Declaration
public TracingSettings WithLogMessageEvents(bool logMessageEvents)
Parameters
Type Name Description
bool logMessageEvents
Returns
Type Description
TracingSettings

WithPhobosNotInstalled(bool)

Declaration
public TracingSettings WithPhobosNotInstalled(bool phobosNotInstalled)
Parameters
Type Name Description
bool phobosNotInstalled
Returns
Type Description
TracingSettings

WithTraceSystemActors(bool)

Declaration
public TracingSettings WithTraceSystemActors(bool traceSystemActors)
Parameters
Type Name Description
bool traceSystemActors
Returns
Type Description
TracingSettings

WithTraceUserActors(bool)

Declaration
public TracingSettings WithTraceUserActors(bool traceUserActors)
Parameters
Type Name Description
bool traceUserActors
Returns
Type Description
TracingSettings

Implements

IEquatable<T>
In this article

Phobos®

APM for Akka.NET Applications

© 2025 Petabridge®

All rights reserved

Product
  • Purchase Phobos
  • Contact Sales
  • Phobos Quick Start Guide
  • Phobos Features
  • API Documentation
  • Release Notes
Resources
  • Akka.NET Documentation
  • Petabridge Blog
  • Akka.NET Support Plans
  • Akka.NET Consulting Services
  • Akka.NET Training
Connect
  • Petabridge Website
  • GitHub
  • Twitter
  • LinkedIn
  • YouTube
  • Contact Us
Privacy Policy
Built with ♥ by Petabridge