Table of Contents

Class CosmosThresholdOptions

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

This class describes the thresholds when more details diagnostics events are emitted, if subscribed, for an operation due to high latency, high RU consumption or high payload sizes.

public class CosmosThresholdOptions
Inheritance
CosmosThresholdOptions
Inherited Members
Extension Methods

Constructors

CosmosThresholdOptions()

public CosmosThresholdOptions()

Properties

NonPointOperationLatencyThreshold

Can be used to define custom latency thresholds. When the latency threshold is exceeded more detailed diagnostics will be emitted (including the request diagnostics). There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose latency thresholds that reduce the noise level and only emit detailed diagnostics when there is really business impact seen. The default value for the point operation latency threshold is 3 seconds. all operations except (ReadItem, CreateItem, UpsertItem, ReplaceItem, PatchItem or DeleteItem)

public TimeSpan NonPointOperationLatencyThreshold { get; set; }

Property Value

TimeSpan

3 seconds

PayloadSizeThresholdInBytes

Can be used to define a payload size threshold. When the threshold is exceeded for either request or response payloads more detailed diagnostics will be emitted (including the request diagnostics). There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose a payload size threshold that reduces the noise level and only emits detailed diagnostics when the payload size is significantly higher than expected.

public int? PayloadSizeThresholdInBytes { get; set; }

Property Value

int?

PointOperationLatencyThreshold

Can be used to define custom latency thresholds. When the latency threshold is exceeded more detailed diagnostics will be emitted (including the request diagnostics). There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose latency thresholds that reduce the noise level and only emit detailed diagnostics when there is really business impact seen. The default value for the point operation latency threshold is 1 second. Point Operations are: (ReadItem, CreateItem, UpsertItem, ReplaceItem, PatchItem or DeleteItem)

public TimeSpan PointOperationLatencyThreshold { get; set; }

Property Value

TimeSpan

1 second

RequestChargeThreshold

Can be used to define a custom RU (request charge) threshold. When the threshold is exceeded more detailed diagnostics will be emitted (including the request diagnostics). There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose a request charge threshold that reduces the noise level and only emits detailed diagnostics when the request charge is significantly higher than expected.

public double? RequestChargeThreshold { get; set; }

Property Value

double?