Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Commit bad456f

Browse files
author
Theo van Kraay
committed
comment sampleDiagnostics()
1 parent 012f670 commit bad456f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/com/azure/cosmos/examples/prometheus/async/CosmosClientMetricsQuickStartAsync.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ private void clientMetricsPrometheusDemo() {
8383
.setNonPointOperationLatencyThreshold(Duration.ofDays(10))
8484
.setPointOperationLatencyThreshold(Duration.ofDays(10))
8585
)
86-
.sampleDiagnostics(0.25)
86+
// Uncomment below to apply sampling to help further tune client-side resource consumption related to metrics.
87+
// The sampling rate can be modified after Azure Cosmos DB Client initialization – so the sampling rate can be
88+
// modified without any restarts being necessary.
89+
//.sampleDiagnostics(0.25)
8790
.clientCorrelationId("samplePrometheusMetrics001")
8891
.metricsOptions(new CosmosMicrometerMetricsOptions().meterRegistry(prometheusRegistry)
8992
//.configureDefaultTagNames(CosmosMetricTagName.PARTITION_KEY_RANGE_ID)

0 commit comments

Comments
 (0)