Skip to content

Commit feac6da

Browse files
Merge pull request #261486 from kushagraThapar/fix_java_cosmos_diagnostics_realistic_values
Fix java cosmos diagnostics realistic values
2 parents aa03efe + 357984c commit feac6da

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/cosmos-db/nosql/troubleshoot-java-sdk-v4.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ The following code samples show how to define diagnostics thresholds, custom dia
214214
```Java
215215
// Create diagnostics threshold
216216
CosmosDiagnosticsThresholds cosmosDiagnosticsThresholds = new CosmosDiagnosticsThresholds();
217-
// For demo purposes, we will reduce the threshold so to log all diagnostics
217+
// These thresholds are for demo purposes
218218
// NOTE: Do not use the same thresholds for production
219-
cosmosDiagnosticsThresholds.setPayloadSizeThreshold(10);
220-
cosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration.ofMillis(10));
221-
cosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration.ofMillis(10));
222-
cosmosDiagnosticsThresholds.setRequestChargeThreshold(5f);
219+
cosmosDiagnosticsThresholds.setPayloadSizeThreshold(100_00);
220+
cosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration.ofSeconds(1));
221+
cosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration.ofSeconds(5));
222+
cosmosDiagnosticsThresholds.setRequestChargeThreshold(100f);
223223
```
224224

225225
#### Defining custom Diagnostics Handler
@@ -258,12 +258,12 @@ CosmosClient client = new CosmosClientBuilder()
258258
```Java
259259
// Create diagnostics threshold
260260
CosmosDiagnosticsThresholds cosmosDiagnosticsThresholds = new CosmosDiagnosticsThresholds();
261-
// For demo purposes, we will reduce the threshold so to log all diagnostics
261+
// These thresholds are for demo purposes
262262
// NOTE: Do not use the same thresholds for production
263-
cosmosDiagnosticsThresholds.setPayloadSizeThreshold(10);
264-
cosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration.ofMillis(10));
265-
cosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration.ofMillis(10));
266-
cosmosDiagnosticsThresholds.setRequestChargeThreshold(5f);
263+
cosmosDiagnosticsThresholds.setPayloadSizeThreshold(100_00);
264+
cosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration.ofSeconds(1));
265+
cosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration.ofSeconds(5));
266+
cosmosDiagnosticsThresholds.setRequestChargeThreshold(100f);
267267
```
268268

269269
#### Defining custom Diagnostics Handler

0 commit comments

Comments
 (0)