Skip to content

Commit 0bac6ad

Browse files
Updated thresholds to realistic values
1 parent 13c02f7 commit 0bac6ad

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/main/java/com/azure/cosmos/examples/diagnostics/async/CosmosDiagnosticsQuickStartAsync.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ private void diagnosticsDemo() throws Exception {
7373

7474
// Create diagnostics threshold
7575
CosmosDiagnosticsThresholds cosmosDiagnosticsThresholds = new CosmosDiagnosticsThresholds();
76-
// For demo purposes, we will reduce the threshold so to log all diagnostics
76+
// These thresholds are for demo purposes
7777
// NOTE: Do not use the same thresholds for production
78-
cosmosDiagnosticsThresholds.setPayloadSizeThreshold(10);
79-
cosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration.ofMillis(10));
80-
cosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration.ofMillis(10));
81-
cosmosDiagnosticsThresholds.setRequestChargeThreshold(5f);
78+
cosmosDiagnosticsThresholds.setPayloadSizeThreshold(100_00);
79+
cosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration.ofSeconds(1));
80+
cosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration.ofSeconds(5));
81+
cosmosDiagnosticsThresholds.setRequestChargeThreshold(100f);
8282

8383
// By default, DEFAULT_LOGGING_HANDLER can be used
8484
CosmosDiagnosticsHandler cosmosDiagnosticsHandler = CosmosDiagnosticsHandler.DEFAULT_LOGGING_HANDLER;

src/main/java/com/azure/cosmos/examples/diagnostics/sync/CosmosDiagnosticsQuickStart.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ private void diagnosticsDemo() throws Exception {
7272

7373
// Create diagnostics threshold
7474
CosmosDiagnosticsThresholds cosmosDiagnosticsThresholds = new CosmosDiagnosticsThresholds();
75-
// For demo purposes, we will reduce the threshold so to log all diagnostics
75+
// These thresholds are for demo purposes
7676
// NOTE: Do not use the same thresholds for production
77-
cosmosDiagnosticsThresholds.setPayloadSizeThreshold(10);
78-
cosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration.ofMillis(10));
79-
cosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration.ofMillis(10));
80-
cosmosDiagnosticsThresholds.setRequestChargeThreshold(5f);
77+
cosmosDiagnosticsThresholds.setPayloadSizeThreshold(100_00);
78+
cosmosDiagnosticsThresholds.setPointOperationLatencyThreshold(Duration.ofSeconds(1));
79+
cosmosDiagnosticsThresholds.setNonPointOperationLatencyThreshold(Duration.ofSeconds(5));
80+
cosmosDiagnosticsThresholds.setRequestChargeThreshold(100f);
8181

8282
// By default, DEFAULT_LOGGING_HANDLER can be used
8383
CosmosDiagnosticsHandler cosmosDiagnosticsHandler = CosmosDiagnosticsHandler.DEFAULT_LOGGING_HANDLER;

0 commit comments

Comments
 (0)