This repository was archived by the owner on Jul 13, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/com/azure/cosmos/examples/prometheus/async Expand file tree Collapse file tree Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments