summary:"This class describes the thresholds when more details diagnostics are emitted for an operation due to high latency, high RU consumption or high payload sizes."
summary:"Can be used to customize the logic determining whether the outcome of an operation (based on status<wbr>Code + sub<wbr>Status<wbr>Code) is considered a failure (and diagnostics will be emitted) or not."
parameters:
- description:"the function that will be used to determine whether a status code/sub-status code\n tuple should be considered a failure."
desc:"Can be used to customize the logic determining whether the outcome of an operation (based on statusCode + subStatusCode) is considered a failure (and diagnostics will be emitted) or not. By default, all status codes >= 400 except for (404/0 - item not found, 409/0 - conflict, document with same id+pk already exists, 412/0 - (etag) pre-condition failure and 429/3200 - throttling due to provisioned RU exceeded) are considered failures. Those exceptions can happen very frequently and are usually expected under certain circumstances by applications - so, the noise-level for emitting diagnostics would be too high. The first parameter will be the status code - the second parameter the subStatusCode. The returned boolean of the function would indicate whether the operation should be considered as failure form a diagnostics perspective."
desc:"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 <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD\"></xref>, for non-point operations <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD\"></xref>."
desc:"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. The default value for the payload size threshold are <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_PAYLOAD_SIZE_THRESHOLD_IN_BYTES\"></xref> bytes."
desc:"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 <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_POINT_OPERATION_LATENCY_THRESHOLD\"></xref>, for non-point operations <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_NON_POINT_OPERATION_LATENCY_THRESHOLD\"></xref>."
summary:"Can be used to define a custom RU (request charge) threshold."
parameters:
- description:"The total request charge threshold for an operation. When this threshold is\n exceeded for an operation the corresponding detailed diagnostics will be emitted."
desc:"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 thane expected. The default value for the request charge threshold are <xref uid=\"com.azure.cosmos.CosmosDiagnosticsThresholds.DEFAULT_REQUEST_CHARGE_THRESHOLD\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosDiagnosticsThresholds#DEFAULT_REQUEST_CHARGE_THRESHOLD\"></xref> RUs."
desc:"This class describes the thresholds when more details diagnostics are emitted for an operation due to high latency, high RU consumption or high payload sizes."