File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
src/main/java/com/azure/cosmos/examples/diagnostics Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments