Table of Contents

Class MonitorOptions

Namespace
Tharga.MongoDB.Configuration
Assembly
Tharga.MongoDB.dll
public record MonitorOptions : IEquatable<MonitorOptions>
Inheritance
MonitorOptions
Implements
Inherited Members

Properties

EnableCommandMonitoring

Enable MongoDB driver command monitoring. When enabled, driver-level command durations are captured and surfaced in call step data, allowing operators to distinguish slow server execution from thread pool starvation. Default is false. Should NOT be always-on in production due to volume.

public bool EnableCommandMonitoring { get; set; }

Property Value

bool

Enabled

Enable or disable the MongoDB monitor. By default, it is enabled.

public bool Enabled { get; set; }

Property Value

bool

LastCallsToKeep

Number of calls to keep. The latest calls replaces the oldest.

public int LastCallsToKeep { get; set; }

Property Value

int

SendTo

URL of the central monitor server to forward monitoring data to. When set, the Tharga.MongoDB.Monitor.Client package must be referenced and SendTo is used as the Tharga.Communication server address. When null or empty, no forwarding is configured.

public string SendTo { get; set; }

Property Value

string

SlowCallsToKeep

Number of slow calls to keep. The slowest calls replaces the less slow calls.

public int SlowCallsToKeep { get; set; }

Property Value

int

SourceName

Identifies the source of monitoring data. Used to distinguish data from different applications or agents in a distributed monitoring scenario. Defaults to "{MachineName}/{EntryAssemblyName}" when not configured.

public string SourceName { get; set; }

Property Value

string

StorageMode

Controls where monitor state is persisted. Database stores state in the _monitor collection so it survives restarts and is shared across multiple application instances. Default is Database.

public MonitorStorageMode StorageMode { get; set; }

Property Value

MonitorStorageMode